generated-configure.sh revision 668:3b8ffb80db0f
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
604JOBS
605MEMORY_SIZE
606NUM_CORES
607ENABLE_INTREE_EC
608SALIB_NAME
609HOTSPOT_MAKE_ARGS
610FIXPATH
611LIBCXX
612STATIC_CXX_SETTING
613LIBDL
614LIBM
615LIBZIP_CAN_USE_MMAP
616USE_EXTERNAL_LIBZ
617USE_EXTERNAL_LIBGIF
618USE_EXTERNAL_LIBJPEG
619ALSA_LIBS
620ALSA_CFLAGS
621FREETYPE2_LIB_PATH
622USING_SYSTEM_FT_LIB
623FREETYPE2_LIBS
624FREETYPE2_CFLAGS
625CUPS_CFLAGS
626OPENWIN_HOME
627X_EXTRA_LIBS
628X_LIBS
629X_PRE_LIBS
630X_CFLAGS
631XMKMF
632CXXFLAGS_DEBUG_SYMBOLS
633CFLAGS_DEBUG_SYMBOLS
634ZIP_DEBUGINFO_FILES
635ENABLE_DEBUG_SYMBOLS
636LDFLAGS_CXX_JDK
637LDFLAGS_JDKEXE_SUFFIX
638LDFLAGS_JDKLIB_SUFFIX
639LDFLAGS_JDKEXE
640LDFLAGS_JDKLIB
641CXXFLAGS_JDKEXE
642CXXFLAGS_JDKLIB
643CFLAGS_JDKEXE
644CFLAGS_JDKLIB
645MACOSX_VERSION_MIN
646PACKAGE_PATH
647LEGACY_EXTRA_LDFLAGS
648LEGACY_EXTRA_CXXFLAGS
649LEGACY_EXTRA_CFLAGS
650CXX_FLAG_DEPS
651C_FLAG_DEPS
652CXX_O_FLAG_NONE
653CXX_O_FLAG_NORM
654CXX_O_FLAG_HI
655CXX_O_FLAG_HIGHEST
656C_O_FLAG_NONE
657C_O_FLAG_NORM
658C_O_FLAG_HI
659C_O_FLAG_HIGHEST
660POST_MCS_CMD
661POST_STRIP_CMD
662SET_EXECUTABLE_ORIGIN
663SET_SHARED_LIBRARY_ORIGIN
664CXX_FLAG_REORDER
665C_FLAG_REORDER
666SET_SHARED_LIBRARY_MAPFILE
667SET_SHARED_LIBRARY_NAME
668SHARED_LIBRARY_FLAGS
669EXE_SUFFIX
670STATIC_LIBRARY_SUFFIX
671SHARED_LIBRARY_SUFFIX
672LIBRARY_PREFIX
673STATIC_LIBRARY
674SHARED_LIBRARY
675OBJ_SUFFIX
676LIPO
677ac_ct_OBJDUMP
678OBJDUMP
679ac_ct_OBJCOPY
680OBJCOPY
681MCS
682STRIP
683NM
684AS
685CXXCPP
686CPP
687COMPILER_TYPE
688RC_FLAGS
689DUMPBIN
690WINAR
691HOTSPOT_RC
692HOTSPOT_MT
693RC
694MT
695WINLD
696HOTSPOT_LD
697HOTSPOT_CXX
698ARFLAGS
699AR
700LDEXECXX
701LDCXX
702LDEXE
703LD
704ac_ct_OBJC
705OBJCFLAGS
706OBJC
707ac_ct_CXX
708CXXFLAGS
709CXX
710ac_ct_PROPER_COMPILER_CXX
711PROPER_COMPILER_CXX
712POTENTIAL_CXX
713TOOLS_DIR_CXX
714OBJEXT
715EXEEXT
716ac_ct_CC
717CPPFLAGS
718LDFLAGS
719CFLAGS
720CC
721ac_ct_PROPER_COMPILER_CC
722PROPER_COMPILER_CC
723POTENTIAL_CC
724TOOLS_DIR_CC
725BUILD_LD
726BUILD_CXX
727BUILD_CC
728MSVCR_DLL
729DXSDK_INCLUDE_PATH
730DXSDK_LIB_PATH
731VS_PATH
732VS_LIB
733VS_INCLUDE
734CYGWIN_LINK
735AR_OUT_OPTION
736LD_OUT_OPTION
737EXE_OUT_OPTION
738CC_OUT_OPTION
739BUILD_HOTSPOT
740HOTSPOT_DIST
741BUILD_OUTPUT
742OVERRIDE_SRC_ROOT
743ADD_SRC_ROOT
744JDK_TOPDIR
745NASHORN_TOPDIR
746HOTSPOT_TOPDIR
747JAXWS_TOPDIR
748JAXP_TOPDIR
749CORBA_TOPDIR
750LANGTOOLS_TOPDIR
751BOOT_JDK_JVMARGS
752JAVAC_FLAGS
753BOOT_JDK_SOURCETARGET
754BOOT_JDK
755BOOT_TOOLSJAR
756BOOT_RTJAR
757JAVA_CHECK
758JAVAC_CHECK
759COOKED_BUILD_NUMBER
760JDK_VERSION
761COPYRIGHT_YEAR
762MACOSX_BUNDLE_ID_BASE
763MACOSX_BUNDLE_NAME_BASE
764COMPANY_NAME
765JDK_RC_PLATFORM_NAME
766PRODUCT_SUFFIX
767PRODUCT_NAME
768LAUNCHER_NAME
769MILESTONE
770JDK_BUILD_NUMBER
771JDK_UPDATE_VERSION
772JDK_MICRO_VERSION
773JDK_MINOR_VERSION
774JDK_MAJOR_VERSION
775USER_RELEASE_SUFFIX
776COMPRESS_JARS
777UNLIMITED_CRYPTO
778CACERTS_FILE
779TEST_IN_BUILD
780BUILD_HEADLESS
781SUPPORT_HEADFUL
782SUPPORT_HEADLESS
783BDEPS_FTP
784BDEPS_UNZIP
785OS_VERSION_MICRO
786OS_VERSION_MINOR
787OS_VERSION_MAJOR
788PKG_CONFIG
789XATTR
790TIME
791STAT
792HG
793READELF
794OTOOL
795LDD
796ZIP
797UNZIP
798FIND_DELETE
799MAKE
800CHECK_TOOLSDIR_MAKE
801CHECK_TOOLSDIR_GMAKE
802CHECK_MAKE
803CHECK_GMAKE
804PKGHANDLER
805OUTPUT_ROOT
806CONF_NAME
807SPEC
808BUILD_VARIANT_RELEASE
809DEBUG_CLASSFILES
810FASTDEBUG
811VARIANT
812DEBUG_LEVEL
813MACOSX_UNIVERSAL
814JVM_VARIANT_ZEROSHARK
815JVM_VARIANT_ZERO
816JVM_VARIANT_KERNEL
817JVM_VARIANT_MINIMAL1
818JVM_VARIANT_CLIENT
819JVM_VARIANT_SERVER
820JVM_VARIANTS
821JDK_VARIANT
822SET_OPENJDK
823BUILD_LOG_WRAPPER
824BUILD_LOG_PREVIOUS
825BUILD_LOG
826SYS_ROOT
827PATH_SEP
828SRC_ROOT
829DEFINE_CROSS_COMPILE_ARCH
830LP64
831OPENJDK_TARGET_OS_API_DIR
832OPENJDK_TARGET_CPU_JLI_CFLAGS
833OPENJDK_TARGET_CPU_OSARCH
834OPENJDK_TARGET_CPU_ISADIR
835OPENJDK_TARGET_CPU_LIBDIR
836OPENJDK_TARGET_CPU_LEGACY_LIB
837OPENJDK_TARGET_CPU_LEGACY
838REQUIRED_OS_VERSION
839REQUIRED_OS_NAME
840COMPILE_TYPE
841OPENJDK_TARGET_CPU_ENDIAN
842OPENJDK_TARGET_CPU_BITS
843OPENJDK_TARGET_CPU_ARCH
844OPENJDK_TARGET_CPU
845OPENJDK_TARGET_OS_API
846OPENJDK_TARGET_OS
847OPENJDK_BUILD_CPU_ENDIAN
848OPENJDK_BUILD_CPU_BITS
849OPENJDK_BUILD_CPU_ARCH
850OPENJDK_BUILD_CPU
851OPENJDK_BUILD_OS_API
852OPENJDK_BUILD_OS
853OPENJDK_BUILD_AUTOCONF_NAME
854OPENJDK_TARGET_AUTOCONF_NAME
855target_os
856target_vendor
857target_cpu
858target
859host_os
860host_vendor
861host_cpu
862host
863build_os
864build_vendor
865build_cpu
866build
867SETFILE
868DF
869READLINK
870CYGPATH
871NAWK
872SED
873FGREP
874EGREP
875GREP
876AWK
877XARGS
878WHICH
879WC
880UNIQ
881UNAME
882TR
883TOUCH
884TEE
885TAR
886TAIL
887SORT
888SH
889RM
890THEPWDCMD
891PRINTF
892MV
893MKTEMP
894MKDIR
895LS
896LN
897HEAD
898FIND
899FILE
900EXPR
901ECHO
902DIRNAME
903DIFF
904DATE
905CUT
906CPIO
907CP
908COMM
909CMP
910CHMOD
911CAT
912BASH
913BASENAME
914DATE_WHEN_CONFIGURED
915CONFIGURE_COMMAND_LINE
916CUSTOM_MAKE_DIR
917target_alias
918host_alias
919build_alias
920LIBS
921ECHO_T
922ECHO_N
923ECHO_C
924DEFS
925mandir
926localedir
927libdir
928psdir
929pdfdir
930dvidir
931htmldir
932infodir
933docdir
934oldincludedir
935includedir
936localstatedir
937sharedstatedir
938sysconfdir
939datadir
940datarootdir
941libexecdir
942sbindir
943bindir
944program_transform_name
945prefix
946exec_prefix
947PACKAGE_URL
948PACKAGE_BUGREPORT
949PACKAGE_STRING
950PACKAGE_VERSION
951PACKAGE_TARNAME
952PACKAGE_NAME
953PATH_SEPARATOR
954SHELL'
955ac_subst_files=''
956ac_user_opts='
957enable_option_checking
958with_custom_make_dir
959with_target_bits
960with_sys_root
961with_tools_dir
962with_devkit
963enable_openjdk_only
964with_jdk_variant
965with_jvm_variants
966enable_debug
967with_debug_level
968with_conf_name
969with_builddeps_conf
970with_builddeps_server
971with_builddeps_dir
972with_builddeps_group
973enable_headful
974enable_hotspot_test_in_build
975with_cacerts_file
976enable_unlimited_crypto
977with_milestone
978with_build_number
979with_user_release_suffix
980with_boot_jdk
981with_boot_jdk_jvmargs
982with_add_source_root
983with_override_source_root
984with_adds_and_overrides
985with_override_langtools
986with_override_corba
987with_override_jaxp
988with_override_jaxws
989with_override_hotspot
990with_override_jdk
991with_import_hotspot
992with_msvcr_dll
993with_dxsdk
994with_dxsdk_lib
995with_dxsdk_include
996with_extra_cflags
997with_extra_cxxflags
998with_extra_ldflags
999enable_debug_symbols
1000enable_zip_debug_info
1001enable_macosx_runtime_support
1002with_x
1003with_cups
1004with_cups_include
1005with_freetype
1006with_alsa
1007with_alsa_include
1008with_alsa_lib
1009with_giflib
1010with_zlib
1011with_stdc__lib
1012with_num_cores
1013with_memory_size
1014with_jobs
1015with_sjavac_server_java
1016with_sjavac_server_cores
1017enable_sjavac
1018enable_precompiled_headers
1019enable_ccache
1020with_ccache_dir
1021'
1022      ac_precious_vars='build_alias
1023host_alias
1024target_alias
1025PKG_CONFIG
1026CC
1027CFLAGS
1028LDFLAGS
1029LIBS
1030CPPFLAGS
1031CXX
1032CXXFLAGS
1033CCC
1034OBJC
1035OBJCFLAGS
1036CPP
1037CXXCPP
1038XMKMF
1039FREETYPE2_CFLAGS
1040FREETYPE2_LIBS
1041ALSA_CFLAGS
1042ALSA_LIBS'
1043
1044
1045# Initialize some variables set by options.
1046ac_init_help=
1047ac_init_version=false
1048ac_unrecognized_opts=
1049ac_unrecognized_sep=
1050# The variables have the same names as the options, with
1051# dashes changed to underlines.
1052cache_file=/dev/null
1053exec_prefix=NONE
1054no_create=
1055no_recursion=
1056prefix=NONE
1057program_prefix=NONE
1058program_suffix=NONE
1059program_transform_name=s,x,x,
1060silent=
1061site=
1062srcdir=
1063verbose=
1064x_includes=NONE
1065x_libraries=NONE
1066
1067# Installation directory options.
1068# These are left unexpanded so users can "make install exec_prefix=/foo"
1069# and all the variables that are supposed to be based on exec_prefix
1070# by default will actually change.
1071# Use braces instead of parens because sh, perl, etc. also accept them.
1072# (The list follows the same order as the GNU Coding Standards.)
1073bindir='${exec_prefix}/bin'
1074sbindir='${exec_prefix}/sbin'
1075libexecdir='${exec_prefix}/libexec'
1076datarootdir='${prefix}/share'
1077datadir='${datarootdir}'
1078sysconfdir='${prefix}/etc'
1079sharedstatedir='${prefix}/com'
1080localstatedir='${prefix}/var'
1081includedir='${prefix}/include'
1082oldincludedir='/usr/include'
1083docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1084infodir='${datarootdir}/info'
1085htmldir='${docdir}'
1086dvidir='${docdir}'
1087pdfdir='${docdir}'
1088psdir='${docdir}'
1089libdir='${exec_prefix}/lib'
1090localedir='${datarootdir}/locale'
1091mandir='${datarootdir}/man'
1092
1093ac_prev=
1094ac_dashdash=
1095for ac_option
1096do
1097  # If the previous option needs an argument, assign it.
1098  if test -n "$ac_prev"; then
1099    eval $ac_prev=\$ac_option
1100    ac_prev=
1101    continue
1102  fi
1103
1104  case $ac_option in
1105  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1106  *=)   ac_optarg= ;;
1107  *)    ac_optarg=yes ;;
1108  esac
1109
1110  # Accept the important Cygnus configure options, so we can diagnose typos.
1111
1112  case $ac_dashdash$ac_option in
1113  --)
1114    ac_dashdash=yes ;;
1115
1116  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1117    ac_prev=bindir ;;
1118  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1119    bindir=$ac_optarg ;;
1120
1121  -build | --build | --buil | --bui | --bu)
1122    ac_prev=build_alias ;;
1123  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1124    build_alias=$ac_optarg ;;
1125
1126  -cache-file | --cache-file | --cache-fil | --cache-fi \
1127  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1128    ac_prev=cache_file ;;
1129  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1130  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1131    cache_file=$ac_optarg ;;
1132
1133  --config-cache | -C)
1134    cache_file=config.cache ;;
1135
1136  -datadir | --datadir | --datadi | --datad)
1137    ac_prev=datadir ;;
1138  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1139    datadir=$ac_optarg ;;
1140
1141  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1142  | --dataroo | --dataro | --datar)
1143    ac_prev=datarootdir ;;
1144  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1145  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1146    datarootdir=$ac_optarg ;;
1147
1148  -disable-* | --disable-*)
1149    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1150    # Reject names that are not valid shell variable names.
1151    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1152      as_fn_error $? "invalid feature name: $ac_useropt"
1153    ac_useropt_orig=$ac_useropt
1154    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1155    case $ac_user_opts in
1156      *"
1157"enable_$ac_useropt"
1158"*) ;;
1159      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1160	 ac_unrecognized_sep=', ';;
1161    esac
1162    eval enable_$ac_useropt=no ;;
1163
1164  -docdir | --docdir | --docdi | --doc | --do)
1165    ac_prev=docdir ;;
1166  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1167    docdir=$ac_optarg ;;
1168
1169  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1170    ac_prev=dvidir ;;
1171  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1172    dvidir=$ac_optarg ;;
1173
1174  -enable-* | --enable-*)
1175    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1176    # Reject names that are not valid shell variable names.
1177    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1178      as_fn_error $? "invalid feature name: $ac_useropt"
1179    ac_useropt_orig=$ac_useropt
1180    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1181    case $ac_user_opts in
1182      *"
1183"enable_$ac_useropt"
1184"*) ;;
1185      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1186	 ac_unrecognized_sep=', ';;
1187    esac
1188    eval enable_$ac_useropt=\$ac_optarg ;;
1189
1190  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1191  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1192  | --exec | --exe | --ex)
1193    ac_prev=exec_prefix ;;
1194  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1195  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1196  | --exec=* | --exe=* | --ex=*)
1197    exec_prefix=$ac_optarg ;;
1198
1199  -gas | --gas | --ga | --g)
1200    # Obsolete; use --with-gas.
1201    with_gas=yes ;;
1202
1203  -help | --help | --hel | --he | -h)
1204    ac_init_help=long ;;
1205  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1206    ac_init_help=recursive ;;
1207  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1208    ac_init_help=short ;;
1209
1210  -host | --host | --hos | --ho)
1211    ac_prev=host_alias ;;
1212  -host=* | --host=* | --hos=* | --ho=*)
1213    host_alias=$ac_optarg ;;
1214
1215  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1216    ac_prev=htmldir ;;
1217  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1218  | --ht=*)
1219    htmldir=$ac_optarg ;;
1220
1221  -includedir | --includedir | --includedi | --included | --include \
1222  | --includ | --inclu | --incl | --inc)
1223    ac_prev=includedir ;;
1224  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1225  | --includ=* | --inclu=* | --incl=* | --inc=*)
1226    includedir=$ac_optarg ;;
1227
1228  -infodir | --infodir | --infodi | --infod | --info | --inf)
1229    ac_prev=infodir ;;
1230  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1231    infodir=$ac_optarg ;;
1232
1233  -libdir | --libdir | --libdi | --libd)
1234    ac_prev=libdir ;;
1235  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1236    libdir=$ac_optarg ;;
1237
1238  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1239  | --libexe | --libex | --libe)
1240    ac_prev=libexecdir ;;
1241  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1242  | --libexe=* | --libex=* | --libe=*)
1243    libexecdir=$ac_optarg ;;
1244
1245  -localedir | --localedir | --localedi | --localed | --locale)
1246    ac_prev=localedir ;;
1247  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1248    localedir=$ac_optarg ;;
1249
1250  -localstatedir | --localstatedir | --localstatedi | --localstated \
1251  | --localstate | --localstat | --localsta | --localst | --locals)
1252    ac_prev=localstatedir ;;
1253  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1254  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1255    localstatedir=$ac_optarg ;;
1256
1257  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1258    ac_prev=mandir ;;
1259  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1260    mandir=$ac_optarg ;;
1261
1262  -nfp | --nfp | --nf)
1263    # Obsolete; use --without-fp.
1264    with_fp=no ;;
1265
1266  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1267  | --no-cr | --no-c | -n)
1268    no_create=yes ;;
1269
1270  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1271  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1272    no_recursion=yes ;;
1273
1274  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1275  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1276  | --oldin | --oldi | --old | --ol | --o)
1277    ac_prev=oldincludedir ;;
1278  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1279  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1280  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1281    oldincludedir=$ac_optarg ;;
1282
1283  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1284    ac_prev=prefix ;;
1285  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1286    prefix=$ac_optarg ;;
1287
1288  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1289  | --program-pre | --program-pr | --program-p)
1290    ac_prev=program_prefix ;;
1291  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1292  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1293    program_prefix=$ac_optarg ;;
1294
1295  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1296  | --program-suf | --program-su | --program-s)
1297    ac_prev=program_suffix ;;
1298  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1299  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1300    program_suffix=$ac_optarg ;;
1301
1302  -program-transform-name | --program-transform-name \
1303  | --program-transform-nam | --program-transform-na \
1304  | --program-transform-n | --program-transform- \
1305  | --program-transform | --program-transfor \
1306  | --program-transfo | --program-transf \
1307  | --program-trans | --program-tran \
1308  | --progr-tra | --program-tr | --program-t)
1309    ac_prev=program_transform_name ;;
1310  -program-transform-name=* | --program-transform-name=* \
1311  | --program-transform-nam=* | --program-transform-na=* \
1312  | --program-transform-n=* | --program-transform-=* \
1313  | --program-transform=* | --program-transfor=* \
1314  | --program-transfo=* | --program-transf=* \
1315  | --program-trans=* | --program-tran=* \
1316  | --progr-tra=* | --program-tr=* | --program-t=*)
1317    program_transform_name=$ac_optarg ;;
1318
1319  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1320    ac_prev=pdfdir ;;
1321  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1322    pdfdir=$ac_optarg ;;
1323
1324  -psdir | --psdir | --psdi | --psd | --ps)
1325    ac_prev=psdir ;;
1326  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1327    psdir=$ac_optarg ;;
1328
1329  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1330  | -silent | --silent | --silen | --sile | --sil)
1331    silent=yes ;;
1332
1333  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1334    ac_prev=sbindir ;;
1335  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1336  | --sbi=* | --sb=*)
1337    sbindir=$ac_optarg ;;
1338
1339  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1340  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1341  | --sharedst | --shareds | --shared | --share | --shar \
1342  | --sha | --sh)
1343    ac_prev=sharedstatedir ;;
1344  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1345  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1346  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1347  | --sha=* | --sh=*)
1348    sharedstatedir=$ac_optarg ;;
1349
1350  -site | --site | --sit)
1351    ac_prev=site ;;
1352  -site=* | --site=* | --sit=*)
1353    site=$ac_optarg ;;
1354
1355  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1356    ac_prev=srcdir ;;
1357  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1358    srcdir=$ac_optarg ;;
1359
1360  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1361  | --syscon | --sysco | --sysc | --sys | --sy)
1362    ac_prev=sysconfdir ;;
1363  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1364  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1365    sysconfdir=$ac_optarg ;;
1366
1367  -target | --target | --targe | --targ | --tar | --ta | --t)
1368    ac_prev=target_alias ;;
1369  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1370    target_alias=$ac_optarg ;;
1371
1372  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1373    verbose=yes ;;
1374
1375  -version | --version | --versio | --versi | --vers | -V)
1376    ac_init_version=: ;;
1377
1378  -with-* | --with-*)
1379    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1380    # Reject names that are not valid shell variable names.
1381    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1382      as_fn_error $? "invalid package name: $ac_useropt"
1383    ac_useropt_orig=$ac_useropt
1384    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1385    case $ac_user_opts in
1386      *"
1387"with_$ac_useropt"
1388"*) ;;
1389      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1390	 ac_unrecognized_sep=', ';;
1391    esac
1392    eval with_$ac_useropt=\$ac_optarg ;;
1393
1394  -without-* | --without-*)
1395    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1396    # Reject names that are not valid shell variable names.
1397    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1398      as_fn_error $? "invalid package name: $ac_useropt"
1399    ac_useropt_orig=$ac_useropt
1400    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1401    case $ac_user_opts in
1402      *"
1403"with_$ac_useropt"
1404"*) ;;
1405      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1406	 ac_unrecognized_sep=', ';;
1407    esac
1408    eval with_$ac_useropt=no ;;
1409
1410  --x)
1411    # Obsolete; use --with-x.
1412    with_x=yes ;;
1413
1414  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1415  | --x-incl | --x-inc | --x-in | --x-i)
1416    ac_prev=x_includes ;;
1417  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1418  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1419    x_includes=$ac_optarg ;;
1420
1421  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1422  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1423    ac_prev=x_libraries ;;
1424  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1425  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1426    x_libraries=$ac_optarg ;;
1427
1428  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1429Try \`$0 --help' for more information"
1430    ;;
1431
1432  *=*)
1433    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1434    # Reject names that are not valid shell variable names.
1435    case $ac_envvar in #(
1436      '' | [0-9]* | *[!_$as_cr_alnum]* )
1437      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1438    esac
1439    eval $ac_envvar=\$ac_optarg
1440    export $ac_envvar ;;
1441
1442  *)
1443    # FIXME: should be removed in autoconf 3.0.
1444    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1445    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1446      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1447    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1448    ;;
1449
1450  esac
1451done
1452
1453if test -n "$ac_prev"; then
1454  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1455  as_fn_error $? "missing argument to $ac_option"
1456fi
1457
1458if test -n "$ac_unrecognized_opts"; then
1459  case $enable_option_checking in
1460    no) ;;
1461    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1462    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1463  esac
1464fi
1465
1466# Check all directory arguments for consistency.
1467for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1468		datadir sysconfdir sharedstatedir localstatedir includedir \
1469		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1470		libdir localedir mandir
1471do
1472  eval ac_val=\$$ac_var
1473  # Remove trailing slashes.
1474  case $ac_val in
1475    */ )
1476      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1477      eval $ac_var=\$ac_val;;
1478  esac
1479  # Be sure to have absolute directory names.
1480  case $ac_val in
1481    [\\/$]* | ?:[\\/]* )  continue;;
1482    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1483  esac
1484  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1485done
1486
1487# There might be people who depend on the old broken behavior: `$host'
1488# used to hold the argument of --host etc.
1489# FIXME: To remove some day.
1490build=$build_alias
1491host=$host_alias
1492target=$target_alias
1493
1494# FIXME: To remove some day.
1495if test "x$host_alias" != x; then
1496  if test "x$build_alias" = x; then
1497    cross_compiling=maybe
1498    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1499    If a cross compiler is detected then cross compile mode will be used" >&2
1500  elif test "x$build_alias" != "x$host_alias"; then
1501    cross_compiling=yes
1502  fi
1503fi
1504
1505ac_tool_prefix=
1506test -n "$host_alias" && ac_tool_prefix=$host_alias-
1507
1508test "$silent" = yes && exec 6>/dev/null
1509
1510
1511ac_pwd=`pwd` && test -n "$ac_pwd" &&
1512ac_ls_di=`ls -di .` &&
1513ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1514  as_fn_error $? "working directory cannot be determined"
1515test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1516  as_fn_error $? "pwd does not report name of working directory"
1517
1518
1519# Find the source files, if location was not specified.
1520if test -z "$srcdir"; then
1521  ac_srcdir_defaulted=yes
1522  # Try the directory containing this script, then the parent directory.
1523  ac_confdir=`$as_dirname -- "$as_myself" ||
1524$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1525	 X"$as_myself" : 'X\(//\)[^/]' \| \
1526	 X"$as_myself" : 'X\(//\)$' \| \
1527	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1528$as_echo X"$as_myself" |
1529    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1530	    s//\1/
1531	    q
1532	  }
1533	  /^X\(\/\/\)[^/].*/{
1534	    s//\1/
1535	    q
1536	  }
1537	  /^X\(\/\/\)$/{
1538	    s//\1/
1539	    q
1540	  }
1541	  /^X\(\/\).*/{
1542	    s//\1/
1543	    q
1544	  }
1545	  s/.*/./; q'`
1546  srcdir=$ac_confdir
1547  if test ! -r "$srcdir/$ac_unique_file"; then
1548    srcdir=..
1549  fi
1550else
1551  ac_srcdir_defaulted=no
1552fi
1553if test ! -r "$srcdir/$ac_unique_file"; then
1554  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1555  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1556fi
1557ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1558ac_abs_confdir=`(
1559	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1560	pwd)`
1561# When building in place, set srcdir=.
1562if test "$ac_abs_confdir" = "$ac_pwd"; then
1563  srcdir=.
1564fi
1565# Remove unnecessary trailing slashes from srcdir.
1566# Double slashes in file names in object file debugging info
1567# mess up M-x gdb in Emacs.
1568case $srcdir in
1569*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1570esac
1571for ac_var in $ac_precious_vars; do
1572  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1573  eval ac_env_${ac_var}_value=\$${ac_var}
1574  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1575  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1576done
1577
1578#
1579# Report the --help message.
1580#
1581if test "$ac_init_help" = "long"; then
1582  # Omit some internal or obsolete options to make the list less imposing.
1583  # This message is too long to be a string in the A/UX 3.1 sh.
1584  cat <<_ACEOF
1585\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1586
1587Usage: $0 [OPTION]... [VAR=VALUE]...
1588
1589To assign environment variables (e.g., CC, CFLAGS...), specify them as
1590VAR=VALUE.  See below for descriptions of some of the useful variables.
1591
1592Defaults for the options are specified in brackets.
1593
1594Configuration:
1595  -h, --help              display this help and exit
1596      --help=short        display options specific to this package
1597      --help=recursive    display the short help of all the included packages
1598  -V, --version           display version information and exit
1599  -q, --quiet, --silent   do not print \`checking ...' messages
1600      --cache-file=FILE   cache test results in FILE [disabled]
1601  -C, --config-cache      alias for \`--cache-file=config.cache'
1602  -n, --no-create         do not create output files
1603      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1604
1605Installation directories:
1606  --prefix=PREFIX         install architecture-independent files in PREFIX
1607                          [$ac_default_prefix]
1608  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1609                          [PREFIX]
1610
1611By default, \`make install' will install all the files in
1612\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1613an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1614for instance \`--prefix=\$HOME'.
1615
1616For better control, use the options below.
1617
1618Fine tuning of the installation directories:
1619  --bindir=DIR            user executables [EPREFIX/bin]
1620  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1621  --libexecdir=DIR        program executables [EPREFIX/libexec]
1622  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1623  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1624  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1625  --libdir=DIR            object code libraries [EPREFIX/lib]
1626  --includedir=DIR        C header files [PREFIX/include]
1627  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1628  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1629  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1630  --infodir=DIR           info documentation [DATAROOTDIR/info]
1631  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1632  --mandir=DIR            man documentation [DATAROOTDIR/man]
1633  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1634  --htmldir=DIR           html documentation [DOCDIR]
1635  --dvidir=DIR            dvi documentation [DOCDIR]
1636  --pdfdir=DIR            pdf documentation [DOCDIR]
1637  --psdir=DIR             ps documentation [DOCDIR]
1638_ACEOF
1639
1640  cat <<\_ACEOF
1641
1642X features:
1643  --x-includes=DIR    X include files are in DIR
1644  --x-libraries=DIR   X library files are in DIR
1645
1646System types:
1647  --build=BUILD     configure for building on BUILD [guessed]
1648  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1649  --target=TARGET   configure for building compilers for TARGET [HOST]
1650_ACEOF
1651fi
1652
1653if test -n "$ac_init_help"; then
1654  case $ac_init_help in
1655     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1656   esac
1657  cat <<\_ACEOF
1658
1659Optional Features:
1660  --disable-option-checking  ignore unrecognized --enable/--with options
1661  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1662  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1663  --enable-openjdk-only   suppress building custom source even if present
1664                          [disabled]
1665  --enable-debug          set the debug level to fastdebug (shorthand for
1666                          --with-debug-level=fastdebug) [disabled]
1667  --disable-headful       disable building headful support (graphical UI
1668                          support) [enabled]
1669  --enable-hotspot-test-in-build
1670                          run the Queens test after Hotspot build [disabled]
1671  --enable-unlimited-crypto
1672                          Enable unlimited crypto policy [disabled]
1673  --disable-debug-symbols disable generation of debug symbols [enabled]
1674  --disable-zip-debug-info
1675                          disable zipping of debug-info files [enabled]
1676  --disable-macosx-runtime-support
1677                          disable the use of MacOSX Java runtime support
1678                          framework [enabled]
1679  --enable-sjavac         use sjavac to do fast incremental compiles
1680                          [disabled]
1681  --disable-precompiled-headers
1682                          disable using precompiled headers when compiling C++
1683                          [enabled]
1684  --disable-ccache        disable using ccache to speed up recompilations
1685                          [enabled]
1686
1687Optional Packages:
1688  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1689  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1690  --with-custom-make-dir  use this directory for custom build/make files
1691  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1692                          support it), e.g. --with-target-bits=32 [guessed]
1693  --with-sys-root         pass this sys-root to the compilers and tools (for
1694                          cross-compiling)
1695  --with-tools-dir        search this directory for compilers and tools (for
1696                          cross-compiling)
1697  --with-devkit           use this directory as base for tools-dir and
1698                          sys-root (for cross-compiling)
1699  --with-jdk-variant      JDK variant to build (normal) [normal]
1700  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1701                          client, minimal1, kernel, zero, zeroshark) [server]
1702  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1703                          [release]
1704  --with-conf-name        use this as the name of the configuration [generated
1705                          from important configuration options]
1706  --with-builddeps-conf   use this configuration file for the builddeps
1707  --with-builddeps-server download and use build dependencies from this server
1708                          url
1709  --with-builddeps-dir    store downloaded build dependencies here
1710                          [/localhome/builddeps]
1711  --with-builddeps-group  chgrp the downloaded build dependencies to this
1712                          group
1713  --with-cacerts-file     specify alternative cacerts file
1714  --with-milestone        Set milestone value for build [internal]
1715  --with-build-number     Set build number value for build [b00]
1716  --with-user-release-suffix
1717                          Add a custom string to the version string if build
1718                          number isn't set.[username_builddateb00]
1719  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1720  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1721                          invocations of the Boot JDK, overriding the default
1722                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1723                          -enableassertions"
1724  --with-add-source-root  for each and every source directory, look in this
1725                          additional source root for the same directory; if it
1726                          exists and have files in it, include it in the build
1727  --with-override-source-root
1728                          for each and every source directory, look in this
1729                          override source root for the same directory; if it
1730                          exists, use that directory instead and ignore the
1731                          directory in the original source root
1732  --with-adds-and-overrides
1733                          use the subdirs 'adds' and 'overrides' in the
1734                          specified directory as add-source-root and
1735                          override-source-root
1736  --with-override-langtools
1737                          use this langtools dir for the build
1738  --with-override-corba   use this corba dir for the build
1739  --with-override-jaxp    use this jaxp dir for the build
1740  --with-override-jaxws   use this jaxws dir for the build
1741  --with-override-hotspot use this hotspot dir for the build
1742  --with-override-jdk     use this jdk dir for the build
1743  --with-import-hotspot   import hotspot binaries from this jdk image or
1744                          hotspot build dist dir instead of building from
1745                          source
1746  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1747                          only) [probed]
1748  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1749  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1750                          [probed]
1751  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1752                          [probed]
1753  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1754  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1755  --with-extra-ldflags    extra flags to be used when linking jdk
1756  --with-x                use the X Window System
1757  --with-cups             specify prefix directory for the cups package
1758                          (expecting the headers under PATH/include)
1759  --with-cups-include     specify directory for the cups include files
1760  --with-freetype         specify prefix directory for the freetype2 package
1761                          (expecting the libraries under PATH/lib and the
1762                          headers under PATH/include)
1763  --with-alsa             specify prefix directory for the alsa package
1764                          (expecting the libraries under PATH/lib and the
1765                          headers under PATH/include)
1766  --with-alsa-include     specify directory for the alsa include files
1767  --with-alsa-lib         specify directory for the alsa library
1768  --with-giflib           use giflib from build system or OpenJDK source
1769                          (system, bundled) [bundled]
1770  --with-zlib             use zlib from build system or OpenJDK source
1771                          (system, bundled) [bundled]
1772  --with-stdc++lib=<static>,<dynamic>,<default>
1773                          force linking of the C++ runtime on Linux to either
1774                          static or dynamic, default is static with dynamic as
1775                          fallback
1776  --with-num-cores        number of cores in the build system, e.g.
1777                          --with-num-cores=8 [probed]
1778  --with-memory-size      memory (in MB) available in the build system, e.g.
1779                          --with-memory-size=1024 [probed]
1780  --with-jobs             number of parallel jobs to let make run [calculated
1781                          based on cores and memory]
1782  --with-sjavac-server-java
1783                          use this java binary for running the sjavac
1784                          background server [Boot JDK java]
1785  --with-sjavac-server-cores
1786                          use at most this number of concurrent threads on the
1787                          sjavac server [probed]
1788  --with-ccache-dir       where to store ccache files [~/.ccache]
1789
1790Some influential environment variables:
1791  PKG_CONFIG  path to pkg-config utility
1792  CC          C compiler command
1793  CFLAGS      C compiler flags
1794  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1795              nonstandard directory <lib dir>
1796  LIBS        libraries to pass to the linker, e.g. -l<library>
1797  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1798              you have headers in a nonstandard directory <include dir>
1799  CXX         C++ compiler command
1800  CXXFLAGS    C++ compiler flags
1801  OBJC        Objective C compiler command
1802  OBJCFLAGS   Objective C compiler flags
1803  CPP         C preprocessor
1804  CXXCPP      C++ preprocessor
1805  XMKMF       Path to xmkmf, Makefile generator for X Window System
1806  FREETYPE2_CFLAGS
1807              C compiler flags for FREETYPE2, overriding pkg-config
1808  FREETYPE2_LIBS
1809              linker flags for FREETYPE2, overriding pkg-config
1810  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1811  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1812
1813Use these variables to override the choices made by `configure' or to help
1814it to find libraries and programs with nonstandard names/locations.
1815
1816Report bugs to <build-dev@openjdk.java.net>.
1817OpenJDK home page: <http://openjdk.java.net>.
1818_ACEOF
1819ac_status=$?
1820fi
1821
1822if test "$ac_init_help" = "recursive"; then
1823  # If there are subdirs, report their specific --help.
1824  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1825    test -d "$ac_dir" ||
1826      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1827      continue
1828    ac_builddir=.
1829
1830case "$ac_dir" in
1831.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1832*)
1833  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1834  # A ".." for each directory in $ac_dir_suffix.
1835  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1836  case $ac_top_builddir_sub in
1837  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1838  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1839  esac ;;
1840esac
1841ac_abs_top_builddir=$ac_pwd
1842ac_abs_builddir=$ac_pwd$ac_dir_suffix
1843# for backward compatibility:
1844ac_top_builddir=$ac_top_build_prefix
1845
1846case $srcdir in
1847  .)  # We are building in place.
1848    ac_srcdir=.
1849    ac_top_srcdir=$ac_top_builddir_sub
1850    ac_abs_top_srcdir=$ac_pwd ;;
1851  [\\/]* | ?:[\\/]* )  # Absolute name.
1852    ac_srcdir=$srcdir$ac_dir_suffix;
1853    ac_top_srcdir=$srcdir
1854    ac_abs_top_srcdir=$srcdir ;;
1855  *) # Relative name.
1856    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1857    ac_top_srcdir=$ac_top_build_prefix$srcdir
1858    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1859esac
1860ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1861
1862    cd "$ac_dir" || { ac_status=$?; continue; }
1863    # Check for guested configure.
1864    if test -f "$ac_srcdir/configure.gnu"; then
1865      echo &&
1866      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1867    elif test -f "$ac_srcdir/configure"; then
1868      echo &&
1869      $SHELL "$ac_srcdir/configure" --help=recursive
1870    else
1871      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1872    fi || ac_status=$?
1873    cd "$ac_pwd" || { ac_status=$?; break; }
1874  done
1875fi
1876
1877test -n "$ac_init_help" && exit $ac_status
1878if $ac_init_version; then
1879  cat <<\_ACEOF
1880OpenJDK configure jdk8
1881generated by GNU Autoconf 2.67
1882
1883Copyright (C) 2010 Free Software Foundation, Inc.
1884This configure script is free software; the Free Software Foundation
1885gives unlimited permission to copy, distribute and modify it.
1886_ACEOF
1887  exit
1888fi
1889
1890## ------------------------ ##
1891## Autoconf initialization. ##
1892## ------------------------ ##
1893
1894# ac_fn_c_try_compile LINENO
1895# --------------------------
1896# Try to compile conftest.$ac_ext, and return whether this succeeded.
1897ac_fn_c_try_compile ()
1898{
1899  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1900  rm -f conftest.$ac_objext
1901  if { { ac_try="$ac_compile"
1902case "(($ac_try" in
1903  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1904  *) ac_try_echo=$ac_try;;
1905esac
1906eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1907$as_echo "$ac_try_echo"; } >&5
1908  (eval "$ac_compile") 2>conftest.err
1909  ac_status=$?
1910  if test -s conftest.err; then
1911    grep -v '^ *+' conftest.err >conftest.er1
1912    cat conftest.er1 >&5
1913    mv -f conftest.er1 conftest.err
1914  fi
1915  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1916  test $ac_status = 0; } && {
1917	 test -z "$ac_c_werror_flag" ||
1918	 test ! -s conftest.err
1919       } && test -s conftest.$ac_objext; then :
1920  ac_retval=0
1921else
1922  $as_echo "$as_me: failed program was:" >&5
1923sed 's/^/| /' conftest.$ac_ext >&5
1924
1925	ac_retval=1
1926fi
1927  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1928  as_fn_set_status $ac_retval
1929
1930} # ac_fn_c_try_compile
1931
1932# ac_fn_cxx_try_compile LINENO
1933# ----------------------------
1934# Try to compile conftest.$ac_ext, and return whether this succeeded.
1935ac_fn_cxx_try_compile ()
1936{
1937  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938  rm -f conftest.$ac_objext
1939  if { { ac_try="$ac_compile"
1940case "(($ac_try" in
1941  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1942  *) ac_try_echo=$ac_try;;
1943esac
1944eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1945$as_echo "$ac_try_echo"; } >&5
1946  (eval "$ac_compile") 2>conftest.err
1947  ac_status=$?
1948  if test -s conftest.err; then
1949    grep -v '^ *+' conftest.err >conftest.er1
1950    cat conftest.er1 >&5
1951    mv -f conftest.er1 conftest.err
1952  fi
1953  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1954  test $ac_status = 0; } && {
1955	 test -z "$ac_cxx_werror_flag" ||
1956	 test ! -s conftest.err
1957       } && test -s conftest.$ac_objext; then :
1958  ac_retval=0
1959else
1960  $as_echo "$as_me: failed program was:" >&5
1961sed 's/^/| /' conftest.$ac_ext >&5
1962
1963	ac_retval=1
1964fi
1965  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1966  as_fn_set_status $ac_retval
1967
1968} # ac_fn_cxx_try_compile
1969
1970# ac_fn_objc_try_compile LINENO
1971# -----------------------------
1972# Try to compile conftest.$ac_ext, and return whether this succeeded.
1973ac_fn_objc_try_compile ()
1974{
1975  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1976  rm -f conftest.$ac_objext
1977  if { { ac_try="$ac_compile"
1978case "(($ac_try" in
1979  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1980  *) ac_try_echo=$ac_try;;
1981esac
1982eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1983$as_echo "$ac_try_echo"; } >&5
1984  (eval "$ac_compile") 2>conftest.err
1985  ac_status=$?
1986  if test -s conftest.err; then
1987    grep -v '^ *+' conftest.err >conftest.er1
1988    cat conftest.er1 >&5
1989    mv -f conftest.er1 conftest.err
1990  fi
1991  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1992  test $ac_status = 0; } && {
1993	 test -z "$ac_objc_werror_flag" ||
1994	 test ! -s conftest.err
1995       } && test -s conftest.$ac_objext; then :
1996  ac_retval=0
1997else
1998  $as_echo "$as_me: failed program was:" >&5
1999sed 's/^/| /' conftest.$ac_ext >&5
2000
2001	ac_retval=1
2002fi
2003  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2004  as_fn_set_status $ac_retval
2005
2006} # ac_fn_objc_try_compile
2007
2008# ac_fn_c_try_cpp LINENO
2009# ----------------------
2010# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2011ac_fn_c_try_cpp ()
2012{
2013  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014  if { { ac_try="$ac_cpp conftest.$ac_ext"
2015case "(($ac_try" in
2016  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2017  *) ac_try_echo=$ac_try;;
2018esac
2019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2020$as_echo "$ac_try_echo"; } >&5
2021  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2022  ac_status=$?
2023  if test -s conftest.err; then
2024    grep -v '^ *+' conftest.err >conftest.er1
2025    cat conftest.er1 >&5
2026    mv -f conftest.er1 conftest.err
2027  fi
2028  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2029  test $ac_status = 0; } > conftest.i && {
2030	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2031	 test ! -s conftest.err
2032       }; then :
2033  ac_retval=0
2034else
2035  $as_echo "$as_me: failed program was:" >&5
2036sed 's/^/| /' conftest.$ac_ext >&5
2037
2038    ac_retval=1
2039fi
2040  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2041  as_fn_set_status $ac_retval
2042
2043} # ac_fn_c_try_cpp
2044
2045# ac_fn_cxx_try_cpp LINENO
2046# ------------------------
2047# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2048ac_fn_cxx_try_cpp ()
2049{
2050  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2051  if { { ac_try="$ac_cpp conftest.$ac_ext"
2052case "(($ac_try" in
2053  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2054  *) ac_try_echo=$ac_try;;
2055esac
2056eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2057$as_echo "$ac_try_echo"; } >&5
2058  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2059  ac_status=$?
2060  if test -s conftest.err; then
2061    grep -v '^ *+' conftest.err >conftest.er1
2062    cat conftest.er1 >&5
2063    mv -f conftest.er1 conftest.err
2064  fi
2065  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2066  test $ac_status = 0; } > conftest.i && {
2067	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2068	 test ! -s conftest.err
2069       }; then :
2070  ac_retval=0
2071else
2072  $as_echo "$as_me: failed program was:" >&5
2073sed 's/^/| /' conftest.$ac_ext >&5
2074
2075    ac_retval=1
2076fi
2077  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2078  as_fn_set_status $ac_retval
2079
2080} # ac_fn_cxx_try_cpp
2081
2082# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2083# ---------------------------------------------------------
2084# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2085# the include files in INCLUDES and setting the cache variable VAR
2086# accordingly.
2087ac_fn_cxx_check_header_mongrel ()
2088{
2089  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2090  if eval "test \"\${$3+set}\"" = set; then :
2091  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2092$as_echo_n "checking for $2... " >&6; }
2093if eval "test \"\${$3+set}\"" = set; then :
2094  $as_echo_n "(cached) " >&6
2095fi
2096eval ac_res=\$$3
2097	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2098$as_echo "$ac_res" >&6; }
2099else
2100  # Is the header compilable?
2101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2102$as_echo_n "checking $2 usability... " >&6; }
2103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104/* end confdefs.h.  */
2105$4
2106#include <$2>
2107_ACEOF
2108if ac_fn_cxx_try_compile "$LINENO"; then :
2109  ac_header_compiler=yes
2110else
2111  ac_header_compiler=no
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2115$as_echo "$ac_header_compiler" >&6; }
2116
2117# Is the header present?
2118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2119$as_echo_n "checking $2 presence... " >&6; }
2120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h.  */
2122#include <$2>
2123_ACEOF
2124if ac_fn_cxx_try_cpp "$LINENO"; then :
2125  ac_header_preproc=yes
2126else
2127  ac_header_preproc=no
2128fi
2129rm -f conftest.err conftest.i conftest.$ac_ext
2130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2131$as_echo "$ac_header_preproc" >&6; }
2132
2133# So?  What about this header?
2134case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2135  yes:no: )
2136    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2137$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2138    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2139$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2140    ;;
2141  no:yes:* )
2142    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2143$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2144    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2145$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2146    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2147$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2148    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2149$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2150    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2151$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2152( $as_echo "## ----------------------------------------- ##
2153## Report this to build-dev@openjdk.java.net ##
2154## ----------------------------------------- ##"
2155     ) | sed "s/^/$as_me: WARNING:     /" >&2
2156    ;;
2157esac
2158  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2159$as_echo_n "checking for $2... " >&6; }
2160if eval "test \"\${$3+set}\"" = set; then :
2161  $as_echo_n "(cached) " >&6
2162else
2163  eval "$3=\$ac_header_compiler"
2164fi
2165eval ac_res=\$$3
2166	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2167$as_echo "$ac_res" >&6; }
2168fi
2169  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2170
2171} # ac_fn_cxx_check_header_mongrel
2172
2173# ac_fn_cxx_try_run LINENO
2174# ------------------------
2175# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2176# that executables *can* be run.
2177ac_fn_cxx_try_run ()
2178{
2179  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2180  if { { ac_try="$ac_link"
2181case "(($ac_try" in
2182  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2183  *) ac_try_echo=$ac_try;;
2184esac
2185eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2186$as_echo "$ac_try_echo"; } >&5
2187  (eval "$ac_link") 2>&5
2188  ac_status=$?
2189  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2190  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2191  { { case "(($ac_try" in
2192  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2193  *) ac_try_echo=$ac_try;;
2194esac
2195eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2196$as_echo "$ac_try_echo"; } >&5
2197  (eval "$ac_try") 2>&5
2198  ac_status=$?
2199  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2200  test $ac_status = 0; }; }; then :
2201  ac_retval=0
2202else
2203  $as_echo "$as_me: program exited with status $ac_status" >&5
2204       $as_echo "$as_me: failed program was:" >&5
2205sed 's/^/| /' conftest.$ac_ext >&5
2206
2207       ac_retval=$ac_status
2208fi
2209  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2210  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2211  as_fn_set_status $ac_retval
2212
2213} # ac_fn_cxx_try_run
2214
2215# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2216# ---------------------------------------------------------
2217# Tests whether HEADER exists and can be compiled using the include files in
2218# INCLUDES, setting the cache variable VAR accordingly.
2219ac_fn_cxx_check_header_compile ()
2220{
2221  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2223$as_echo_n "checking for $2... " >&6; }
2224if eval "test \"\${$3+set}\"" = set; then :
2225  $as_echo_n "(cached) " >&6
2226else
2227  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2228/* end confdefs.h.  */
2229$4
2230#include <$2>
2231_ACEOF
2232if ac_fn_cxx_try_compile "$LINENO"; then :
2233  eval "$3=yes"
2234else
2235  eval "$3=no"
2236fi
2237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2238fi
2239eval ac_res=\$$3
2240	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2241$as_echo "$ac_res" >&6; }
2242  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2243
2244} # ac_fn_cxx_check_header_compile
2245
2246# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2247# ----------------------------------------------
2248# Tries to find the compile-time value of EXPR in a program that includes
2249# INCLUDES, setting VAR accordingly. Returns whether the value could be
2250# computed
2251ac_fn_cxx_compute_int ()
2252{
2253  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2254  if test "$cross_compiling" = yes; then
2255    # Depending upon the size, compute the lo and hi bounds.
2256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2257/* end confdefs.h.  */
2258$4
2259int
2260main ()
2261{
2262static int test_array [1 - 2 * !(($2) >= 0)];
2263test_array [0] = 0
2264
2265  ;
2266  return 0;
2267}
2268_ACEOF
2269if ac_fn_cxx_try_compile "$LINENO"; then :
2270  ac_lo=0 ac_mid=0
2271  while :; do
2272    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2273/* end confdefs.h.  */
2274$4
2275int
2276main ()
2277{
2278static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2279test_array [0] = 0
2280
2281  ;
2282  return 0;
2283}
2284_ACEOF
2285if ac_fn_cxx_try_compile "$LINENO"; then :
2286  ac_hi=$ac_mid; break
2287else
2288  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2289			if test $ac_lo -le $ac_mid; then
2290			  ac_lo= ac_hi=
2291			  break
2292			fi
2293			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2294fi
2295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296  done
2297else
2298  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2299/* end confdefs.h.  */
2300$4
2301int
2302main ()
2303{
2304static int test_array [1 - 2 * !(($2) < 0)];
2305test_array [0] = 0
2306
2307  ;
2308  return 0;
2309}
2310_ACEOF
2311if ac_fn_cxx_try_compile "$LINENO"; then :
2312  ac_hi=-1 ac_mid=-1
2313  while :; do
2314    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315/* end confdefs.h.  */
2316$4
2317int
2318main ()
2319{
2320static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2321test_array [0] = 0
2322
2323  ;
2324  return 0;
2325}
2326_ACEOF
2327if ac_fn_cxx_try_compile "$LINENO"; then :
2328  ac_lo=$ac_mid; break
2329else
2330  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2331			if test $ac_mid -le $ac_hi; then
2332			  ac_lo= ac_hi=
2333			  break
2334			fi
2335			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2336fi
2337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2338  done
2339else
2340  ac_lo= ac_hi=
2341fi
2342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2343fi
2344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2345# Binary search between lo and hi bounds.
2346while test "x$ac_lo" != "x$ac_hi"; do
2347  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2349/* end confdefs.h.  */
2350$4
2351int
2352main ()
2353{
2354static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2355test_array [0] = 0
2356
2357  ;
2358  return 0;
2359}
2360_ACEOF
2361if ac_fn_cxx_try_compile "$LINENO"; then :
2362  ac_hi=$ac_mid
2363else
2364  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2365fi
2366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2367done
2368case $ac_lo in #((
2369?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2370'') ac_retval=1 ;;
2371esac
2372  else
2373    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2374/* end confdefs.h.  */
2375$4
2376static long int longval () { return $2; }
2377static unsigned long int ulongval () { return $2; }
2378#include <stdio.h>
2379#include <stdlib.h>
2380int
2381main ()
2382{
2383
2384  FILE *f = fopen ("conftest.val", "w");
2385  if (! f)
2386    return 1;
2387  if (($2) < 0)
2388    {
2389      long int i = longval ();
2390      if (i != ($2))
2391	return 1;
2392      fprintf (f, "%ld", i);
2393    }
2394  else
2395    {
2396      unsigned long int i = ulongval ();
2397      if (i != ($2))
2398	return 1;
2399      fprintf (f, "%lu", i);
2400    }
2401  /* Do not output a trailing newline, as this causes \r\n confusion
2402     on some platforms.  */
2403  return ferror (f) || fclose (f) != 0;
2404
2405  ;
2406  return 0;
2407}
2408_ACEOF
2409if ac_fn_cxx_try_run "$LINENO"; then :
2410  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2411else
2412  ac_retval=1
2413fi
2414rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2415  conftest.$ac_objext conftest.beam conftest.$ac_ext
2416rm -f conftest.val
2417
2418  fi
2419  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2420  as_fn_set_status $ac_retval
2421
2422} # ac_fn_cxx_compute_int
2423
2424# ac_fn_cxx_try_link LINENO
2425# -------------------------
2426# Try to link conftest.$ac_ext, and return whether this succeeded.
2427ac_fn_cxx_try_link ()
2428{
2429  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2430  rm -f conftest.$ac_objext conftest$ac_exeext
2431  if { { ac_try="$ac_link"
2432case "(($ac_try" in
2433  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2434  *) ac_try_echo=$ac_try;;
2435esac
2436eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2437$as_echo "$ac_try_echo"; } >&5
2438  (eval "$ac_link") 2>conftest.err
2439  ac_status=$?
2440  if test -s conftest.err; then
2441    grep -v '^ *+' conftest.err >conftest.er1
2442    cat conftest.er1 >&5
2443    mv -f conftest.er1 conftest.err
2444  fi
2445  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2446  test $ac_status = 0; } && {
2447	 test -z "$ac_cxx_werror_flag" ||
2448	 test ! -s conftest.err
2449       } && test -s conftest$ac_exeext && {
2450	 test "$cross_compiling" = yes ||
2451	 $as_test_x conftest$ac_exeext
2452       }; then :
2453  ac_retval=0
2454else
2455  $as_echo "$as_me: failed program was:" >&5
2456sed 's/^/| /' conftest.$ac_ext >&5
2457
2458	ac_retval=1
2459fi
2460  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2461  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2462  # interfere with the next link command; also delete a directory that is
2463  # left behind by Apple's compiler.  We do this before executing the actions.
2464  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2465  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2466  as_fn_set_status $ac_retval
2467
2468} # ac_fn_cxx_try_link
2469
2470# ac_fn_cxx_check_func LINENO FUNC VAR
2471# ------------------------------------
2472# Tests whether FUNC exists, setting the cache variable VAR accordingly
2473ac_fn_cxx_check_func ()
2474{
2475  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2477$as_echo_n "checking for $2... " >&6; }
2478if eval "test \"\${$3+set}\"" = set; then :
2479  $as_echo_n "(cached) " >&6
2480else
2481  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2482/* end confdefs.h.  */
2483/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2484   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2485#define $2 innocuous_$2
2486
2487/* System header to define __stub macros and hopefully few prototypes,
2488    which can conflict with char $2 (); below.
2489    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2490    <limits.h> exists even on freestanding compilers.  */
2491
2492#ifdef __STDC__
2493# include <limits.h>
2494#else
2495# include <assert.h>
2496#endif
2497
2498#undef $2
2499
2500/* Override any GCC internal prototype to avoid an error.
2501   Use char because int might match the return type of a GCC
2502   builtin and then its argument prototype would still apply.  */
2503#ifdef __cplusplus
2504extern "C"
2505#endif
2506char $2 ();
2507/* The GNU C library defines this for functions which it implements
2508    to always fail with ENOSYS.  Some functions are actually named
2509    something starting with __ and the normal name is an alias.  */
2510#if defined __stub_$2 || defined __stub___$2
2511choke me
2512#endif
2513
2514int
2515main ()
2516{
2517return $2 ();
2518  ;
2519  return 0;
2520}
2521_ACEOF
2522if ac_fn_cxx_try_link "$LINENO"; then :
2523  eval "$3=yes"
2524else
2525  eval "$3=no"
2526fi
2527rm -f core conftest.err conftest.$ac_objext \
2528    conftest$ac_exeext conftest.$ac_ext
2529fi
2530eval ac_res=\$$3
2531	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2532$as_echo "$ac_res" >&6; }
2533  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2534
2535} # ac_fn_cxx_check_func
2536
2537# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2538# -------------------------------------------------------
2539# Tests whether HEADER exists and can be compiled using the include files in
2540# INCLUDES, setting the cache variable VAR accordingly.
2541ac_fn_c_check_header_compile ()
2542{
2543  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2545$as_echo_n "checking for $2... " >&6; }
2546if eval "test \"\${$3+set}\"" = set; then :
2547  $as_echo_n "(cached) " >&6
2548else
2549  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2550/* end confdefs.h.  */
2551$4
2552#include <$2>
2553_ACEOF
2554if ac_fn_c_try_compile "$LINENO"; then :
2555  eval "$3=yes"
2556else
2557  eval "$3=no"
2558fi
2559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2560fi
2561eval ac_res=\$$3
2562	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2563$as_echo "$ac_res" >&6; }
2564  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2565
2566} # ac_fn_c_check_header_compile
2567cat >config.log <<_ACEOF
2568This file contains any messages produced by compilers while
2569running configure, to aid debugging if configure makes a mistake.
2570
2571It was created by OpenJDK $as_me jdk8, which was
2572generated by GNU Autoconf 2.67.  Invocation command line was
2573
2574  $ $0 $@
2575
2576_ACEOF
2577exec 5>>config.log
2578{
2579cat <<_ASUNAME
2580## --------- ##
2581## Platform. ##
2582## --------- ##
2583
2584hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2585uname -m = `(uname -m) 2>/dev/null || echo unknown`
2586uname -r = `(uname -r) 2>/dev/null || echo unknown`
2587uname -s = `(uname -s) 2>/dev/null || echo unknown`
2588uname -v = `(uname -v) 2>/dev/null || echo unknown`
2589
2590/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2591/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2592
2593/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2594/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2595/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2596/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2597/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2598/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2599/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2600
2601_ASUNAME
2602
2603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2604for as_dir in $PATH
2605do
2606  IFS=$as_save_IFS
2607  test -z "$as_dir" && as_dir=.
2608    $as_echo "PATH: $as_dir"
2609  done
2610IFS=$as_save_IFS
2611
2612} >&5
2613
2614cat >&5 <<_ACEOF
2615
2616
2617## ----------- ##
2618## Core tests. ##
2619## ----------- ##
2620
2621_ACEOF
2622
2623
2624# Keep a trace of the command line.
2625# Strip out --no-create and --no-recursion so they do not pile up.
2626# Strip out --silent because we don't want to record it for future runs.
2627# Also quote any args containing shell meta-characters.
2628# Make two passes to allow for proper duplicate-argument suppression.
2629ac_configure_args=
2630ac_configure_args0=
2631ac_configure_args1=
2632ac_must_keep_next=false
2633for ac_pass in 1 2
2634do
2635  for ac_arg
2636  do
2637    case $ac_arg in
2638    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2639    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2640    | -silent | --silent | --silen | --sile | --sil)
2641      continue ;;
2642    *\'*)
2643      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2644    esac
2645    case $ac_pass in
2646    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2647    2)
2648      as_fn_append ac_configure_args1 " '$ac_arg'"
2649      if test $ac_must_keep_next = true; then
2650	ac_must_keep_next=false # Got value, back to normal.
2651      else
2652	case $ac_arg in
2653	  *=* | --config-cache | -C | -disable-* | --disable-* \
2654	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2655	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2656	  | -with-* | --with-* | -without-* | --without-* | --x)
2657	    case "$ac_configure_args0 " in
2658	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2659	    esac
2660	    ;;
2661	  -* ) ac_must_keep_next=true ;;
2662	esac
2663      fi
2664      as_fn_append ac_configure_args " '$ac_arg'"
2665      ;;
2666    esac
2667  done
2668done
2669{ ac_configure_args0=; unset ac_configure_args0;}
2670{ ac_configure_args1=; unset ac_configure_args1;}
2671
2672# When interrupted or exit'd, cleanup temporary files, and complete
2673# config.log.  We remove comments because anyway the quotes in there
2674# would cause problems or look ugly.
2675# WARNING: Use '\'' to represent an apostrophe within the trap.
2676# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2677trap 'exit_status=$?
2678  # Save into config.log some information that might help in debugging.
2679  {
2680    echo
2681
2682    $as_echo "## ---------------- ##
2683## Cache variables. ##
2684## ---------------- ##"
2685    echo
2686    # The following way of writing the cache mishandles newlines in values,
2687(
2688  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2689    eval ac_val=\$$ac_var
2690    case $ac_val in #(
2691    *${as_nl}*)
2692      case $ac_var in #(
2693      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2694$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2695      esac
2696      case $ac_var in #(
2697      _ | IFS | as_nl) ;; #(
2698      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2699      *) { eval $ac_var=; unset $ac_var;} ;;
2700      esac ;;
2701    esac
2702  done
2703  (set) 2>&1 |
2704    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2705    *${as_nl}ac_space=\ *)
2706      sed -n \
2707	"s/'\''/'\''\\\\'\'''\''/g;
2708	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2709      ;; #(
2710    *)
2711      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2712      ;;
2713    esac |
2714    sort
2715)
2716    echo
2717
2718    $as_echo "## ----------------- ##
2719## Output variables. ##
2720## ----------------- ##"
2721    echo
2722    for ac_var in $ac_subst_vars
2723    do
2724      eval ac_val=\$$ac_var
2725      case $ac_val in
2726      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2727      esac
2728      $as_echo "$ac_var='\''$ac_val'\''"
2729    done | sort
2730    echo
2731
2732    if test -n "$ac_subst_files"; then
2733      $as_echo "## ------------------- ##
2734## File substitutions. ##
2735## ------------------- ##"
2736      echo
2737      for ac_var in $ac_subst_files
2738      do
2739	eval ac_val=\$$ac_var
2740	case $ac_val in
2741	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2742	esac
2743	$as_echo "$ac_var='\''$ac_val'\''"
2744      done | sort
2745      echo
2746    fi
2747
2748    if test -s confdefs.h; then
2749      $as_echo "## ----------- ##
2750## confdefs.h. ##
2751## ----------- ##"
2752      echo
2753      cat confdefs.h
2754      echo
2755    fi
2756    test "$ac_signal" != 0 &&
2757      $as_echo "$as_me: caught signal $ac_signal"
2758    $as_echo "$as_me: exit $exit_status"
2759  } >&5
2760  rm -f core *.core core.conftest.* &&
2761    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2762    exit $exit_status
2763' 0
2764for ac_signal in 1 2 13 15; do
2765  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2766done
2767ac_signal=0
2768
2769# confdefs.h avoids OS command line length limits that DEFS can exceed.
2770rm -f -r conftest* confdefs.h
2771
2772$as_echo "/* confdefs.h */" > confdefs.h
2773
2774# Predefined preprocessor variables.
2775
2776cat >>confdefs.h <<_ACEOF
2777#define PACKAGE_NAME "$PACKAGE_NAME"
2778_ACEOF
2779
2780cat >>confdefs.h <<_ACEOF
2781#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2782_ACEOF
2783
2784cat >>confdefs.h <<_ACEOF
2785#define PACKAGE_VERSION "$PACKAGE_VERSION"
2786_ACEOF
2787
2788cat >>confdefs.h <<_ACEOF
2789#define PACKAGE_STRING "$PACKAGE_STRING"
2790_ACEOF
2791
2792cat >>confdefs.h <<_ACEOF
2793#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2794_ACEOF
2795
2796cat >>confdefs.h <<_ACEOF
2797#define PACKAGE_URL "$PACKAGE_URL"
2798_ACEOF
2799
2800
2801# Let the site file select an alternate cache file if it wants to.
2802# Prefer an explicitly selected file to automatically selected ones.
2803ac_site_file1=NONE
2804ac_site_file2=NONE
2805if test -n "$CONFIG_SITE"; then
2806  # We do not want a PATH search for config.site.
2807  case $CONFIG_SITE in #((
2808    -*)  ac_site_file1=./$CONFIG_SITE;;
2809    */*) ac_site_file1=$CONFIG_SITE;;
2810    *)   ac_site_file1=./$CONFIG_SITE;;
2811  esac
2812elif test "x$prefix" != xNONE; then
2813  ac_site_file1=$prefix/share/config.site
2814  ac_site_file2=$prefix/etc/config.site
2815else
2816  ac_site_file1=$ac_default_prefix/share/config.site
2817  ac_site_file2=$ac_default_prefix/etc/config.site
2818fi
2819for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2820do
2821  test "x$ac_site_file" = xNONE && continue
2822  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2823    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2824$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2825    sed 's/^/| /' "$ac_site_file" >&5
2826    . "$ac_site_file" \
2827      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2829as_fn_error $? "failed to load site script $ac_site_file
2830See \`config.log' for more details" "$LINENO" 5 ; }
2831  fi
2832done
2833
2834if test -r "$cache_file"; then
2835  # Some versions of bash will fail to source /dev/null (special files
2836  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2837  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2838    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2839$as_echo "$as_me: loading cache $cache_file" >&6;}
2840    case $cache_file in
2841      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2842      *)                      . "./$cache_file";;
2843    esac
2844  fi
2845else
2846  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2847$as_echo "$as_me: creating cache $cache_file" >&6;}
2848  >$cache_file
2849fi
2850
2851# Check that the precious variables saved in the cache have kept the same
2852# value.
2853ac_cache_corrupted=false
2854for ac_var in $ac_precious_vars; do
2855  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2856  eval ac_new_set=\$ac_env_${ac_var}_set
2857  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2858  eval ac_new_val=\$ac_env_${ac_var}_value
2859  case $ac_old_set,$ac_new_set in
2860    set,)
2861      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2862$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2863      ac_cache_corrupted=: ;;
2864    ,set)
2865      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2866$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2867      ac_cache_corrupted=: ;;
2868    ,);;
2869    *)
2870      if test "x$ac_old_val" != "x$ac_new_val"; then
2871	# differences in whitespace do not lead to failure.
2872	ac_old_val_w=`echo x $ac_old_val`
2873	ac_new_val_w=`echo x $ac_new_val`
2874	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2875	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2876$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2877	  ac_cache_corrupted=:
2878	else
2879	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2880$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2881	  eval $ac_var=\$ac_old_val
2882	fi
2883	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2884$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2885	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2886$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2887      fi;;
2888  esac
2889  # Pass precious variables to config.status.
2890  if test "$ac_new_set" = set; then
2891    case $ac_new_val in
2892    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2893    *) ac_arg=$ac_var=$ac_new_val ;;
2894    esac
2895    case " $ac_configure_args " in
2896      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2897      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2898    esac
2899  fi
2900done
2901if $ac_cache_corrupted; then
2902  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2904  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2905$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2906  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2907fi
2908## -------------------- ##
2909## Main body of script. ##
2910## -------------------- ##
2911
2912ac_ext=c
2913ac_cpp='$CPP $CPPFLAGS'
2914ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2915ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2916ac_compiler_gnu=$ac_cv_c_compiler_gnu
2917
2918
2919
2920ac_aux_dir=
2921for ac_dir in build-aux "$srcdir"/build-aux; do
2922  if test -f "$ac_dir/install-sh"; then
2923    ac_aux_dir=$ac_dir
2924    ac_install_sh="$ac_aux_dir/install-sh -c"
2925    break
2926  elif test -f "$ac_dir/install.sh"; then
2927    ac_aux_dir=$ac_dir
2928    ac_install_sh="$ac_aux_dir/install.sh -c"
2929    break
2930  elif test -f "$ac_dir/shtool"; then
2931    ac_aux_dir=$ac_dir
2932    ac_install_sh="$ac_aux_dir/shtool install -c"
2933    break
2934  fi
2935done
2936if test -z "$ac_aux_dir"; then
2937  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2938fi
2939
2940# These three variables are undocumented and unsupported,
2941# and are intended to be withdrawn in a future Autoconf release.
2942# They can cause serious problems if a builder's source tree is in a directory
2943# whose full name contains unusual characters.
2944ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2945ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2946ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2947
2948
2949# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2950
2951#
2952# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2953# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2954#
2955# This code is free software; you can redistribute it and/or modify it
2956# under the terms of the GNU General Public License version 2 only, as
2957# published by the Free Software Foundation.  Oracle designates this
2958# particular file as subject to the "Classpath" exception as provided
2959# by Oracle in the LICENSE file that accompanied this code.
2960#
2961# This code is distributed in the hope that it will be useful, but WITHOUT
2962# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2963# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2964# version 2 for more details (a copy is included in the LICENSE file that
2965# accompanied this code).
2966#
2967# You should have received a copy of the GNU General Public License version
2968# 2 along with this work; if not, write to the Free Software Foundation,
2969# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2970#
2971# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2972# or visit www.oracle.com if you need additional information or have any
2973# questions.
2974#
2975
2976#
2977# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2978#
2979# This program is free software; you can redistribute it and/or modify
2980# it under the terms of the GNU General Public License as published by
2981# the Free Software Foundation; either version 2 of the License, or
2982# (at your option) any later version.
2983#
2984# This program is distributed in the hope that it will be useful, but
2985# WITHOUT ANY WARRANTY; without even the implied warranty of
2986# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2987# General Public License for more details.
2988#
2989# You should have received a copy of the GNU General Public License
2990# along with this program; if not, write to the Free Software
2991# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2992#
2993# As a special exception to the GNU General Public License, if you
2994# distribute this file as part of a program that contains a
2995# configuration script generated by Autoconf, you may include it under
2996# the same distribution terms that you use for the rest of that program.
2997
2998# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2999# ----------------------------------
3000# PKG_PROG_PKG_CONFIG
3001
3002# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3003#
3004# Check to see whether a particular set of modules exists.  Similar
3005# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3006#
3007#
3008# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3009# this or PKG_CHECK_MODULES is called, or make sure to call
3010# PKG_CHECK_EXISTS manually
3011# --------------------------------------------------------------
3012
3013
3014
3015# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3016# ---------------------------------------------
3017# _PKG_CONFIG
3018
3019# _PKG_SHORT_ERRORS_SUPPORTED
3020# -----------------------------
3021# _PKG_SHORT_ERRORS_SUPPORTED
3022
3023
3024# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3025# [ACTION-IF-NOT-FOUND])
3026#
3027#
3028# Note that if there is a possibility the first call to
3029# PKG_CHECK_MODULES might not happen, you should be sure to include an
3030# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3031#
3032#
3033# --------------------------------------------------------------
3034# PKG_CHECK_MODULES
3035
3036
3037# Include these first...
3038#
3039# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3040# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3041#
3042# This code is free software; you can redistribute it and/or modify it
3043# under the terms of the GNU General Public License version 2 only, as
3044# published by the Free Software Foundation.  Oracle designates this
3045# particular file as subject to the "Classpath" exception as provided
3046# by Oracle in the LICENSE file that accompanied this code.
3047#
3048# This code is distributed in the hope that it will be useful, but WITHOUT
3049# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3050# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3051# version 2 for more details (a copy is included in the LICENSE file that
3052# accompanied this code).
3053#
3054# You should have received a copy of the GNU General Public License version
3055# 2 along with this work; if not, write to the Free Software Foundation,
3056# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3057#
3058# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3059# or visit www.oracle.com if you need additional information or have any
3060# questions.
3061#
3062
3063
3064
3065# This will make sure the given variable points to a full and proper
3066# path. This means:
3067# 1) There will be no spaces in the path. On posix platforms,
3068#    spaces in the path will result in an error. On Windows,
3069#    the path will be rewritten using short-style to be space-free.
3070# 2) The path will be absolute, and it will be in unix-style (on
3071#     cygwin).
3072# $1: The name of the variable to fix
3073
3074
3075# This will make sure the given variable points to a executable
3076# with a full and proper path. This means:
3077# 1) There will be no spaces in the path. On posix platforms,
3078#    spaces in the path will result in an error. On Windows,
3079#    the path will be rewritten using short-style to be space-free.
3080# 2) The path will be absolute, and it will be in unix-style (on
3081#     cygwin).
3082# Any arguments given to the executable is preserved.
3083# If the input variable does not have a directory specification, then
3084# it need to be in the PATH.
3085# $1: The name of the variable to fix
3086
3087
3088
3089
3090
3091
3092# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3093# $1: variable to check
3094# $2: executable name to print in warning (optional)
3095
3096
3097# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3098# Arguments as AC_PATH_PROG:
3099# $1: variable to set
3100# $2: executable name to look for
3101
3102
3103# Setup the most fundamental tools that relies on not much else to set up,
3104# but is used by much of the early bootstrap code.
3105
3106
3107# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3108
3109
3110
3111
3112
3113
3114
3115#%%% Simple tools %%%
3116
3117# Check if we have found a usable version of make
3118# $1: the path to a potential make binary (or empty)
3119# $2: the description on how we found this
3120
3121
3122# Goes looking for a usable version of GNU make.
3123
3124
3125
3126
3127
3128
3129# Check if build directory is on local disk. If not possible to determine,
3130# we prefer to claim it's local.
3131# Argument 1: directory to test
3132# Argument 2: what to do if it is on local disk
3133# Argument 3: what to do otherwise (remote disk or failure)
3134
3135
3136# Check that source files have basic read permissions set. This might
3137# not be the case in cygwin in certain conditions.
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# Helper function which possibly converts a path using DOS-style short mode.
3172# If so, the updated path is stored in $new_path.
3173# $1: The path to check
3174
3175
3176# Helper function which possibly converts a path using DOS-style short mode.
3177# If so, the updated path is stored in $new_path.
3178# $1: The path to check
3179
3180
3181# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3182# and could probably be heavily simplified. However, all changes in this
3183# area tend to need lot of testing in different scenarios, and in lack of
3184# proper unit testing, cleaning this up has not been deemed worth the effort
3185# at the moment.
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3196
3197
3198
3199
3200#
3201# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3202# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3203#
3204# This code is free software; you can redistribute it and/or modify it
3205# under the terms of the GNU General Public License version 2 only, as
3206# published by the Free Software Foundation.  Oracle designates this
3207# particular file as subject to the "Classpath" exception as provided
3208# by Oracle in the LICENSE file that accompanied this code.
3209#
3210# This code is distributed in the hope that it will be useful, but WITHOUT
3211# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3212# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3213# version 2 for more details (a copy is included in the LICENSE file that
3214# accompanied this code).
3215#
3216# You should have received a copy of the GNU General Public License version
3217# 2 along with this work; if not, write to the Free Software Foundation,
3218# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3219#
3220# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3221# or visit www.oracle.com if you need additional information or have any
3222# questions.
3223#
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235# ... then the rest
3236#
3237# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3238# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3239#
3240# This code is free software; you can redistribute it and/or modify it
3241# under the terms of the GNU General Public License version 2 only, as
3242# published by the Free Software Foundation.  Oracle designates this
3243# particular file as subject to the "Classpath" exception as provided
3244# by Oracle in the LICENSE file that accompanied this code.
3245#
3246# This code is distributed in the hope that it will be useful, but WITHOUT
3247# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3248# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3249# version 2 for more details (a copy is included in the LICENSE file that
3250# accompanied this code).
3251#
3252# You should have received a copy of the GNU General Public License version
3253# 2 along with this work; if not, write to the Free Software Foundation,
3254# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3255#
3256# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3257# or visit www.oracle.com if you need additional information or have any
3258# questions.
3259#
3260
3261# Execute the check given as argument, and verify the result
3262# If the Boot JDK was previously found, do nothing
3263# $1 A command line (typically autoconf macro) to execute
3264
3265
3266# Test: Is bootjdk explicitely set by command line arguments?
3267
3268
3269# Test: Is bootjdk available from builddeps?
3270
3271
3272# Test: Is $JAVA_HOME set?
3273
3274
3275# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3276
3277
3278# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3279
3280
3281# Look for a jdk in the given path. If there are multiple, try to select the newest.
3282# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3283# $1 = Path to directory containing jdk installations.
3284# $2 = String to append to the found JDK directory to get the proper JDK home
3285
3286
3287# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3288# environmental variable as base for where to look.
3289# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3290
3291
3292# Test: Is there a JDK installed in default, well-known locations?
3293
3294
3295# Check that a command-line tool in the Boot JDK is correct
3296# $1 = name of variable to assign
3297# $2 = name of binary
3298
3299
3300###############################################################################
3301#
3302# We need a Boot JDK to bootstrap the build.
3303#
3304
3305
3306
3307
3308
3309#
3310# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3311# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3312#
3313# This code is free software; you can redistribute it and/or modify it
3314# under the terms of the GNU General Public License version 2 only, as
3315# published by the Free Software Foundation.  Oracle designates this
3316# particular file as subject to the "Classpath" exception as provided
3317# by Oracle in the LICENSE file that accompanied this code.
3318#
3319# This code is distributed in the hope that it will be useful, but WITHOUT
3320# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3321# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3322# version 2 for more details (a copy is included in the LICENSE file that
3323# accompanied this code).
3324#
3325# You should have received a copy of the GNU General Public License version
3326# 2 along with this work; if not, write to the Free Software Foundation,
3327# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3328#
3329# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3330# or visit www.oracle.com if you need additional information or have any
3331# questions.
3332#
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353#
3354# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3355# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3356#
3357# This code is free software; you can redistribute it and/or modify it
3358# under the terms of the GNU General Public License version 2 only, as
3359# published by the Free Software Foundation.  Oracle designates this
3360# particular file as subject to the "Classpath" exception as provided
3361# by Oracle in the LICENSE file that accompanied this code.
3362#
3363# This code is distributed in the hope that it will be useful, but WITHOUT
3364# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3365# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3366# version 2 for more details (a copy is included in the LICENSE file that
3367# accompanied this code).
3368#
3369# You should have received a copy of the GNU General Public License version
3370# 2 along with this work; if not, write to the Free Software Foundation,
3371# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3372#
3373# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3374# or visit www.oracle.com if you need additional information or have any
3375# questions.
3376#
3377
3378
3379
3380
3381
3382cygwin_help() {
3383    case $1 in
3384    unzip)
3385        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3386    zip)
3387        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3388    make)
3389        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3390    * )
3391       break ;;
3392    esac
3393}
3394
3395apt_help() {
3396    case $1 in
3397    devkit)
3398        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3399    openjdk)
3400        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3401    alsa)
3402        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3403    cups)
3404        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3405    freetype2)
3406        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3407    pulse)
3408        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3409    x11)
3410        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3411    ccache)
3412        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3413    * )
3414       break ;;
3415    esac
3416}
3417
3418yum_help() {
3419    case $1 in
3420    devkit)
3421        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3422    openjdk)
3423        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3424    alsa)
3425        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3426    cups)
3427        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3428    freetype2)
3429        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3430    pulse)
3431        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3432    x11)
3433        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3434    ccache)
3435        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3436    * )
3437       break ;;
3438    esac
3439}
3440
3441port_help() {
3442    PKGHANDLER_COMMAND=""
3443}
3444
3445pkgutil_help() {
3446    PKGHANDLER_COMMAND=""
3447}
3448
3449pkgadd_help() {
3450    PKGHANDLER_COMMAND=""
3451}
3452
3453
3454
3455#
3456# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3457# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3458#
3459# This code is free software; you can redistribute it and/or modify it
3460# under the terms of the GNU General Public License version 2 only, as
3461# published by the Free Software Foundation.  Oracle designates this
3462# particular file as subject to the "Classpath" exception as provided
3463# by Oracle in the LICENSE file that accompanied this code.
3464#
3465# This code is distributed in the hope that it will be useful, but WITHOUT
3466# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3467# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3468# version 2 for more details (a copy is included in the LICENSE file that
3469# accompanied this code).
3470#
3471# You should have received a copy of the GNU General Public License version
3472# 2 along with this work; if not, write to the Free Software Foundation,
3473# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3474#
3475# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3476# or visit www.oracle.com if you need additional information or have any
3477# questions.
3478#
3479
3480
3481
3482
3483
3484
3485
3486
3487###############################################################################
3488#
3489# Should we build only OpenJDK even if closed sources are present?
3490#
3491
3492
3493
3494
3495###############################################################################
3496#
3497# Setup version numbers
3498#
3499
3500
3501
3502
3503
3504
3505# Support for customization of the build process. Some build files
3506# will include counterparts from this location, if they exist. This allows
3507# for a degree of customization of the build targets and the rules/recipes
3508# to create them
3509
3510# Check whether --with-custom-make-dir was given.
3511if test "${with_custom_make_dir+set}" = set; then :
3512  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3513fi
3514
3515
3516
3517#
3518# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3519# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3520#
3521# This code is free software; you can redistribute it and/or modify it
3522# under the terms of the GNU General Public License version 2 only, as
3523# published by the Free Software Foundation.  Oracle designates this
3524# particular file as subject to the "Classpath" exception as provided
3525# by Oracle in the LICENSE file that accompanied this code.
3526#
3527# This code is distributed in the hope that it will be useful, but WITHOUT
3528# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3529# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3530# version 2 for more details (a copy is included in the LICENSE file that
3531# accompanied this code).
3532#
3533# You should have received a copy of the GNU General Public License version
3534# 2 along with this work; if not, write to the Free Software Foundation,
3535# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3536#
3537# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3538# or visit www.oracle.com if you need additional information or have any
3539# questions.
3540#
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556#
3557# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3558# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3559#
3560# This code is free software; you can redistribute it and/or modify it
3561# under the terms of the GNU General Public License version 2 only, as
3562# published by the Free Software Foundation.  Oracle designates this
3563# particular file as subject to the "Classpath" exception as provided
3564# by Oracle in the LICENSE file that accompanied this code.
3565#
3566# This code is distributed in the hope that it will be useful, but WITHOUT
3567# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3568# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3569# version 2 for more details (a copy is included in the LICENSE file that
3570# accompanied this code).
3571#
3572# You should have received a copy of the GNU General Public License version
3573# 2 along with this work; if not, write to the Free Software Foundation,
3574# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3575#
3576# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3577# or visit www.oracle.com if you need additional information or have any
3578# questions.
3579#
3580
3581# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3582# Converts autoconf style CPU name to OpenJDK style, into
3583# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3584
3585
3586# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3587# Converts autoconf style OS name to OpenJDK style, into
3588# VAR_OS and VAR_OS_API.
3589
3590
3591# Expects $host_os $host_cpu $build_os and $build_cpu
3592# and $with_target_bits to have been setup!
3593#
3594# Translate the standard triplet(quadruplet) definition
3595# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3596# OPENJDK_BUILD_OS, etc.
3597
3598
3599# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3600# accordingly. Must be done after setting up build and target system, but before
3601# doing anything else with these values.
3602
3603
3604    # Setup the legacy variables, for controlling the old makefiles.
3605    #
3606
3607
3608
3609
3610#%%% Build and target systems %%%
3611
3612
3613
3614
3615# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3616# Add -mX to various FLAGS variables.
3617
3618
3619
3620
3621
3622
3623#
3624# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3625# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3626#
3627# This code is free software; you can redistribute it and/or modify it
3628# under the terms of the GNU General Public License version 2 only, as
3629# published by the Free Software Foundation.  Oracle designates this
3630# particular file as subject to the "Classpath" exception as provided
3631# by Oracle in the LICENSE file that accompanied this code.
3632#
3633# This code is distributed in the hope that it will be useful, but WITHOUT
3634# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3635# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3636# version 2 for more details (a copy is included in the LICENSE file that
3637# accompanied this code).
3638#
3639# You should have received a copy of the GNU General Public License version
3640# 2 along with this work; if not, write to the Free Software Foundation,
3641# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3642#
3643# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3644# or visit www.oracle.com if you need additional information or have any
3645# questions.
3646#
3647
3648
3649
3650
3651
3652
3653
3654
3655#
3656# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3657# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3658#
3659# This code is free software; you can redistribute it and/or modify it
3660# under the terms of the GNU General Public License version 2 only, as
3661# published by the Free Software Foundation.  Oracle designates this
3662# particular file as subject to the "Classpath" exception as provided
3663# by Oracle in the LICENSE file that accompanied this code.
3664#
3665# This code is distributed in the hope that it will be useful, but WITHOUT
3666# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3667# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3668# version 2 for more details (a copy is included in the LICENSE file that
3669# accompanied this code).
3670#
3671# You should have received a copy of the GNU General Public License version
3672# 2 along with this work; if not, write to the Free Software Foundation,
3673# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3674#
3675# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3676# or visit www.oracle.com if you need additional information or have any
3677# questions.
3678#
3679
3680# $1 = compiler to test (CC or CXX)
3681# $2 = human readable name of compiler (C or C++)
3682
3683
3684
3685
3686
3687# $1 = compiler to test (CC or CXX)
3688# $2 = human readable name of compiler (C or C++)
3689# $3 = list of compiler names to search for
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702#
3703# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3704# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3705#
3706# This code is free software; you can redistribute it and/or modify it
3707# under the terms of the GNU General Public License version 2 only, as
3708# published by the Free Software Foundation.  Oracle designates this
3709# particular file as subject to the "Classpath" exception as provided
3710# by Oracle in the LICENSE file that accompanied this code.
3711#
3712# This code is distributed in the hope that it will be useful, but WITHOUT
3713# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3714# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3715# version 2 for more details (a copy is included in the LICENSE file that
3716# accompanied this code).
3717#
3718# You should have received a copy of the GNU General Public License version
3719# 2 along with this work; if not, write to the Free Software Foundation,
3720# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3721#
3722# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3723# or visit www.oracle.com if you need additional information or have any
3724# questions.
3725#
3726
3727
3728
3729
3730
3731
3732
3733# Check if the VS env variables were setup prior to running configure.
3734# If not, then find vcvarsall.bat and run it automatically, and integrate
3735# the set env variables into the spec file.
3736
3737
3738
3739# Setup the DXSDK paths
3740
3741
3742
3743
3744
3745
3746# This line needs to be here, verbatim, after all includes and the dummy hook
3747# definitions. It is replaced with custom functionality when building
3748# custom sources.
3749#CUSTOM_AUTOCONF_INCLUDE
3750
3751# Do not change or remove the following line, it is needed for consistency checks:
3752DATE_WHEN_GENERATED=1365147397
3753
3754###############################################################################
3755#
3756# Initialization / Boot-strapping
3757#
3758# The bootstrapping process needs to solve the "chicken or the egg" problem,
3759# thus it jumps back and forth, each time gaining something needed later on.
3760#
3761###############################################################################
3762
3763# Basic initialization that must happen first of all
3764
3765# Save the original command line. This is passed to us by the wrapper configure script.
3766
3767DATE_WHEN_CONFIGURED=`LANG=C date`
3768
3769{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3770$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3771{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3772$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3773
3774
3775
3776# Start with tools that do not need have cross compilation support
3777# and can be expected to be found in the default PATH. These tools are
3778# used by configure. Nor are these tools expected to be found in the
3779# devkit from the builddeps server either, since they are
3780# needed to download the devkit.
3781
3782# First are all the simple required tools.
3783
3784    for ac_prog in basename
3785do
3786  # Extract the first word of "$ac_prog", so it can be a program name with args.
3787set dummy $ac_prog; ac_word=$2
3788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3789$as_echo_n "checking for $ac_word... " >&6; }
3790if test "${ac_cv_path_BASENAME+set}" = set; then :
3791  $as_echo_n "(cached) " >&6
3792else
3793  case $BASENAME in
3794  [\\/]* | ?:[\\/]*)
3795  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3796  ;;
3797  *)
3798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3799for as_dir in $PATH
3800do
3801  IFS=$as_save_IFS
3802  test -z "$as_dir" && as_dir=.
3803    for ac_exec_ext in '' $ac_executable_extensions; do
3804  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3805    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3807    break 2
3808  fi
3809done
3810  done
3811IFS=$as_save_IFS
3812
3813  ;;
3814esac
3815fi
3816BASENAME=$ac_cv_path_BASENAME
3817if test -n "$BASENAME"; then
3818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3819$as_echo "$BASENAME" >&6; }
3820else
3821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3822$as_echo "no" >&6; }
3823fi
3824
3825
3826  test -n "$BASENAME" && break
3827done
3828
3829
3830    if test "x$BASENAME" = x; then
3831        if test "xbasename" = x; then
3832          PROG_NAME=basename
3833        else
3834          PROG_NAME=basename
3835        fi
3836        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3837$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3838        as_fn_error $? "Cannot continue" "$LINENO" 5
3839    fi
3840
3841
3842
3843    for ac_prog in bash
3844do
3845  # Extract the first word of "$ac_prog", so it can be a program name with args.
3846set dummy $ac_prog; ac_word=$2
3847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3848$as_echo_n "checking for $ac_word... " >&6; }
3849if test "${ac_cv_path_BASH+set}" = set; then :
3850  $as_echo_n "(cached) " >&6
3851else
3852  case $BASH in
3853  [\\/]* | ?:[\\/]*)
3854  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3855  ;;
3856  *)
3857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3858for as_dir in $PATH
3859do
3860  IFS=$as_save_IFS
3861  test -z "$as_dir" && as_dir=.
3862    for ac_exec_ext in '' $ac_executable_extensions; do
3863  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3864    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3866    break 2
3867  fi
3868done
3869  done
3870IFS=$as_save_IFS
3871
3872  ;;
3873esac
3874fi
3875BASH=$ac_cv_path_BASH
3876if test -n "$BASH"; then
3877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3878$as_echo "$BASH" >&6; }
3879else
3880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3881$as_echo "no" >&6; }
3882fi
3883
3884
3885  test -n "$BASH" && break
3886done
3887
3888
3889    if test "x$BASH" = x; then
3890        if test "xbash" = x; then
3891          PROG_NAME=bash
3892        else
3893          PROG_NAME=bash
3894        fi
3895        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3896$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3897        as_fn_error $? "Cannot continue" "$LINENO" 5
3898    fi
3899
3900
3901
3902    for ac_prog in cat
3903do
3904  # Extract the first word of "$ac_prog", so it can be a program name with args.
3905set dummy $ac_prog; ac_word=$2
3906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3907$as_echo_n "checking for $ac_word... " >&6; }
3908if test "${ac_cv_path_CAT+set}" = set; then :
3909  $as_echo_n "(cached) " >&6
3910else
3911  case $CAT in
3912  [\\/]* | ?:[\\/]*)
3913  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3914  ;;
3915  *)
3916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3917for as_dir in $PATH
3918do
3919  IFS=$as_save_IFS
3920  test -z "$as_dir" && as_dir=.
3921    for ac_exec_ext in '' $ac_executable_extensions; do
3922  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3923    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3925    break 2
3926  fi
3927done
3928  done
3929IFS=$as_save_IFS
3930
3931  ;;
3932esac
3933fi
3934CAT=$ac_cv_path_CAT
3935if test -n "$CAT"; then
3936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3937$as_echo "$CAT" >&6; }
3938else
3939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3940$as_echo "no" >&6; }
3941fi
3942
3943
3944  test -n "$CAT" && break
3945done
3946
3947
3948    if test "x$CAT" = x; then
3949        if test "xcat" = x; then
3950          PROG_NAME=cat
3951        else
3952          PROG_NAME=cat
3953        fi
3954        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3955$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3956        as_fn_error $? "Cannot continue" "$LINENO" 5
3957    fi
3958
3959
3960
3961    for ac_prog in chmod
3962do
3963  # Extract the first word of "$ac_prog", so it can be a program name with args.
3964set dummy $ac_prog; ac_word=$2
3965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3966$as_echo_n "checking for $ac_word... " >&6; }
3967if test "${ac_cv_path_CHMOD+set}" = set; then :
3968  $as_echo_n "(cached) " >&6
3969else
3970  case $CHMOD in
3971  [\\/]* | ?:[\\/]*)
3972  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3973  ;;
3974  *)
3975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3976for as_dir in $PATH
3977do
3978  IFS=$as_save_IFS
3979  test -z "$as_dir" && as_dir=.
3980    for ac_exec_ext in '' $ac_executable_extensions; do
3981  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3982    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3984    break 2
3985  fi
3986done
3987  done
3988IFS=$as_save_IFS
3989
3990  ;;
3991esac
3992fi
3993CHMOD=$ac_cv_path_CHMOD
3994if test -n "$CHMOD"; then
3995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3996$as_echo "$CHMOD" >&6; }
3997else
3998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3999$as_echo "no" >&6; }
4000fi
4001
4002
4003  test -n "$CHMOD" && break
4004done
4005
4006
4007    if test "x$CHMOD" = x; then
4008        if test "xchmod" = x; then
4009          PROG_NAME=chmod
4010        else
4011          PROG_NAME=chmod
4012        fi
4013        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4014$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4015        as_fn_error $? "Cannot continue" "$LINENO" 5
4016    fi
4017
4018
4019
4020    for ac_prog in cmp
4021do
4022  # Extract the first word of "$ac_prog", so it can be a program name with args.
4023set dummy $ac_prog; ac_word=$2
4024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4025$as_echo_n "checking for $ac_word... " >&6; }
4026if test "${ac_cv_path_CMP+set}" = set; then :
4027  $as_echo_n "(cached) " >&6
4028else
4029  case $CMP in
4030  [\\/]* | ?:[\\/]*)
4031  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4032  ;;
4033  *)
4034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4035for as_dir in $PATH
4036do
4037  IFS=$as_save_IFS
4038  test -z "$as_dir" && as_dir=.
4039    for ac_exec_ext in '' $ac_executable_extensions; do
4040  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4041    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4043    break 2
4044  fi
4045done
4046  done
4047IFS=$as_save_IFS
4048
4049  ;;
4050esac
4051fi
4052CMP=$ac_cv_path_CMP
4053if test -n "$CMP"; then
4054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4055$as_echo "$CMP" >&6; }
4056else
4057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4058$as_echo "no" >&6; }
4059fi
4060
4061
4062  test -n "$CMP" && break
4063done
4064
4065
4066    if test "x$CMP" = x; then
4067        if test "xcmp" = x; then
4068          PROG_NAME=cmp
4069        else
4070          PROG_NAME=cmp
4071        fi
4072        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4073$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4074        as_fn_error $? "Cannot continue" "$LINENO" 5
4075    fi
4076
4077
4078
4079    for ac_prog in comm
4080do
4081  # Extract the first word of "$ac_prog", so it can be a program name with args.
4082set dummy $ac_prog; ac_word=$2
4083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4084$as_echo_n "checking for $ac_word... " >&6; }
4085if test "${ac_cv_path_COMM+set}" = set; then :
4086  $as_echo_n "(cached) " >&6
4087else
4088  case $COMM in
4089  [\\/]* | ?:[\\/]*)
4090  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4091  ;;
4092  *)
4093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4094for as_dir in $PATH
4095do
4096  IFS=$as_save_IFS
4097  test -z "$as_dir" && as_dir=.
4098    for ac_exec_ext in '' $ac_executable_extensions; do
4099  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4100    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4102    break 2
4103  fi
4104done
4105  done
4106IFS=$as_save_IFS
4107
4108  ;;
4109esac
4110fi
4111COMM=$ac_cv_path_COMM
4112if test -n "$COMM"; then
4113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4114$as_echo "$COMM" >&6; }
4115else
4116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4117$as_echo "no" >&6; }
4118fi
4119
4120
4121  test -n "$COMM" && break
4122done
4123
4124
4125    if test "x$COMM" = x; then
4126        if test "xcomm" = x; then
4127          PROG_NAME=comm
4128        else
4129          PROG_NAME=comm
4130        fi
4131        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4132$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4133        as_fn_error $? "Cannot continue" "$LINENO" 5
4134    fi
4135
4136
4137
4138    for ac_prog in cp
4139do
4140  # Extract the first word of "$ac_prog", so it can be a program name with args.
4141set dummy $ac_prog; ac_word=$2
4142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4143$as_echo_n "checking for $ac_word... " >&6; }
4144if test "${ac_cv_path_CP+set}" = set; then :
4145  $as_echo_n "(cached) " >&6
4146else
4147  case $CP in
4148  [\\/]* | ?:[\\/]*)
4149  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4150  ;;
4151  *)
4152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4153for as_dir in $PATH
4154do
4155  IFS=$as_save_IFS
4156  test -z "$as_dir" && as_dir=.
4157    for ac_exec_ext in '' $ac_executable_extensions; do
4158  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4159    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4161    break 2
4162  fi
4163done
4164  done
4165IFS=$as_save_IFS
4166
4167  ;;
4168esac
4169fi
4170CP=$ac_cv_path_CP
4171if test -n "$CP"; then
4172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4173$as_echo "$CP" >&6; }
4174else
4175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4176$as_echo "no" >&6; }
4177fi
4178
4179
4180  test -n "$CP" && break
4181done
4182
4183
4184    if test "x$CP" = x; then
4185        if test "xcp" = x; then
4186          PROG_NAME=cp
4187        else
4188          PROG_NAME=cp
4189        fi
4190        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4191$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4192        as_fn_error $? "Cannot continue" "$LINENO" 5
4193    fi
4194
4195
4196
4197    for ac_prog in cpio
4198do
4199  # Extract the first word of "$ac_prog", so it can be a program name with args.
4200set dummy $ac_prog; ac_word=$2
4201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4202$as_echo_n "checking for $ac_word... " >&6; }
4203if test "${ac_cv_path_CPIO+set}" = set; then :
4204  $as_echo_n "(cached) " >&6
4205else
4206  case $CPIO in
4207  [\\/]* | ?:[\\/]*)
4208  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4209  ;;
4210  *)
4211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4212for as_dir in $PATH
4213do
4214  IFS=$as_save_IFS
4215  test -z "$as_dir" && as_dir=.
4216    for ac_exec_ext in '' $ac_executable_extensions; do
4217  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4218    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4220    break 2
4221  fi
4222done
4223  done
4224IFS=$as_save_IFS
4225
4226  ;;
4227esac
4228fi
4229CPIO=$ac_cv_path_CPIO
4230if test -n "$CPIO"; then
4231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4232$as_echo "$CPIO" >&6; }
4233else
4234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4235$as_echo "no" >&6; }
4236fi
4237
4238
4239  test -n "$CPIO" && break
4240done
4241
4242
4243    if test "x$CPIO" = x; then
4244        if test "xcpio" = x; then
4245          PROG_NAME=cpio
4246        else
4247          PROG_NAME=cpio
4248        fi
4249        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4250$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4251        as_fn_error $? "Cannot continue" "$LINENO" 5
4252    fi
4253
4254
4255
4256    for ac_prog in cut
4257do
4258  # Extract the first word of "$ac_prog", so it can be a program name with args.
4259set dummy $ac_prog; ac_word=$2
4260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4261$as_echo_n "checking for $ac_word... " >&6; }
4262if test "${ac_cv_path_CUT+set}" = set; then :
4263  $as_echo_n "(cached) " >&6
4264else
4265  case $CUT in
4266  [\\/]* | ?:[\\/]*)
4267  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4268  ;;
4269  *)
4270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4271for as_dir in $PATH
4272do
4273  IFS=$as_save_IFS
4274  test -z "$as_dir" && as_dir=.
4275    for ac_exec_ext in '' $ac_executable_extensions; do
4276  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4277    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4279    break 2
4280  fi
4281done
4282  done
4283IFS=$as_save_IFS
4284
4285  ;;
4286esac
4287fi
4288CUT=$ac_cv_path_CUT
4289if test -n "$CUT"; then
4290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4291$as_echo "$CUT" >&6; }
4292else
4293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4294$as_echo "no" >&6; }
4295fi
4296
4297
4298  test -n "$CUT" && break
4299done
4300
4301
4302    if test "x$CUT" = x; then
4303        if test "xcut" = x; then
4304          PROG_NAME=cut
4305        else
4306          PROG_NAME=cut
4307        fi
4308        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4309$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4310        as_fn_error $? "Cannot continue" "$LINENO" 5
4311    fi
4312
4313
4314
4315    for ac_prog in date
4316do
4317  # Extract the first word of "$ac_prog", so it can be a program name with args.
4318set dummy $ac_prog; ac_word=$2
4319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4320$as_echo_n "checking for $ac_word... " >&6; }
4321if test "${ac_cv_path_DATE+set}" = set; then :
4322  $as_echo_n "(cached) " >&6
4323else
4324  case $DATE in
4325  [\\/]* | ?:[\\/]*)
4326  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4327  ;;
4328  *)
4329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4330for as_dir in $PATH
4331do
4332  IFS=$as_save_IFS
4333  test -z "$as_dir" && as_dir=.
4334    for ac_exec_ext in '' $ac_executable_extensions; do
4335  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4336    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4338    break 2
4339  fi
4340done
4341  done
4342IFS=$as_save_IFS
4343
4344  ;;
4345esac
4346fi
4347DATE=$ac_cv_path_DATE
4348if test -n "$DATE"; then
4349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4350$as_echo "$DATE" >&6; }
4351else
4352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4353$as_echo "no" >&6; }
4354fi
4355
4356
4357  test -n "$DATE" && break
4358done
4359
4360
4361    if test "x$DATE" = x; then
4362        if test "xdate" = x; then
4363          PROG_NAME=date
4364        else
4365          PROG_NAME=date
4366        fi
4367        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4368$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4369        as_fn_error $? "Cannot continue" "$LINENO" 5
4370    fi
4371
4372
4373
4374    for ac_prog in gdiff diff
4375do
4376  # Extract the first word of "$ac_prog", so it can be a program name with args.
4377set dummy $ac_prog; ac_word=$2
4378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4379$as_echo_n "checking for $ac_word... " >&6; }
4380if test "${ac_cv_path_DIFF+set}" = set; then :
4381  $as_echo_n "(cached) " >&6
4382else
4383  case $DIFF in
4384  [\\/]* | ?:[\\/]*)
4385  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4386  ;;
4387  *)
4388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4389for as_dir in $PATH
4390do
4391  IFS=$as_save_IFS
4392  test -z "$as_dir" && as_dir=.
4393    for ac_exec_ext in '' $ac_executable_extensions; do
4394  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4395    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4397    break 2
4398  fi
4399done
4400  done
4401IFS=$as_save_IFS
4402
4403  ;;
4404esac
4405fi
4406DIFF=$ac_cv_path_DIFF
4407if test -n "$DIFF"; then
4408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4409$as_echo "$DIFF" >&6; }
4410else
4411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4412$as_echo "no" >&6; }
4413fi
4414
4415
4416  test -n "$DIFF" && break
4417done
4418
4419
4420    if test "x$DIFF" = x; then
4421        if test "xgdiff diff" = x; then
4422          PROG_NAME=diff
4423        else
4424          PROG_NAME=gdiff diff
4425        fi
4426        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4427$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4428        as_fn_error $? "Cannot continue" "$LINENO" 5
4429    fi
4430
4431
4432
4433    for ac_prog in dirname
4434do
4435  # Extract the first word of "$ac_prog", so it can be a program name with args.
4436set dummy $ac_prog; ac_word=$2
4437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4438$as_echo_n "checking for $ac_word... " >&6; }
4439if test "${ac_cv_path_DIRNAME+set}" = set; then :
4440  $as_echo_n "(cached) " >&6
4441else
4442  case $DIRNAME in
4443  [\\/]* | ?:[\\/]*)
4444  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4445  ;;
4446  *)
4447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4448for as_dir in $PATH
4449do
4450  IFS=$as_save_IFS
4451  test -z "$as_dir" && as_dir=.
4452    for ac_exec_ext in '' $ac_executable_extensions; do
4453  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4454    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4456    break 2
4457  fi
4458done
4459  done
4460IFS=$as_save_IFS
4461
4462  ;;
4463esac
4464fi
4465DIRNAME=$ac_cv_path_DIRNAME
4466if test -n "$DIRNAME"; then
4467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4468$as_echo "$DIRNAME" >&6; }
4469else
4470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4471$as_echo "no" >&6; }
4472fi
4473
4474
4475  test -n "$DIRNAME" && break
4476done
4477
4478
4479    if test "x$DIRNAME" = x; then
4480        if test "xdirname" = x; then
4481          PROG_NAME=dirname
4482        else
4483          PROG_NAME=dirname
4484        fi
4485        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4486$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4487        as_fn_error $? "Cannot continue" "$LINENO" 5
4488    fi
4489
4490
4491
4492    for ac_prog in echo
4493do
4494  # Extract the first word of "$ac_prog", so it can be a program name with args.
4495set dummy $ac_prog; ac_word=$2
4496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4497$as_echo_n "checking for $ac_word... " >&6; }
4498if test "${ac_cv_path_ECHO+set}" = set; then :
4499  $as_echo_n "(cached) " >&6
4500else
4501  case $ECHO in
4502  [\\/]* | ?:[\\/]*)
4503  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4504  ;;
4505  *)
4506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4507for as_dir in $PATH
4508do
4509  IFS=$as_save_IFS
4510  test -z "$as_dir" && as_dir=.
4511    for ac_exec_ext in '' $ac_executable_extensions; do
4512  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4513    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4515    break 2
4516  fi
4517done
4518  done
4519IFS=$as_save_IFS
4520
4521  ;;
4522esac
4523fi
4524ECHO=$ac_cv_path_ECHO
4525if test -n "$ECHO"; then
4526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4527$as_echo "$ECHO" >&6; }
4528else
4529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4530$as_echo "no" >&6; }
4531fi
4532
4533
4534  test -n "$ECHO" && break
4535done
4536
4537
4538    if test "x$ECHO" = x; then
4539        if test "xecho" = x; then
4540          PROG_NAME=echo
4541        else
4542          PROG_NAME=echo
4543        fi
4544        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4545$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4546        as_fn_error $? "Cannot continue" "$LINENO" 5
4547    fi
4548
4549
4550
4551    for ac_prog in expr
4552do
4553  # Extract the first word of "$ac_prog", so it can be a program name with args.
4554set dummy $ac_prog; ac_word=$2
4555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4556$as_echo_n "checking for $ac_word... " >&6; }
4557if test "${ac_cv_path_EXPR+set}" = set; then :
4558  $as_echo_n "(cached) " >&6
4559else
4560  case $EXPR in
4561  [\\/]* | ?:[\\/]*)
4562  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4563  ;;
4564  *)
4565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4566for as_dir in $PATH
4567do
4568  IFS=$as_save_IFS
4569  test -z "$as_dir" && as_dir=.
4570    for ac_exec_ext in '' $ac_executable_extensions; do
4571  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4572    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4574    break 2
4575  fi
4576done
4577  done
4578IFS=$as_save_IFS
4579
4580  ;;
4581esac
4582fi
4583EXPR=$ac_cv_path_EXPR
4584if test -n "$EXPR"; then
4585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4586$as_echo "$EXPR" >&6; }
4587else
4588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4589$as_echo "no" >&6; }
4590fi
4591
4592
4593  test -n "$EXPR" && break
4594done
4595
4596
4597    if test "x$EXPR" = x; then
4598        if test "xexpr" = x; then
4599          PROG_NAME=expr
4600        else
4601          PROG_NAME=expr
4602        fi
4603        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4604$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4605        as_fn_error $? "Cannot continue" "$LINENO" 5
4606    fi
4607
4608
4609
4610    for ac_prog in file
4611do
4612  # Extract the first word of "$ac_prog", so it can be a program name with args.
4613set dummy $ac_prog; ac_word=$2
4614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4615$as_echo_n "checking for $ac_word... " >&6; }
4616if test "${ac_cv_path_FILE+set}" = set; then :
4617  $as_echo_n "(cached) " >&6
4618else
4619  case $FILE in
4620  [\\/]* | ?:[\\/]*)
4621  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4622  ;;
4623  *)
4624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4625for as_dir in $PATH
4626do
4627  IFS=$as_save_IFS
4628  test -z "$as_dir" && as_dir=.
4629    for ac_exec_ext in '' $ac_executable_extensions; do
4630  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4631    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4633    break 2
4634  fi
4635done
4636  done
4637IFS=$as_save_IFS
4638
4639  ;;
4640esac
4641fi
4642FILE=$ac_cv_path_FILE
4643if test -n "$FILE"; then
4644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4645$as_echo "$FILE" >&6; }
4646else
4647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4648$as_echo "no" >&6; }
4649fi
4650
4651
4652  test -n "$FILE" && break
4653done
4654
4655
4656    if test "x$FILE" = x; then
4657        if test "xfile" = x; then
4658          PROG_NAME=file
4659        else
4660          PROG_NAME=file
4661        fi
4662        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4663$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4664        as_fn_error $? "Cannot continue" "$LINENO" 5
4665    fi
4666
4667
4668
4669    for ac_prog in find
4670do
4671  # Extract the first word of "$ac_prog", so it can be a program name with args.
4672set dummy $ac_prog; ac_word=$2
4673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4674$as_echo_n "checking for $ac_word... " >&6; }
4675if test "${ac_cv_path_FIND+set}" = set; then :
4676  $as_echo_n "(cached) " >&6
4677else
4678  case $FIND in
4679  [\\/]* | ?:[\\/]*)
4680  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4681  ;;
4682  *)
4683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4684for as_dir in $PATH
4685do
4686  IFS=$as_save_IFS
4687  test -z "$as_dir" && as_dir=.
4688    for ac_exec_ext in '' $ac_executable_extensions; do
4689  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4690    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4692    break 2
4693  fi
4694done
4695  done
4696IFS=$as_save_IFS
4697
4698  ;;
4699esac
4700fi
4701FIND=$ac_cv_path_FIND
4702if test -n "$FIND"; then
4703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4704$as_echo "$FIND" >&6; }
4705else
4706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4707$as_echo "no" >&6; }
4708fi
4709
4710
4711  test -n "$FIND" && break
4712done
4713
4714
4715    if test "x$FIND" = x; then
4716        if test "xfind" = x; then
4717          PROG_NAME=find
4718        else
4719          PROG_NAME=find
4720        fi
4721        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4722$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4723        as_fn_error $? "Cannot continue" "$LINENO" 5
4724    fi
4725
4726
4727
4728    for ac_prog in head
4729do
4730  # Extract the first word of "$ac_prog", so it can be a program name with args.
4731set dummy $ac_prog; ac_word=$2
4732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4733$as_echo_n "checking for $ac_word... " >&6; }
4734if test "${ac_cv_path_HEAD+set}" = set; then :
4735  $as_echo_n "(cached) " >&6
4736else
4737  case $HEAD in
4738  [\\/]* | ?:[\\/]*)
4739  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4740  ;;
4741  *)
4742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4743for as_dir in $PATH
4744do
4745  IFS=$as_save_IFS
4746  test -z "$as_dir" && as_dir=.
4747    for ac_exec_ext in '' $ac_executable_extensions; do
4748  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4749    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4751    break 2
4752  fi
4753done
4754  done
4755IFS=$as_save_IFS
4756
4757  ;;
4758esac
4759fi
4760HEAD=$ac_cv_path_HEAD
4761if test -n "$HEAD"; then
4762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4763$as_echo "$HEAD" >&6; }
4764else
4765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4766$as_echo "no" >&6; }
4767fi
4768
4769
4770  test -n "$HEAD" && break
4771done
4772
4773
4774    if test "x$HEAD" = x; then
4775        if test "xhead" = x; then
4776          PROG_NAME=head
4777        else
4778          PROG_NAME=head
4779        fi
4780        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4781$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4782        as_fn_error $? "Cannot continue" "$LINENO" 5
4783    fi
4784
4785
4786
4787    for ac_prog in ln
4788do
4789  # Extract the first word of "$ac_prog", so it can be a program name with args.
4790set dummy $ac_prog; ac_word=$2
4791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4792$as_echo_n "checking for $ac_word... " >&6; }
4793if test "${ac_cv_path_LN+set}" = set; then :
4794  $as_echo_n "(cached) " >&6
4795else
4796  case $LN in
4797  [\\/]* | ?:[\\/]*)
4798  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4799  ;;
4800  *)
4801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4802for as_dir in $PATH
4803do
4804  IFS=$as_save_IFS
4805  test -z "$as_dir" && as_dir=.
4806    for ac_exec_ext in '' $ac_executable_extensions; do
4807  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4808    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4810    break 2
4811  fi
4812done
4813  done
4814IFS=$as_save_IFS
4815
4816  ;;
4817esac
4818fi
4819LN=$ac_cv_path_LN
4820if test -n "$LN"; then
4821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4822$as_echo "$LN" >&6; }
4823else
4824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4825$as_echo "no" >&6; }
4826fi
4827
4828
4829  test -n "$LN" && break
4830done
4831
4832
4833    if test "x$LN" = x; then
4834        if test "xln" = x; then
4835          PROG_NAME=ln
4836        else
4837          PROG_NAME=ln
4838        fi
4839        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4840$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4841        as_fn_error $? "Cannot continue" "$LINENO" 5
4842    fi
4843
4844
4845
4846    for ac_prog in ls
4847do
4848  # Extract the first word of "$ac_prog", so it can be a program name with args.
4849set dummy $ac_prog; ac_word=$2
4850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4851$as_echo_n "checking for $ac_word... " >&6; }
4852if test "${ac_cv_path_LS+set}" = set; then :
4853  $as_echo_n "(cached) " >&6
4854else
4855  case $LS in
4856  [\\/]* | ?:[\\/]*)
4857  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4858  ;;
4859  *)
4860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4861for as_dir in $PATH
4862do
4863  IFS=$as_save_IFS
4864  test -z "$as_dir" && as_dir=.
4865    for ac_exec_ext in '' $ac_executable_extensions; do
4866  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4867    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4869    break 2
4870  fi
4871done
4872  done
4873IFS=$as_save_IFS
4874
4875  ;;
4876esac
4877fi
4878LS=$ac_cv_path_LS
4879if test -n "$LS"; then
4880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4881$as_echo "$LS" >&6; }
4882else
4883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4884$as_echo "no" >&6; }
4885fi
4886
4887
4888  test -n "$LS" && break
4889done
4890
4891
4892    if test "x$LS" = x; then
4893        if test "xls" = x; then
4894          PROG_NAME=ls
4895        else
4896          PROG_NAME=ls
4897        fi
4898        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4899$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4900        as_fn_error $? "Cannot continue" "$LINENO" 5
4901    fi
4902
4903
4904
4905    for ac_prog in mkdir
4906do
4907  # Extract the first word of "$ac_prog", so it can be a program name with args.
4908set dummy $ac_prog; ac_word=$2
4909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4910$as_echo_n "checking for $ac_word... " >&6; }
4911if test "${ac_cv_path_MKDIR+set}" = set; then :
4912  $as_echo_n "(cached) " >&6
4913else
4914  case $MKDIR in
4915  [\\/]* | ?:[\\/]*)
4916  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4917  ;;
4918  *)
4919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4920for as_dir in $PATH
4921do
4922  IFS=$as_save_IFS
4923  test -z "$as_dir" && as_dir=.
4924    for ac_exec_ext in '' $ac_executable_extensions; do
4925  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4926    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4928    break 2
4929  fi
4930done
4931  done
4932IFS=$as_save_IFS
4933
4934  ;;
4935esac
4936fi
4937MKDIR=$ac_cv_path_MKDIR
4938if test -n "$MKDIR"; then
4939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4940$as_echo "$MKDIR" >&6; }
4941else
4942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4943$as_echo "no" >&6; }
4944fi
4945
4946
4947  test -n "$MKDIR" && break
4948done
4949
4950
4951    if test "x$MKDIR" = x; then
4952        if test "xmkdir" = x; then
4953          PROG_NAME=mkdir
4954        else
4955          PROG_NAME=mkdir
4956        fi
4957        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4958$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4959        as_fn_error $? "Cannot continue" "$LINENO" 5
4960    fi
4961
4962
4963
4964    for ac_prog in mktemp
4965do
4966  # Extract the first word of "$ac_prog", so it can be a program name with args.
4967set dummy $ac_prog; ac_word=$2
4968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4969$as_echo_n "checking for $ac_word... " >&6; }
4970if test "${ac_cv_path_MKTEMP+set}" = set; then :
4971  $as_echo_n "(cached) " >&6
4972else
4973  case $MKTEMP in
4974  [\\/]* | ?:[\\/]*)
4975  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4976  ;;
4977  *)
4978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4979for as_dir in $PATH
4980do
4981  IFS=$as_save_IFS
4982  test -z "$as_dir" && as_dir=.
4983    for ac_exec_ext in '' $ac_executable_extensions; do
4984  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4985    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4987    break 2
4988  fi
4989done
4990  done
4991IFS=$as_save_IFS
4992
4993  ;;
4994esac
4995fi
4996MKTEMP=$ac_cv_path_MKTEMP
4997if test -n "$MKTEMP"; then
4998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4999$as_echo "$MKTEMP" >&6; }
5000else
5001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5002$as_echo "no" >&6; }
5003fi
5004
5005
5006  test -n "$MKTEMP" && break
5007done
5008
5009
5010    if test "x$MKTEMP" = x; then
5011        if test "xmktemp" = x; then
5012          PROG_NAME=mktemp
5013        else
5014          PROG_NAME=mktemp
5015        fi
5016        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5017$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5018        as_fn_error $? "Cannot continue" "$LINENO" 5
5019    fi
5020
5021
5022
5023    for ac_prog in mv
5024do
5025  # Extract the first word of "$ac_prog", so it can be a program name with args.
5026set dummy $ac_prog; ac_word=$2
5027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5028$as_echo_n "checking for $ac_word... " >&6; }
5029if test "${ac_cv_path_MV+set}" = set; then :
5030  $as_echo_n "(cached) " >&6
5031else
5032  case $MV in
5033  [\\/]* | ?:[\\/]*)
5034  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5035  ;;
5036  *)
5037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5038for as_dir in $PATH
5039do
5040  IFS=$as_save_IFS
5041  test -z "$as_dir" && as_dir=.
5042    for ac_exec_ext in '' $ac_executable_extensions; do
5043  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5044    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5046    break 2
5047  fi
5048done
5049  done
5050IFS=$as_save_IFS
5051
5052  ;;
5053esac
5054fi
5055MV=$ac_cv_path_MV
5056if test -n "$MV"; then
5057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5058$as_echo "$MV" >&6; }
5059else
5060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5061$as_echo "no" >&6; }
5062fi
5063
5064
5065  test -n "$MV" && break
5066done
5067
5068
5069    if test "x$MV" = x; then
5070        if test "xmv" = x; then
5071          PROG_NAME=mv
5072        else
5073          PROG_NAME=mv
5074        fi
5075        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5076$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5077        as_fn_error $? "Cannot continue" "$LINENO" 5
5078    fi
5079
5080
5081
5082    for ac_prog in printf
5083do
5084  # Extract the first word of "$ac_prog", so it can be a program name with args.
5085set dummy $ac_prog; ac_word=$2
5086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5087$as_echo_n "checking for $ac_word... " >&6; }
5088if test "${ac_cv_path_PRINTF+set}" = set; then :
5089  $as_echo_n "(cached) " >&6
5090else
5091  case $PRINTF in
5092  [\\/]* | ?:[\\/]*)
5093  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5094  ;;
5095  *)
5096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5097for as_dir in $PATH
5098do
5099  IFS=$as_save_IFS
5100  test -z "$as_dir" && as_dir=.
5101    for ac_exec_ext in '' $ac_executable_extensions; do
5102  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5103    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5105    break 2
5106  fi
5107done
5108  done
5109IFS=$as_save_IFS
5110
5111  ;;
5112esac
5113fi
5114PRINTF=$ac_cv_path_PRINTF
5115if test -n "$PRINTF"; then
5116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5117$as_echo "$PRINTF" >&6; }
5118else
5119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5120$as_echo "no" >&6; }
5121fi
5122
5123
5124  test -n "$PRINTF" && break
5125done
5126
5127
5128    if test "x$PRINTF" = x; then
5129        if test "xprintf" = x; then
5130          PROG_NAME=printf
5131        else
5132          PROG_NAME=printf
5133        fi
5134        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5135$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5136        as_fn_error $? "Cannot continue" "$LINENO" 5
5137    fi
5138
5139
5140
5141    for ac_prog in pwd
5142do
5143  # Extract the first word of "$ac_prog", so it can be a program name with args.
5144set dummy $ac_prog; ac_word=$2
5145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5146$as_echo_n "checking for $ac_word... " >&6; }
5147if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5148  $as_echo_n "(cached) " >&6
5149else
5150  case $THEPWDCMD in
5151  [\\/]* | ?:[\\/]*)
5152  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5153  ;;
5154  *)
5155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5156for as_dir in $PATH
5157do
5158  IFS=$as_save_IFS
5159  test -z "$as_dir" && as_dir=.
5160    for ac_exec_ext in '' $ac_executable_extensions; do
5161  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5162    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5164    break 2
5165  fi
5166done
5167  done
5168IFS=$as_save_IFS
5169
5170  ;;
5171esac
5172fi
5173THEPWDCMD=$ac_cv_path_THEPWDCMD
5174if test -n "$THEPWDCMD"; then
5175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5176$as_echo "$THEPWDCMD" >&6; }
5177else
5178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5179$as_echo "no" >&6; }
5180fi
5181
5182
5183  test -n "$THEPWDCMD" && break
5184done
5185
5186
5187    if test "x$THEPWDCMD" = x; then
5188        if test "xpwd" = x; then
5189          PROG_NAME=thepwdcmd
5190        else
5191          PROG_NAME=pwd
5192        fi
5193        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5194$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5195        as_fn_error $? "Cannot continue" "$LINENO" 5
5196    fi
5197
5198
5199
5200    for ac_prog in rm
5201do
5202  # Extract the first word of "$ac_prog", so it can be a program name with args.
5203set dummy $ac_prog; ac_word=$2
5204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5205$as_echo_n "checking for $ac_word... " >&6; }
5206if test "${ac_cv_path_RM+set}" = set; then :
5207  $as_echo_n "(cached) " >&6
5208else
5209  case $RM in
5210  [\\/]* | ?:[\\/]*)
5211  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5212  ;;
5213  *)
5214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5215for as_dir in $PATH
5216do
5217  IFS=$as_save_IFS
5218  test -z "$as_dir" && as_dir=.
5219    for ac_exec_ext in '' $ac_executable_extensions; do
5220  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5221    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5223    break 2
5224  fi
5225done
5226  done
5227IFS=$as_save_IFS
5228
5229  ;;
5230esac
5231fi
5232RM=$ac_cv_path_RM
5233if test -n "$RM"; then
5234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5235$as_echo "$RM" >&6; }
5236else
5237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5238$as_echo "no" >&6; }
5239fi
5240
5241
5242  test -n "$RM" && break
5243done
5244
5245
5246    if test "x$RM" = x; then
5247        if test "xrm" = x; then
5248          PROG_NAME=rm
5249        else
5250          PROG_NAME=rm
5251        fi
5252        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5253$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5254        as_fn_error $? "Cannot continue" "$LINENO" 5
5255    fi
5256
5257
5258
5259    for ac_prog in sh
5260do
5261  # Extract the first word of "$ac_prog", so it can be a program name with args.
5262set dummy $ac_prog; ac_word=$2
5263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5264$as_echo_n "checking for $ac_word... " >&6; }
5265if test "${ac_cv_path_SH+set}" = set; then :
5266  $as_echo_n "(cached) " >&6
5267else
5268  case $SH in
5269  [\\/]* | ?:[\\/]*)
5270  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5271  ;;
5272  *)
5273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5274for as_dir in $PATH
5275do
5276  IFS=$as_save_IFS
5277  test -z "$as_dir" && as_dir=.
5278    for ac_exec_ext in '' $ac_executable_extensions; do
5279  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5280    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5282    break 2
5283  fi
5284done
5285  done
5286IFS=$as_save_IFS
5287
5288  ;;
5289esac
5290fi
5291SH=$ac_cv_path_SH
5292if test -n "$SH"; then
5293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5294$as_echo "$SH" >&6; }
5295else
5296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5297$as_echo "no" >&6; }
5298fi
5299
5300
5301  test -n "$SH" && break
5302done
5303
5304
5305    if test "x$SH" = x; then
5306        if test "xsh" = x; then
5307          PROG_NAME=sh
5308        else
5309          PROG_NAME=sh
5310        fi
5311        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5312$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5313        as_fn_error $? "Cannot continue" "$LINENO" 5
5314    fi
5315
5316
5317
5318    for ac_prog in sort
5319do
5320  # Extract the first word of "$ac_prog", so it can be a program name with args.
5321set dummy $ac_prog; ac_word=$2
5322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5323$as_echo_n "checking for $ac_word... " >&6; }
5324if test "${ac_cv_path_SORT+set}" = set; then :
5325  $as_echo_n "(cached) " >&6
5326else
5327  case $SORT in
5328  [\\/]* | ?:[\\/]*)
5329  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5330  ;;
5331  *)
5332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5333for as_dir in $PATH
5334do
5335  IFS=$as_save_IFS
5336  test -z "$as_dir" && as_dir=.
5337    for ac_exec_ext in '' $ac_executable_extensions; do
5338  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5339    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5341    break 2
5342  fi
5343done
5344  done
5345IFS=$as_save_IFS
5346
5347  ;;
5348esac
5349fi
5350SORT=$ac_cv_path_SORT
5351if test -n "$SORT"; then
5352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5353$as_echo "$SORT" >&6; }
5354else
5355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5356$as_echo "no" >&6; }
5357fi
5358
5359
5360  test -n "$SORT" && break
5361done
5362
5363
5364    if test "x$SORT" = x; then
5365        if test "xsort" = x; then
5366          PROG_NAME=sort
5367        else
5368          PROG_NAME=sort
5369        fi
5370        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5371$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5372        as_fn_error $? "Cannot continue" "$LINENO" 5
5373    fi
5374
5375
5376
5377    for ac_prog in tail
5378do
5379  # Extract the first word of "$ac_prog", so it can be a program name with args.
5380set dummy $ac_prog; ac_word=$2
5381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5382$as_echo_n "checking for $ac_word... " >&6; }
5383if test "${ac_cv_path_TAIL+set}" = set; then :
5384  $as_echo_n "(cached) " >&6
5385else
5386  case $TAIL in
5387  [\\/]* | ?:[\\/]*)
5388  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5389  ;;
5390  *)
5391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5392for as_dir in $PATH
5393do
5394  IFS=$as_save_IFS
5395  test -z "$as_dir" && as_dir=.
5396    for ac_exec_ext in '' $ac_executable_extensions; do
5397  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5398    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5400    break 2
5401  fi
5402done
5403  done
5404IFS=$as_save_IFS
5405
5406  ;;
5407esac
5408fi
5409TAIL=$ac_cv_path_TAIL
5410if test -n "$TAIL"; then
5411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5412$as_echo "$TAIL" >&6; }
5413else
5414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5415$as_echo "no" >&6; }
5416fi
5417
5418
5419  test -n "$TAIL" && break
5420done
5421
5422
5423    if test "x$TAIL" = x; then
5424        if test "xtail" = x; then
5425          PROG_NAME=tail
5426        else
5427          PROG_NAME=tail
5428        fi
5429        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5430$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5431        as_fn_error $? "Cannot continue" "$LINENO" 5
5432    fi
5433
5434
5435
5436    for ac_prog in tar
5437do
5438  # Extract the first word of "$ac_prog", so it can be a program name with args.
5439set dummy $ac_prog; ac_word=$2
5440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5441$as_echo_n "checking for $ac_word... " >&6; }
5442if test "${ac_cv_path_TAR+set}" = set; then :
5443  $as_echo_n "(cached) " >&6
5444else
5445  case $TAR in
5446  [\\/]* | ?:[\\/]*)
5447  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5448  ;;
5449  *)
5450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5451for as_dir in $PATH
5452do
5453  IFS=$as_save_IFS
5454  test -z "$as_dir" && as_dir=.
5455    for ac_exec_ext in '' $ac_executable_extensions; do
5456  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5457    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5459    break 2
5460  fi
5461done
5462  done
5463IFS=$as_save_IFS
5464
5465  ;;
5466esac
5467fi
5468TAR=$ac_cv_path_TAR
5469if test -n "$TAR"; then
5470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5471$as_echo "$TAR" >&6; }
5472else
5473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5474$as_echo "no" >&6; }
5475fi
5476
5477
5478  test -n "$TAR" && break
5479done
5480
5481
5482    if test "x$TAR" = x; then
5483        if test "xtar" = x; then
5484          PROG_NAME=tar
5485        else
5486          PROG_NAME=tar
5487        fi
5488        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5489$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5490        as_fn_error $? "Cannot continue" "$LINENO" 5
5491    fi
5492
5493
5494
5495    for ac_prog in tee
5496do
5497  # Extract the first word of "$ac_prog", so it can be a program name with args.
5498set dummy $ac_prog; ac_word=$2
5499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5500$as_echo_n "checking for $ac_word... " >&6; }
5501if test "${ac_cv_path_TEE+set}" = set; then :
5502  $as_echo_n "(cached) " >&6
5503else
5504  case $TEE in
5505  [\\/]* | ?:[\\/]*)
5506  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5507  ;;
5508  *)
5509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5510for as_dir in $PATH
5511do
5512  IFS=$as_save_IFS
5513  test -z "$as_dir" && as_dir=.
5514    for ac_exec_ext in '' $ac_executable_extensions; do
5515  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5516    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5518    break 2
5519  fi
5520done
5521  done
5522IFS=$as_save_IFS
5523
5524  ;;
5525esac
5526fi
5527TEE=$ac_cv_path_TEE
5528if test -n "$TEE"; then
5529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5530$as_echo "$TEE" >&6; }
5531else
5532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5533$as_echo "no" >&6; }
5534fi
5535
5536
5537  test -n "$TEE" && break
5538done
5539
5540
5541    if test "x$TEE" = x; then
5542        if test "xtee" = x; then
5543          PROG_NAME=tee
5544        else
5545          PROG_NAME=tee
5546        fi
5547        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5548$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5549        as_fn_error $? "Cannot continue" "$LINENO" 5
5550    fi
5551
5552
5553
5554    for ac_prog in touch
5555do
5556  # Extract the first word of "$ac_prog", so it can be a program name with args.
5557set dummy $ac_prog; ac_word=$2
5558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5559$as_echo_n "checking for $ac_word... " >&6; }
5560if test "${ac_cv_path_TOUCH+set}" = set; then :
5561  $as_echo_n "(cached) " >&6
5562else
5563  case $TOUCH in
5564  [\\/]* | ?:[\\/]*)
5565  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5566  ;;
5567  *)
5568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5569for as_dir in $PATH
5570do
5571  IFS=$as_save_IFS
5572  test -z "$as_dir" && as_dir=.
5573    for ac_exec_ext in '' $ac_executable_extensions; do
5574  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5575    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5577    break 2
5578  fi
5579done
5580  done
5581IFS=$as_save_IFS
5582
5583  ;;
5584esac
5585fi
5586TOUCH=$ac_cv_path_TOUCH
5587if test -n "$TOUCH"; then
5588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5589$as_echo "$TOUCH" >&6; }
5590else
5591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5592$as_echo "no" >&6; }
5593fi
5594
5595
5596  test -n "$TOUCH" && break
5597done
5598
5599
5600    if test "x$TOUCH" = x; then
5601        if test "xtouch" = x; then
5602          PROG_NAME=touch
5603        else
5604          PROG_NAME=touch
5605        fi
5606        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5607$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5608        as_fn_error $? "Cannot continue" "$LINENO" 5
5609    fi
5610
5611
5612
5613    for ac_prog in tr
5614do
5615  # Extract the first word of "$ac_prog", so it can be a program name with args.
5616set dummy $ac_prog; ac_word=$2
5617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5618$as_echo_n "checking for $ac_word... " >&6; }
5619if test "${ac_cv_path_TR+set}" = set; then :
5620  $as_echo_n "(cached) " >&6
5621else
5622  case $TR in
5623  [\\/]* | ?:[\\/]*)
5624  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5625  ;;
5626  *)
5627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5628for as_dir in $PATH
5629do
5630  IFS=$as_save_IFS
5631  test -z "$as_dir" && as_dir=.
5632    for ac_exec_ext in '' $ac_executable_extensions; do
5633  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5634    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5636    break 2
5637  fi
5638done
5639  done
5640IFS=$as_save_IFS
5641
5642  ;;
5643esac
5644fi
5645TR=$ac_cv_path_TR
5646if test -n "$TR"; then
5647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5648$as_echo "$TR" >&6; }
5649else
5650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5651$as_echo "no" >&6; }
5652fi
5653
5654
5655  test -n "$TR" && break
5656done
5657
5658
5659    if test "x$TR" = x; then
5660        if test "xtr" = x; then
5661          PROG_NAME=tr
5662        else
5663          PROG_NAME=tr
5664        fi
5665        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5666$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5667        as_fn_error $? "Cannot continue" "$LINENO" 5
5668    fi
5669
5670
5671
5672    for ac_prog in uname
5673do
5674  # Extract the first word of "$ac_prog", so it can be a program name with args.
5675set dummy $ac_prog; ac_word=$2
5676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5677$as_echo_n "checking for $ac_word... " >&6; }
5678if test "${ac_cv_path_UNAME+set}" = set; then :
5679  $as_echo_n "(cached) " >&6
5680else
5681  case $UNAME in
5682  [\\/]* | ?:[\\/]*)
5683  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5684  ;;
5685  *)
5686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5687for as_dir in $PATH
5688do
5689  IFS=$as_save_IFS
5690  test -z "$as_dir" && as_dir=.
5691    for ac_exec_ext in '' $ac_executable_extensions; do
5692  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5693    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5695    break 2
5696  fi
5697done
5698  done
5699IFS=$as_save_IFS
5700
5701  ;;
5702esac
5703fi
5704UNAME=$ac_cv_path_UNAME
5705if test -n "$UNAME"; then
5706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5707$as_echo "$UNAME" >&6; }
5708else
5709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5710$as_echo "no" >&6; }
5711fi
5712
5713
5714  test -n "$UNAME" && break
5715done
5716
5717
5718    if test "x$UNAME" = x; then
5719        if test "xuname" = x; then
5720          PROG_NAME=uname
5721        else
5722          PROG_NAME=uname
5723        fi
5724        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5725$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5726        as_fn_error $? "Cannot continue" "$LINENO" 5
5727    fi
5728
5729
5730
5731    for ac_prog in uniq
5732do
5733  # Extract the first word of "$ac_prog", so it can be a program name with args.
5734set dummy $ac_prog; ac_word=$2
5735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5736$as_echo_n "checking for $ac_word... " >&6; }
5737if test "${ac_cv_path_UNIQ+set}" = set; then :
5738  $as_echo_n "(cached) " >&6
5739else
5740  case $UNIQ in
5741  [\\/]* | ?:[\\/]*)
5742  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5743  ;;
5744  *)
5745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5746for as_dir in $PATH
5747do
5748  IFS=$as_save_IFS
5749  test -z "$as_dir" && as_dir=.
5750    for ac_exec_ext in '' $ac_executable_extensions; do
5751  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5752    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5754    break 2
5755  fi
5756done
5757  done
5758IFS=$as_save_IFS
5759
5760  ;;
5761esac
5762fi
5763UNIQ=$ac_cv_path_UNIQ
5764if test -n "$UNIQ"; then
5765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5766$as_echo "$UNIQ" >&6; }
5767else
5768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5769$as_echo "no" >&6; }
5770fi
5771
5772
5773  test -n "$UNIQ" && break
5774done
5775
5776
5777    if test "x$UNIQ" = x; then
5778        if test "xuniq" = x; then
5779          PROG_NAME=uniq
5780        else
5781          PROG_NAME=uniq
5782        fi
5783        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5784$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5785        as_fn_error $? "Cannot continue" "$LINENO" 5
5786    fi
5787
5788
5789
5790    for ac_prog in wc
5791do
5792  # Extract the first word of "$ac_prog", so it can be a program name with args.
5793set dummy $ac_prog; ac_word=$2
5794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5795$as_echo_n "checking for $ac_word... " >&6; }
5796if test "${ac_cv_path_WC+set}" = set; then :
5797  $as_echo_n "(cached) " >&6
5798else
5799  case $WC in
5800  [\\/]* | ?:[\\/]*)
5801  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5802  ;;
5803  *)
5804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5805for as_dir in $PATH
5806do
5807  IFS=$as_save_IFS
5808  test -z "$as_dir" && as_dir=.
5809    for ac_exec_ext in '' $ac_executable_extensions; do
5810  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5811    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5813    break 2
5814  fi
5815done
5816  done
5817IFS=$as_save_IFS
5818
5819  ;;
5820esac
5821fi
5822WC=$ac_cv_path_WC
5823if test -n "$WC"; then
5824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5825$as_echo "$WC" >&6; }
5826else
5827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5828$as_echo "no" >&6; }
5829fi
5830
5831
5832  test -n "$WC" && break
5833done
5834
5835
5836    if test "x$WC" = x; then
5837        if test "xwc" = x; then
5838          PROG_NAME=wc
5839        else
5840          PROG_NAME=wc
5841        fi
5842        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5843$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5844        as_fn_error $? "Cannot continue" "$LINENO" 5
5845    fi
5846
5847
5848
5849    for ac_prog in which
5850do
5851  # Extract the first word of "$ac_prog", so it can be a program name with args.
5852set dummy $ac_prog; ac_word=$2
5853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5854$as_echo_n "checking for $ac_word... " >&6; }
5855if test "${ac_cv_path_WHICH+set}" = set; then :
5856  $as_echo_n "(cached) " >&6
5857else
5858  case $WHICH in
5859  [\\/]* | ?:[\\/]*)
5860  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5861  ;;
5862  *)
5863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5864for as_dir in $PATH
5865do
5866  IFS=$as_save_IFS
5867  test -z "$as_dir" && as_dir=.
5868    for ac_exec_ext in '' $ac_executable_extensions; do
5869  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5870    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5872    break 2
5873  fi
5874done
5875  done
5876IFS=$as_save_IFS
5877
5878  ;;
5879esac
5880fi
5881WHICH=$ac_cv_path_WHICH
5882if test -n "$WHICH"; then
5883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5884$as_echo "$WHICH" >&6; }
5885else
5886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5887$as_echo "no" >&6; }
5888fi
5889
5890
5891  test -n "$WHICH" && break
5892done
5893
5894
5895    if test "x$WHICH" = x; then
5896        if test "xwhich" = x; then
5897          PROG_NAME=which
5898        else
5899          PROG_NAME=which
5900        fi
5901        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5902$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5903        as_fn_error $? "Cannot continue" "$LINENO" 5
5904    fi
5905
5906
5907
5908    for ac_prog in xargs
5909do
5910  # Extract the first word of "$ac_prog", so it can be a program name with args.
5911set dummy $ac_prog; ac_word=$2
5912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5913$as_echo_n "checking for $ac_word... " >&6; }
5914if test "${ac_cv_path_XARGS+set}" = set; then :
5915  $as_echo_n "(cached) " >&6
5916else
5917  case $XARGS in
5918  [\\/]* | ?:[\\/]*)
5919  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5920  ;;
5921  *)
5922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5923for as_dir in $PATH
5924do
5925  IFS=$as_save_IFS
5926  test -z "$as_dir" && as_dir=.
5927    for ac_exec_ext in '' $ac_executable_extensions; do
5928  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5929    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5931    break 2
5932  fi
5933done
5934  done
5935IFS=$as_save_IFS
5936
5937  ;;
5938esac
5939fi
5940XARGS=$ac_cv_path_XARGS
5941if test -n "$XARGS"; then
5942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5943$as_echo "$XARGS" >&6; }
5944else
5945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5946$as_echo "no" >&6; }
5947fi
5948
5949
5950  test -n "$XARGS" && break
5951done
5952
5953
5954    if test "x$XARGS" = x; then
5955        if test "xxargs" = x; then
5956          PROG_NAME=xargs
5957        else
5958          PROG_NAME=xargs
5959        fi
5960        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5961$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5962        as_fn_error $? "Cannot continue" "$LINENO" 5
5963    fi
5964
5965
5966
5967# Then required tools that require some special treatment.
5968for ac_prog in gawk mawk nawk awk
5969do
5970  # Extract the first word of "$ac_prog", so it can be a program name with args.
5971set dummy $ac_prog; ac_word=$2
5972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5973$as_echo_n "checking for $ac_word... " >&6; }
5974if test "${ac_cv_prog_AWK+set}" = set; then :
5975  $as_echo_n "(cached) " >&6
5976else
5977  if test -n "$AWK"; then
5978  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5979else
5980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5981for as_dir in $PATH
5982do
5983  IFS=$as_save_IFS
5984  test -z "$as_dir" && as_dir=.
5985    for ac_exec_ext in '' $ac_executable_extensions; do
5986  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5987    ac_cv_prog_AWK="$ac_prog"
5988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5989    break 2
5990  fi
5991done
5992  done
5993IFS=$as_save_IFS
5994
5995fi
5996fi
5997AWK=$ac_cv_prog_AWK
5998if test -n "$AWK"; then
5999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6000$as_echo "$AWK" >&6; }
6001else
6002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6003$as_echo "no" >&6; }
6004fi
6005
6006
6007  test -n "$AWK" && break
6008done
6009
6010
6011    if test "x$AWK" = x; then
6012        if test "x" = x; then
6013          PROG_NAME=awk
6014        else
6015          PROG_NAME=
6016        fi
6017        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6018$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6019        as_fn_error $? "Cannot continue" "$LINENO" 5
6020    fi
6021
6022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6023$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6024if test "${ac_cv_path_GREP+set}" = set; then :
6025  $as_echo_n "(cached) " >&6
6026else
6027  if test -z "$GREP"; then
6028  ac_path_GREP_found=false
6029  # Loop through the user's path and test for each of PROGNAME-LIST
6030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6031for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6032do
6033  IFS=$as_save_IFS
6034  test -z "$as_dir" && as_dir=.
6035    for ac_prog in grep ggrep; do
6036    for ac_exec_ext in '' $ac_executable_extensions; do
6037      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6038      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6039# Check for GNU ac_path_GREP and select it if it is found.
6040  # Check for GNU $ac_path_GREP
6041case `"$ac_path_GREP" --version 2>&1` in
6042*GNU*)
6043  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6044*)
6045  ac_count=0
6046  $as_echo_n 0123456789 >"conftest.in"
6047  while :
6048  do
6049    cat "conftest.in" "conftest.in" >"conftest.tmp"
6050    mv "conftest.tmp" "conftest.in"
6051    cp "conftest.in" "conftest.nl"
6052    $as_echo 'GREP' >> "conftest.nl"
6053    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6054    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6055    as_fn_arith $ac_count + 1 && ac_count=$as_val
6056    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6057      # Best one so far, save it but keep looking for a better one
6058      ac_cv_path_GREP="$ac_path_GREP"
6059      ac_path_GREP_max=$ac_count
6060    fi
6061    # 10*(2^10) chars as input seems more than enough
6062    test $ac_count -gt 10 && break
6063  done
6064  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6065esac
6066
6067      $ac_path_GREP_found && break 3
6068    done
6069  done
6070  done
6071IFS=$as_save_IFS
6072  if test -z "$ac_cv_path_GREP"; then
6073    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6074  fi
6075else
6076  ac_cv_path_GREP=$GREP
6077fi
6078
6079fi
6080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6081$as_echo "$ac_cv_path_GREP" >&6; }
6082 GREP="$ac_cv_path_GREP"
6083
6084
6085
6086    if test "x$GREP" = x; then
6087        if test "x" = x; then
6088          PROG_NAME=grep
6089        else
6090          PROG_NAME=
6091        fi
6092        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6093$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6094        as_fn_error $? "Cannot continue" "$LINENO" 5
6095    fi
6096
6097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6098$as_echo_n "checking for egrep... " >&6; }
6099if test "${ac_cv_path_EGREP+set}" = set; then :
6100  $as_echo_n "(cached) " >&6
6101else
6102  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6103   then ac_cv_path_EGREP="$GREP -E"
6104   else
6105     if test -z "$EGREP"; then
6106  ac_path_EGREP_found=false
6107  # Loop through the user's path and test for each of PROGNAME-LIST
6108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6109for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6110do
6111  IFS=$as_save_IFS
6112  test -z "$as_dir" && as_dir=.
6113    for ac_prog in egrep; do
6114    for ac_exec_ext in '' $ac_executable_extensions; do
6115      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6116      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6117# Check for GNU ac_path_EGREP and select it if it is found.
6118  # Check for GNU $ac_path_EGREP
6119case `"$ac_path_EGREP" --version 2>&1` in
6120*GNU*)
6121  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6122*)
6123  ac_count=0
6124  $as_echo_n 0123456789 >"conftest.in"
6125  while :
6126  do
6127    cat "conftest.in" "conftest.in" >"conftest.tmp"
6128    mv "conftest.tmp" "conftest.in"
6129    cp "conftest.in" "conftest.nl"
6130    $as_echo 'EGREP' >> "conftest.nl"
6131    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6132    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6133    as_fn_arith $ac_count + 1 && ac_count=$as_val
6134    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6135      # Best one so far, save it but keep looking for a better one
6136      ac_cv_path_EGREP="$ac_path_EGREP"
6137      ac_path_EGREP_max=$ac_count
6138    fi
6139    # 10*(2^10) chars as input seems more than enough
6140    test $ac_count -gt 10 && break
6141  done
6142  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6143esac
6144
6145      $ac_path_EGREP_found && break 3
6146    done
6147  done
6148  done
6149IFS=$as_save_IFS
6150  if test -z "$ac_cv_path_EGREP"; then
6151    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6152  fi
6153else
6154  ac_cv_path_EGREP=$EGREP
6155fi
6156
6157   fi
6158fi
6159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6160$as_echo "$ac_cv_path_EGREP" >&6; }
6161 EGREP="$ac_cv_path_EGREP"
6162
6163
6164
6165    if test "x$EGREP" = x; then
6166        if test "x" = x; then
6167          PROG_NAME=egrep
6168        else
6169          PROG_NAME=
6170        fi
6171        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6172$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6173        as_fn_error $? "Cannot continue" "$LINENO" 5
6174    fi
6175
6176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6177$as_echo_n "checking for fgrep... " >&6; }
6178if test "${ac_cv_path_FGREP+set}" = set; then :
6179  $as_echo_n "(cached) " >&6
6180else
6181  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6182   then ac_cv_path_FGREP="$GREP -F"
6183   else
6184     if test -z "$FGREP"; then
6185  ac_path_FGREP_found=false
6186  # Loop through the user's path and test for each of PROGNAME-LIST
6187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6188for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6189do
6190  IFS=$as_save_IFS
6191  test -z "$as_dir" && as_dir=.
6192    for ac_prog in fgrep; do
6193    for ac_exec_ext in '' $ac_executable_extensions; do
6194      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6195      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6196# Check for GNU ac_path_FGREP and select it if it is found.
6197  # Check for GNU $ac_path_FGREP
6198case `"$ac_path_FGREP" --version 2>&1` in
6199*GNU*)
6200  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6201*)
6202  ac_count=0
6203  $as_echo_n 0123456789 >"conftest.in"
6204  while :
6205  do
6206    cat "conftest.in" "conftest.in" >"conftest.tmp"
6207    mv "conftest.tmp" "conftest.in"
6208    cp "conftest.in" "conftest.nl"
6209    $as_echo 'FGREP' >> "conftest.nl"
6210    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6211    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6212    as_fn_arith $ac_count + 1 && ac_count=$as_val
6213    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6214      # Best one so far, save it but keep looking for a better one
6215      ac_cv_path_FGREP="$ac_path_FGREP"
6216      ac_path_FGREP_max=$ac_count
6217    fi
6218    # 10*(2^10) chars as input seems more than enough
6219    test $ac_count -gt 10 && break
6220  done
6221  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6222esac
6223
6224      $ac_path_FGREP_found && break 3
6225    done
6226  done
6227  done
6228IFS=$as_save_IFS
6229  if test -z "$ac_cv_path_FGREP"; then
6230    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6231  fi
6232else
6233  ac_cv_path_FGREP=$FGREP
6234fi
6235
6236   fi
6237fi
6238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6239$as_echo "$ac_cv_path_FGREP" >&6; }
6240 FGREP="$ac_cv_path_FGREP"
6241
6242
6243
6244    if test "x$FGREP" = x; then
6245        if test "x" = x; then
6246          PROG_NAME=fgrep
6247        else
6248          PROG_NAME=
6249        fi
6250        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6251$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6252        as_fn_error $? "Cannot continue" "$LINENO" 5
6253    fi
6254
6255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6256$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6257if test "${ac_cv_path_SED+set}" = set; then :
6258  $as_echo_n "(cached) " >&6
6259else
6260            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6261     for ac_i in 1 2 3 4 5 6 7; do
6262       ac_script="$ac_script$as_nl$ac_script"
6263     done
6264     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6265     { ac_script=; unset ac_script;}
6266     if test -z "$SED"; then
6267  ac_path_SED_found=false
6268  # Loop through the user's path and test for each of PROGNAME-LIST
6269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6270for as_dir in $PATH
6271do
6272  IFS=$as_save_IFS
6273  test -z "$as_dir" && as_dir=.
6274    for ac_prog in sed gsed; do
6275    for ac_exec_ext in '' $ac_executable_extensions; do
6276      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6277      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6278# Check for GNU ac_path_SED and select it if it is found.
6279  # Check for GNU $ac_path_SED
6280case `"$ac_path_SED" --version 2>&1` in
6281*GNU*)
6282  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6283*)
6284  ac_count=0
6285  $as_echo_n 0123456789 >"conftest.in"
6286  while :
6287  do
6288    cat "conftest.in" "conftest.in" >"conftest.tmp"
6289    mv "conftest.tmp" "conftest.in"
6290    cp "conftest.in" "conftest.nl"
6291    $as_echo '' >> "conftest.nl"
6292    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6293    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6294    as_fn_arith $ac_count + 1 && ac_count=$as_val
6295    if test $ac_count -gt ${ac_path_SED_max-0}; then
6296      # Best one so far, save it but keep looking for a better one
6297      ac_cv_path_SED="$ac_path_SED"
6298      ac_path_SED_max=$ac_count
6299    fi
6300    # 10*(2^10) chars as input seems more than enough
6301    test $ac_count -gt 10 && break
6302  done
6303  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6304esac
6305
6306      $ac_path_SED_found && break 3
6307    done
6308  done
6309  done
6310IFS=$as_save_IFS
6311  if test -z "$ac_cv_path_SED"; then
6312    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6313  fi
6314else
6315  ac_cv_path_SED=$SED
6316fi
6317
6318fi
6319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6320$as_echo "$ac_cv_path_SED" >&6; }
6321 SED="$ac_cv_path_SED"
6322  rm -f conftest.sed
6323
6324
6325    if test "x$SED" = x; then
6326        if test "x" = x; then
6327          PROG_NAME=sed
6328        else
6329          PROG_NAME=
6330        fi
6331        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6332$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6333        as_fn_error $? "Cannot continue" "$LINENO" 5
6334    fi
6335
6336
6337for ac_prog in nawk gawk awk
6338do
6339  # Extract the first word of "$ac_prog", so it can be a program name with args.
6340set dummy $ac_prog; ac_word=$2
6341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6342$as_echo_n "checking for $ac_word... " >&6; }
6343if test "${ac_cv_path_NAWK+set}" = set; then :
6344  $as_echo_n "(cached) " >&6
6345else
6346  case $NAWK in
6347  [\\/]* | ?:[\\/]*)
6348  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6349  ;;
6350  *)
6351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6352for as_dir in $PATH
6353do
6354  IFS=$as_save_IFS
6355  test -z "$as_dir" && as_dir=.
6356    for ac_exec_ext in '' $ac_executable_extensions; do
6357  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6358    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6360    break 2
6361  fi
6362done
6363  done
6364IFS=$as_save_IFS
6365
6366  ;;
6367esac
6368fi
6369NAWK=$ac_cv_path_NAWK
6370if test -n "$NAWK"; then
6371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6372$as_echo "$NAWK" >&6; }
6373else
6374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6375$as_echo "no" >&6; }
6376fi
6377
6378
6379  test -n "$NAWK" && break
6380done
6381
6382
6383    if test "x$NAWK" = x; then
6384        if test "x" = x; then
6385          PROG_NAME=nawk
6386        else
6387          PROG_NAME=
6388        fi
6389        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6390$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6391        as_fn_error $? "Cannot continue" "$LINENO" 5
6392    fi
6393
6394
6395# Always force rm.
6396RM="$RM -f"
6397
6398# These are not required on all platforms
6399# Extract the first word of "cygpath", so it can be a program name with args.
6400set dummy cygpath; ac_word=$2
6401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6402$as_echo_n "checking for $ac_word... " >&6; }
6403if test "${ac_cv_path_CYGPATH+set}" = set; then :
6404  $as_echo_n "(cached) " >&6
6405else
6406  case $CYGPATH in
6407  [\\/]* | ?:[\\/]*)
6408  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6409  ;;
6410  *)
6411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6412for as_dir in $PATH
6413do
6414  IFS=$as_save_IFS
6415  test -z "$as_dir" && as_dir=.
6416    for ac_exec_ext in '' $ac_executable_extensions; do
6417  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6418    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6420    break 2
6421  fi
6422done
6423  done
6424IFS=$as_save_IFS
6425
6426  ;;
6427esac
6428fi
6429CYGPATH=$ac_cv_path_CYGPATH
6430if test -n "$CYGPATH"; then
6431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6432$as_echo "$CYGPATH" >&6; }
6433else
6434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6435$as_echo "no" >&6; }
6436fi
6437
6438
6439# Extract the first word of "readlink", so it can be a program name with args.
6440set dummy readlink; ac_word=$2
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6442$as_echo_n "checking for $ac_word... " >&6; }
6443if test "${ac_cv_path_READLINK+set}" = set; then :
6444  $as_echo_n "(cached) " >&6
6445else
6446  case $READLINK in
6447  [\\/]* | ?:[\\/]*)
6448  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6449  ;;
6450  *)
6451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6452for as_dir in $PATH
6453do
6454  IFS=$as_save_IFS
6455  test -z "$as_dir" && as_dir=.
6456    for ac_exec_ext in '' $ac_executable_extensions; do
6457  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6458    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6460    break 2
6461  fi
6462done
6463  done
6464IFS=$as_save_IFS
6465
6466  ;;
6467esac
6468fi
6469READLINK=$ac_cv_path_READLINK
6470if test -n "$READLINK"; then
6471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6472$as_echo "$READLINK" >&6; }
6473else
6474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6475$as_echo "no" >&6; }
6476fi
6477
6478
6479# Extract the first word of "df", so it can be a program name with args.
6480set dummy df; ac_word=$2
6481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6482$as_echo_n "checking for $ac_word... " >&6; }
6483if test "${ac_cv_path_DF+set}" = set; then :
6484  $as_echo_n "(cached) " >&6
6485else
6486  case $DF in
6487  [\\/]* | ?:[\\/]*)
6488  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6489  ;;
6490  *)
6491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6492for as_dir in $PATH
6493do
6494  IFS=$as_save_IFS
6495  test -z "$as_dir" && as_dir=.
6496    for ac_exec_ext in '' $ac_executable_extensions; do
6497  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6498    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6500    break 2
6501  fi
6502done
6503  done
6504IFS=$as_save_IFS
6505
6506  ;;
6507esac
6508fi
6509DF=$ac_cv_path_DF
6510if test -n "$DF"; then
6511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6512$as_echo "$DF" >&6; }
6513else
6514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6515$as_echo "no" >&6; }
6516fi
6517
6518
6519# Extract the first word of "SetFile", so it can be a program name with args.
6520set dummy SetFile; ac_word=$2
6521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6522$as_echo_n "checking for $ac_word... " >&6; }
6523if test "${ac_cv_path_SETFILE+set}" = set; then :
6524  $as_echo_n "(cached) " >&6
6525else
6526  case $SETFILE in
6527  [\\/]* | ?:[\\/]*)
6528  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6529  ;;
6530  *)
6531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6532for as_dir in $PATH
6533do
6534  IFS=$as_save_IFS
6535  test -z "$as_dir" && as_dir=.
6536    for ac_exec_ext in '' $ac_executable_extensions; do
6537  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6538    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6540    break 2
6541  fi
6542done
6543  done
6544IFS=$as_save_IFS
6545
6546  ;;
6547esac
6548fi
6549SETFILE=$ac_cv_path_SETFILE
6550if test -n "$SETFILE"; then
6551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6552$as_echo "$SETFILE" >&6; }
6553else
6554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6555$as_echo "no" >&6; }
6556fi
6557
6558
6559
6560
6561# Now we can determine OpenJDK build and target platforms. This is required to
6562# have early on.
6563# Make sure we can run config.sub.
6564$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6565  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6566
6567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6568$as_echo_n "checking build system type... " >&6; }
6569if test "${ac_cv_build+set}" = set; then :
6570  $as_echo_n "(cached) " >&6
6571else
6572  ac_build_alias=$build_alias
6573test "x$ac_build_alias" = x &&
6574  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6575test "x$ac_build_alias" = x &&
6576  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6577ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6578  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6579
6580fi
6581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6582$as_echo "$ac_cv_build" >&6; }
6583case $ac_cv_build in
6584*-*-*) ;;
6585*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6586esac
6587build=$ac_cv_build
6588ac_save_IFS=$IFS; IFS='-'
6589set x $ac_cv_build
6590shift
6591build_cpu=$1
6592build_vendor=$2
6593shift; shift
6594# Remember, the first character of IFS is used to create $*,
6595# except with old shells:
6596build_os=$*
6597IFS=$ac_save_IFS
6598case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6599
6600
6601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6602$as_echo_n "checking host system type... " >&6; }
6603if test "${ac_cv_host+set}" = set; then :
6604  $as_echo_n "(cached) " >&6
6605else
6606  if test "x$host_alias" = x; then
6607  ac_cv_host=$ac_cv_build
6608else
6609  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6610    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6611fi
6612
6613fi
6614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6615$as_echo "$ac_cv_host" >&6; }
6616case $ac_cv_host in
6617*-*-*) ;;
6618*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6619esac
6620host=$ac_cv_host
6621ac_save_IFS=$IFS; IFS='-'
6622set x $ac_cv_host
6623shift
6624host_cpu=$1
6625host_vendor=$2
6626shift; shift
6627# Remember, the first character of IFS is used to create $*,
6628# except with old shells:
6629host_os=$*
6630IFS=$ac_save_IFS
6631case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6632
6633
6634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6635$as_echo_n "checking target system type... " >&6; }
6636if test "${ac_cv_target+set}" = set; then :
6637  $as_echo_n "(cached) " >&6
6638else
6639  if test "x$target_alias" = x; then
6640  ac_cv_target=$ac_cv_host
6641else
6642  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6643    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6644fi
6645
6646fi
6647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6648$as_echo "$ac_cv_target" >&6; }
6649case $ac_cv_target in
6650*-*-*) ;;
6651*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6652esac
6653target=$ac_cv_target
6654ac_save_IFS=$IFS; IFS='-'
6655set x $ac_cv_target
6656shift
6657target_cpu=$1
6658target_vendor=$2
6659shift; shift
6660# Remember, the first character of IFS is used to create $*,
6661# except with old shells:
6662target_os=$*
6663IFS=$ac_save_IFS
6664case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6665
6666
6667# The aliases save the names the user supplied, while $host etc.
6668# will get canonicalized.
6669test -n "$target_alias" &&
6670  test "$program_prefix$program_suffix$program_transform_name" = \
6671    NONENONEs,x,x, &&
6672  program_prefix=${target_alias}-
6673
6674# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6675# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6676# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6677# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6678# to use the configure naming style.
6679
6680
6681
6682
6683
6684    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6685    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6686    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6687    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6688    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6689    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6690
6691
6692
6693    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6694
6695  case "$build_os" in
6696    *linux*)
6697      VAR_OS=linux
6698      VAR_OS_API=posix
6699      VAR_OS_ENV=linux
6700      ;;
6701    *solaris*)
6702      VAR_OS=solaris
6703      VAR_OS_API=posix
6704      VAR_OS_ENV=solaris
6705      ;;
6706    *darwin*)
6707      VAR_OS=macosx
6708      VAR_OS_API=posix
6709      VAR_OS_ENV=macosx
6710      ;;
6711    *bsd*)
6712      VAR_OS=bsd
6713      VAR_OS_API=posix
6714      VAR_OS_ENV=bsd
6715      ;;
6716    *cygwin*)
6717      VAR_OS=windows
6718      VAR_OS_API=winapi
6719      VAR_OS_ENV=windows.cygwin
6720      ;;
6721    *mingw*)
6722      VAR_OS=windows
6723      VAR_OS_API=winapi
6724      VAR_OS_ENV=windows.msys
6725      ;;
6726    *)
6727      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6728      ;;
6729  esac
6730
6731
6732  # First argument is the cpu name from the trip/quad
6733  case "$build_cpu" in
6734    x86_64)
6735      VAR_CPU=x86_64
6736      VAR_CPU_ARCH=x86
6737      VAR_CPU_BITS=64
6738      VAR_CPU_ENDIAN=little
6739      ;;
6740    i?86)
6741      VAR_CPU=x86
6742      VAR_CPU_ARCH=x86
6743      VAR_CPU_BITS=32
6744      VAR_CPU_ENDIAN=little
6745      ;;
6746    arm*)
6747      VAR_CPU=arm
6748      VAR_CPU_ARCH=arm
6749      VAR_CPU_BITS=32
6750      VAR_CPU_ENDIAN=little
6751      ;;
6752    powerpc)
6753      VAR_CPU=ppc
6754      VAR_CPU_ARCH=ppc
6755      VAR_CPU_BITS=32
6756      VAR_CPU_ENDIAN=big
6757       ;;
6758    powerpc64)
6759      VAR_CPU=ppc64
6760      VAR_CPU_ARCH=ppc
6761      VAR_CPU_BITS=64
6762      VAR_CPU_ENDIAN=big
6763       ;;
6764    sparc)
6765      VAR_CPU=sparc
6766      VAR_CPU_ARCH=sparc
6767      VAR_CPU_BITS=32
6768      VAR_CPU_ENDIAN=big
6769       ;;
6770    sparcv9)
6771      VAR_CPU=sparcv9
6772      VAR_CPU_ARCH=sparc
6773      VAR_CPU_BITS=64
6774      VAR_CPU_ENDIAN=big
6775       ;;
6776    *)
6777      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6778      ;;
6779  esac
6780
6781    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6782    OPENJDK_BUILD_OS="$VAR_OS"
6783    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6784    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6785    OPENJDK_BUILD_CPU="$VAR_CPU"
6786    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6787    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6788    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6789
6790
6791
6792
6793
6794
6795
6796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6797$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6799$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6800
6801    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6802
6803  case "$host_os" in
6804    *linux*)
6805      VAR_OS=linux
6806      VAR_OS_API=posix
6807      VAR_OS_ENV=linux
6808      ;;
6809    *solaris*)
6810      VAR_OS=solaris
6811      VAR_OS_API=posix
6812      VAR_OS_ENV=solaris
6813      ;;
6814    *darwin*)
6815      VAR_OS=macosx
6816      VAR_OS_API=posix
6817      VAR_OS_ENV=macosx
6818      ;;
6819    *bsd*)
6820      VAR_OS=bsd
6821      VAR_OS_API=posix
6822      VAR_OS_ENV=bsd
6823      ;;
6824    *cygwin*)
6825      VAR_OS=windows
6826      VAR_OS_API=winapi
6827      VAR_OS_ENV=windows.cygwin
6828      ;;
6829    *mingw*)
6830      VAR_OS=windows
6831      VAR_OS_API=winapi
6832      VAR_OS_ENV=windows.msys
6833      ;;
6834    *)
6835      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6836      ;;
6837  esac
6838
6839
6840  # First argument is the cpu name from the trip/quad
6841  case "$host_cpu" in
6842    x86_64)
6843      VAR_CPU=x86_64
6844      VAR_CPU_ARCH=x86
6845      VAR_CPU_BITS=64
6846      VAR_CPU_ENDIAN=little
6847      ;;
6848    i?86)
6849      VAR_CPU=x86
6850      VAR_CPU_ARCH=x86
6851      VAR_CPU_BITS=32
6852      VAR_CPU_ENDIAN=little
6853      ;;
6854    arm*)
6855      VAR_CPU=arm
6856      VAR_CPU_ARCH=arm
6857      VAR_CPU_BITS=32
6858      VAR_CPU_ENDIAN=little
6859      ;;
6860    powerpc)
6861      VAR_CPU=ppc
6862      VAR_CPU_ARCH=ppc
6863      VAR_CPU_BITS=32
6864      VAR_CPU_ENDIAN=big
6865       ;;
6866    powerpc64)
6867      VAR_CPU=ppc64
6868      VAR_CPU_ARCH=ppc
6869      VAR_CPU_BITS=64
6870      VAR_CPU_ENDIAN=big
6871       ;;
6872    sparc)
6873      VAR_CPU=sparc
6874      VAR_CPU_ARCH=sparc
6875      VAR_CPU_BITS=32
6876      VAR_CPU_ENDIAN=big
6877       ;;
6878    sparcv9)
6879      VAR_CPU=sparcv9
6880      VAR_CPU_ARCH=sparc
6881      VAR_CPU_BITS=64
6882      VAR_CPU_ENDIAN=big
6883       ;;
6884    *)
6885      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6886      ;;
6887  esac
6888
6889    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6890    OPENJDK_TARGET_OS="$VAR_OS"
6891    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6892    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6893    OPENJDK_TARGET_CPU="$VAR_CPU"
6894    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6895    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6896    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6897
6898
6899
6900
6901
6902
6903
6904    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6905$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6907$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6908
6909
6910
6911# Check whether --with-target-bits was given.
6912if test "${with_target_bits+set}" = set; then :
6913  withval=$with_target_bits;
6914fi
6915
6916
6917  # We have three types of compiles:
6918  # native  == normal compilation, target system == build system
6919  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6920  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6921  #
6922  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6923    # We're doing a proper cross-compilation
6924    COMPILE_TYPE="cross"
6925  else
6926    COMPILE_TYPE="native"
6927  fi
6928
6929  if test "x$with_target_bits" != x; then
6930    if test "x$COMPILE_TYPE" = "xcross"; then
6931      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6932    fi
6933
6934    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6935      # A reduced build is requested
6936      COMPILE_TYPE="reduced"
6937      OPENJDK_TARGET_CPU_BITS=32
6938      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6939        OPENJDK_TARGET_CPU=x86
6940      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6941        OPENJDK_TARGET_CPU=sparc
6942      else
6943        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6944      fi
6945    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6946      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
6947    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6948      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6949$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6950    else
6951      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6952    fi
6953  fi
6954
6955
6956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6957$as_echo_n "checking compilation type... " >&6; }
6958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6959$as_echo "$COMPILE_TYPE" >&6; }
6960
6961
6962    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6963       REQUIRED_OS_NAME=SunOS
6964       REQUIRED_OS_VERSION=5.10
6965    fi
6966    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6967       REQUIRED_OS_NAME=Linux
6968       REQUIRED_OS_VERSION=2.6
6969    fi
6970    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6971        REQUIRED_OS_NAME=Windows
6972        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6973            REQUIRED_OS_VERSION=5.2
6974        else
6975            REQUIRED_OS_VERSION=5.1
6976        fi
6977    fi
6978    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6979        REQUIRED_OS_NAME=Darwin
6980        REQUIRED_OS_VERSION=11.2
6981    fi
6982
6983
6984
6985
6986
6987    # Also store the legacy naming of the cpu.
6988    # Ie i586 and amd64 instead of x86 and x86_64
6989    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6990    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6991      OPENJDK_TARGET_CPU_LEGACY="i586"
6992    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6993      # On all platforms except MacOSX replace x86_64 with amd64.
6994      OPENJDK_TARGET_CPU_LEGACY="amd64"
6995    fi
6996
6997
6998    # And the second legacy naming of the cpu.
6999    # Ie i386 and amd64 instead of x86 and x86_64.
7000    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7001    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7002      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7003    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7004      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7005    fi
7006
7007
7008    # This is the name of the cpu (but using i386 and amd64 instead of
7009    # x86 and x86_64, respectively), preceeded by a /, to be used when
7010    # locating libraries. On macosx, it's empty, though.
7011    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7012    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7013        OPENJDK_TARGET_CPU_LIBDIR=""
7014    fi
7015
7016
7017    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7018    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7019    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7020    OPENJDK_TARGET_CPU_ISADIR=""
7021    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7022      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7023          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7024      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7025          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7026      fi
7027    fi
7028
7029
7030    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7031    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7032    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7033      # On linux only, we replace x86 with i386.
7034      OPENJDK_TARGET_CPU_OSARCH="i386"
7035    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7036      # On all platforms except macosx, we replace x86_64 with amd64.
7037      OPENJDK_TARGET_CPU_OSARCH="amd64"
7038    fi
7039
7040
7041    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7042    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7043      OPENJDK_TARGET_CPU_JLI="i386"
7044    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7045      # On all platforms except macosx, we replace x86_64 with amd64.
7046      OPENJDK_TARGET_CPU_JLI="amd64"
7047    fi
7048    # Now setup the -D flags for building libjli.
7049    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7050    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7051      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7052        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7053      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7054        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7055      fi
7056    fi
7057
7058
7059    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7060    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7061        OPENJDK_TARGET_OS_API_DIR="solaris"
7062    fi
7063    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7064        OPENJDK_TARGET_OS_API_DIR="windows"
7065    fi
7066
7067
7068    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7069        A_LP64="LP64:="
7070        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7071        # unpack200.exe
7072        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7073            ADD_LP64="-D_LP64=1"
7074        fi
7075    fi
7076    LP64=$A_LP64
7077
7078
7079    if test "x$COMPILE_TYPE" = "xcross"; then
7080      # FIXME: ... or should this include reduced builds..?
7081      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7082    else
7083      DEFINE_CROSS_COMPILE_ARCH=""
7084    fi
7085
7086
7087
7088
7089# Continue setting up basic stuff. Most remaining code require fundamental tools.
7090
7091# Locate the directory of this script.
7092SCRIPT="$0"
7093
7094    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7095        # Follow a chain of symbolic links. Use readlink
7096        # where it exists, else fall back to horribly
7097        # complicated shell code.
7098        if test "x$READLINK_TESTED" != yes; then
7099            # On MacOSX there is a readlink tool with a different
7100            # purpose than the GNU readlink tool. Check the found readlink.
7101            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7102            if test "x$ISGNU" = x; then
7103                 # A readlink that we do not know how to use.
7104                 # Are there other non-GNU readlinks out there?
7105                 READLINK_TESTED=yes
7106                 READLINK=
7107            fi
7108        fi
7109
7110        if test "x$READLINK" != x; then
7111            SCRIPT=`$READLINK -f $SCRIPT`
7112        else
7113            # Save the current directory for restoring afterwards
7114            STARTDIR=$PWD
7115            COUNTER=0
7116            sym_link_dir=`$DIRNAME $SCRIPT`
7117            sym_link_file=`$BASENAME $SCRIPT`
7118            # Use the system pwd and not the shell builtin to resolve directory symlinks
7119            cd $sym_link_dir
7120            cd `$THEPWDCMD`
7121            sym_link_dir=`$THEPWDCMD`
7122            # Resolve file symlinks
7123            while test $COUNTER -lt 20; do
7124                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7125                if test "x$ISLINK" == x; then
7126                    # This is not a symbolic link! We are done!
7127                    break
7128                fi
7129                # Again resolve directory symlinks since the target of the just found
7130                # link could be in a different directory
7131                cd `$DIRNAME $ISLINK`
7132                sym_link_dir=`$THEPWDCMD`
7133                sym_link_file=`$BASENAME $ISLINK`
7134                let COUNTER=COUNTER+1
7135            done
7136            cd $STARTDIR
7137            SCRIPT=$sym_link_dir/$sym_link_file
7138        fi
7139    fi
7140
7141AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7142
7143# Where is the source? It is located two levels above the configure script.
7144CURDIR="$PWD"
7145cd "$AUTOCONF_DIR/../.."
7146SRC_ROOT="`$THEPWDCMD`"
7147
7148if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7149  PATH_SEP=";"
7150
7151  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7152  if test $SRC_ROOT_LENGTH -gt 100; then
7153      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7154  fi
7155
7156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7158$as_echo_n "checking cygwin release... " >&6; }
7159    CYGWIN_VERSION=`$UNAME -r`
7160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7161$as_echo "$CYGWIN_VERSION" >&6; }
7162    WINDOWS_ENV_VENDOR='cygwin'
7163    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7164
7165    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7166    if test "x$CYGWIN_VERSION_OK" = x; then
7167      { $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
7168$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;}
7169      as_fn_error $? "Cannot continue" "$LINENO" 5
7170    fi
7171    if test "x$CYGPATH" = x; then
7172        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7173    fi
7174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7175$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7176    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7177    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7178    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7179    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7181$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7182    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7183    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7184    if test "x$test_cygdrive_prefix" = x; then
7185        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7186    fi
7187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7189$as_echo_n "checking msys release... " >&6; }
7190    MSYS_VERSION=`$UNAME -r`
7191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7192$as_echo "$MSYS_VERSION" >&6; }
7193
7194    WINDOWS_ENV_VENDOR='msys'
7195    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7196
7197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7198$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7199    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7200    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7201
7202  windows_path="$MSYS_ROOT_PATH"
7203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7204    unix_path=`$CYGPATH -u "$windows_path"`
7205    MSYS_ROOT_PATH="$unix_path"
7206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7208    MSYS_ROOT_PATH="$unix_path"
7209  fi
7210
7211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7212$as_echo "$MSYS_ROOT_PATH" >&6; }
7213    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7214  else
7215    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7216  fi
7217
7218  # Test if windows or unix (cygwin/msys) find is first in path.
7219  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7220$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7221  FIND_BINARY_OUTPUT=`find --version 2>&1`
7222  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7224$as_echo "unix style" >&6; }
7225  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7227$as_echo "Windows" >&6; }
7228    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7229$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7230    { $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
7231$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7232    as_fn_error $? "Cannot continue" "$LINENO" 5
7233  else
7234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7235$as_echo "unknown" >&6; }
7236    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7237$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7238  fi
7239
7240else
7241  PATH_SEP=":"
7242fi
7243
7244
7245
7246cd "$CURDIR"
7247
7248
7249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7250
7251  # Input might be given as Windows format, start by converting to
7252  # unix format.
7253  path="$SRC_ROOT"
7254  new_path=`$CYGPATH -u "$path"`
7255
7256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7259  # "foo.exe" is OK but "foo" is an error.
7260  #
7261  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7262  # It is also a way to make sure we got the proper file name for the real test later on.
7263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7264  if test "x$test_shortpath" = x; then
7265    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7266$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7267    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7268  fi
7269
7270  # Call helper function which possibly converts this using DOS-style short mode.
7271  # If so, the updated path is stored in $new_path.
7272
7273  input_path="$new_path"
7274  # Check if we need to convert this using DOS-style short mode. If the path
7275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7276  # take no chances and rewrite it.
7277  # Note: m4 eats our [], so we need to use [ and ] instead.
7278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7279  if test "x$has_forbidden_chars" != x; then
7280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7284      # Going to short mode and back again did indeed matter. Since short mode is
7285      # case insensitive, let's make it lowercase to improve readability.
7286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7287      # Now convert it back to Unix-stile (cygpath)
7288      input_path=`$CYGPATH -u "$shortmode_path"`
7289      new_path="$input_path"
7290    fi
7291  fi
7292
7293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7294  if test "x$test_cygdrive_prefix" = x; then
7295    # As a simple fix, exclude /usr/bin since it's not a real path.
7296    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7298      # a path prefixed by /cygdrive for fixpath to work.
7299      new_path="$CYGWIN_ROOT_PATH$input_path"
7300    fi
7301  fi
7302
7303
7304  if test "x$path" != "x$new_path"; then
7305    SRC_ROOT="$new_path"
7306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7307$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7308  fi
7309
7310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7311
7312  path="$SRC_ROOT"
7313  has_colon=`$ECHO $path | $GREP ^.:`
7314  new_path="$path"
7315  if test "x$has_colon" = x; then
7316    # Not in mixed or Windows style, start by that.
7317    new_path=`cmd //c echo $path`
7318  fi
7319
7320
7321  input_path="$new_path"
7322  # Check if we need to convert this using DOS-style short mode. If the path
7323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7324  # take no chances and rewrite it.
7325  # Note: m4 eats our [], so we need to use [ and ] instead.
7326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7327  if test "x$has_forbidden_chars" != x; then
7328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7329    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7330  fi
7331
7332
7333  windows_path="$new_path"
7334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7335    unix_path=`$CYGPATH -u "$windows_path"`
7336    new_path="$unix_path"
7337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7339    new_path="$unix_path"
7340  fi
7341
7342  if test "x$path" != "x$new_path"; then
7343    SRC_ROOT="$new_path"
7344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7345$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7346  fi
7347
7348  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7349  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7350
7351  else
7352    # We're on a posix platform. Hooray! :)
7353    path="$SRC_ROOT"
7354
7355    if test ! -f "$path" && test ! -d "$path"; then
7356      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7357    fi
7358
7359    has_space=`$ECHO "$path" | $GREP " "`
7360    if test "x$has_space" != x; then
7361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7362$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7363      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7364    fi
7365  fi
7366
7367
7368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7369
7370  # Input might be given as Windows format, start by converting to
7371  # unix format.
7372  path="$CURDIR"
7373  new_path=`$CYGPATH -u "$path"`
7374
7375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7378  # "foo.exe" is OK but "foo" is an error.
7379  #
7380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7381  # It is also a way to make sure we got the proper file name for the real test later on.
7382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7383  if test "x$test_shortpath" = x; then
7384    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7385$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7386    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7387  fi
7388
7389  # Call helper function which possibly converts this using DOS-style short mode.
7390  # If so, the updated path is stored in $new_path.
7391
7392  input_path="$new_path"
7393  # Check if we need to convert this using DOS-style short mode. If the path
7394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7395  # take no chances and rewrite it.
7396  # Note: m4 eats our [], so we need to use [ and ] instead.
7397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7398  if test "x$has_forbidden_chars" != x; then
7399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7403      # Going to short mode and back again did indeed matter. Since short mode is
7404      # case insensitive, let's make it lowercase to improve readability.
7405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7406      # Now convert it back to Unix-stile (cygpath)
7407      input_path=`$CYGPATH -u "$shortmode_path"`
7408      new_path="$input_path"
7409    fi
7410  fi
7411
7412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7413  if test "x$test_cygdrive_prefix" = x; then
7414    # As a simple fix, exclude /usr/bin since it's not a real path.
7415    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7417      # a path prefixed by /cygdrive for fixpath to work.
7418      new_path="$CYGWIN_ROOT_PATH$input_path"
7419    fi
7420  fi
7421
7422
7423  if test "x$path" != "x$new_path"; then
7424    CURDIR="$new_path"
7425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7426$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7427  fi
7428
7429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7430
7431  path="$CURDIR"
7432  has_colon=`$ECHO $path | $GREP ^.:`
7433  new_path="$path"
7434  if test "x$has_colon" = x; then
7435    # Not in mixed or Windows style, start by that.
7436    new_path=`cmd //c echo $path`
7437  fi
7438
7439
7440  input_path="$new_path"
7441  # Check if we need to convert this using DOS-style short mode. If the path
7442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7443  # take no chances and rewrite it.
7444  # Note: m4 eats our [], so we need to use [ and ] instead.
7445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7446  if test "x$has_forbidden_chars" != x; then
7447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7449  fi
7450
7451
7452  windows_path="$new_path"
7453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7454    unix_path=`$CYGPATH -u "$windows_path"`
7455    new_path="$unix_path"
7456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7458    new_path="$unix_path"
7459  fi
7460
7461  if test "x$path" != "x$new_path"; then
7462    CURDIR="$new_path"
7463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7464$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7465  fi
7466
7467  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7468  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7469
7470  else
7471    # We're on a posix platform. Hooray! :)
7472    path="$CURDIR"
7473
7474    if test ! -f "$path" && test ! -d "$path"; then
7475      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7476    fi
7477
7478    has_space=`$ECHO "$path" | $GREP " "`
7479    if test "x$has_space" != x; then
7480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7481$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7482      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7483    fi
7484  fi
7485
7486
7487if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7488    # Add extra search paths on solaris for utilities like ar and as etc...
7489    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7490fi
7491
7492# You can force the sys-root if the sys-root encoded into the cross compiler tools
7493# is not correct.
7494
7495# Check whether --with-sys-root was given.
7496if test "${with_sys_root+set}" = set; then :
7497  withval=$with_sys_root;
7498fi
7499
7500
7501if test "x$with_sys_root" != x; then
7502  SYS_ROOT=$with_sys_root
7503else
7504  SYS_ROOT=/
7505fi
7506
7507
7508
7509# Check whether --with-tools-dir was given.
7510if test "${with_tools_dir+set}" = set; then :
7511  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7512fi
7513
7514
7515
7516# Check whether --with-devkit was given.
7517if test "${with_devkit+set}" = set; then :
7518  withval=$with_devkit;
7519    if test "x$with_sys_root" != x; then
7520      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7521    fi
7522    if test "x$with_tools_dir" != x; then
7523      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7524    fi
7525    TOOLS_DIR=$with_devkit/bin
7526    SYS_ROOT=$with_devkit/$host_alias/libc
7527
7528fi
7529
7530
7531
7532
7533# Setup default logging of stdout and stderr to build.log in the output root.
7534BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7535BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7536BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7537
7538
7539
7540
7541
7542# Check if it's a pure open build or if custom sources are to be used.
7543
7544  # Check whether --enable-openjdk-only was given.
7545if test "${enable_openjdk_only+set}" = set; then :
7546  enableval=$enable_openjdk_only;
7547else
7548  enable_openjdk_only="no"
7549fi
7550
7551
7552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7553$as_echo_n "checking for presence of closed sources... " >&6; }
7554  if test -d "$SRC_ROOT/jdk/src/closed"; then
7555    CLOSED_SOURCE_PRESENT=yes
7556  else
7557    CLOSED_SOURCE_PRESENT=no
7558  fi
7559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7560$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7561
7562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7563$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7564  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7566$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7567
7568  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7569    OPENJDK=true
7570    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7571      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7572$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7573    fi
7574  else
7575    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7576      OPENJDK=true
7577    else
7578      OPENJDK=false
7579    fi
7580  fi
7581
7582  if test "x$OPENJDK" = "xtrue"; then
7583    SET_OPENJDK="OPENJDK=true"
7584  fi
7585
7586
7587
7588
7589# These are needed to be able to create a configuration name (and thus the output directory)
7590
7591###############################################################################
7592#
7593# Check which variant of the JDK that we want to build.
7594# Currently we have:
7595#    normal:   standard edition
7596# but the custom make system may add other variants
7597#
7598# Effectively the JDK variant gives a name to a specific set of
7599# modules to compile into the JDK. In the future, these modules
7600# might even be Jigsaw modules.
7601#
7602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7603$as_echo_n "checking which variant of the JDK to build... " >&6; }
7604
7605# Check whether --with-jdk-variant was given.
7606if test "${with_jdk_variant+set}" = set; then :
7607  withval=$with_jdk_variant;
7608fi
7609
7610
7611if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7612    JDK_VARIANT="normal"
7613else
7614    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7615fi
7616
7617
7618
7619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7620$as_echo "$JDK_VARIANT" >&6; }
7621
7622
7623
7624###############################################################################
7625#
7626# Check which variants of the JVM that we want to build.
7627# Currently we have:
7628#    server: normal interpreter and a tiered C1/C2 compiler
7629#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7630#    minimal1: reduced form of client with optional VM services and features stripped out
7631#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7632#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7633#    zero: no machine code interpreter, no compiler
7634#    zeroshark: zero interpreter and shark/llvm compiler backend
7635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7636$as_echo_n "checking which variants of the JVM to build... " >&6; }
7637
7638# Check whether --with-jvm-variants was given.
7639if test "${with_jvm_variants+set}" = set; then :
7640  withval=$with_jvm_variants;
7641fi
7642
7643
7644if test "x$with_jvm_variants" = x; then
7645     with_jvm_variants="server"
7646fi
7647
7648JVM_VARIANTS=",$with_jvm_variants,"
7649TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7650
7651if test "x$TEST_VARIANTS" != "x,"; then
7652   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7653fi
7654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7655$as_echo "$with_jvm_variants" >&6; }
7656
7657JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7658JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7659JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7660JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7661JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7662JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7663
7664if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7665    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7666        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7667    fi
7668fi
7669if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7670    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7671        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7672    fi
7673fi
7674if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7675    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7676        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7677    fi
7678fi
7679
7680# Replace the commas with AND for use in the build directory name.
7681ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7682COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7683if test "x$COUNT_VARIANTS" != "x,1"; then
7684    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7685else
7686    BUILDING_MULTIPLE_JVM_VARIANTS=no
7687fi
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7698   MACOSX_UNIVERSAL="true"
7699fi
7700
7701
7702
7703
7704
7705###############################################################################
7706#
7707# Set the debug level
7708#    release: no debug information, all optimizations, no asserts.
7709#    fastdebug: debug information (-g), all optimizations, all asserts
7710#    slowdebug: debug information (-g), no optimizations, all asserts
7711#
7712DEBUG_LEVEL="release"
7713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7714$as_echo_n "checking which debug level to use... " >&6; }
7715# Check whether --enable-debug was given.
7716if test "${enable_debug+set}" = set; then :
7717  enableval=$enable_debug;
7718        ENABLE_DEBUG="${enableval}"
7719        DEBUG_LEVEL="fastdebug"
7720
7721else
7722  ENABLE_DEBUG="no"
7723fi
7724
7725
7726
7727# Check whether --with-debug-level was given.
7728if test "${with_debug_level+set}" = set; then :
7729  withval=$with_debug_level;
7730        DEBUG_LEVEL="${withval}"
7731        if test "x$ENABLE_DEBUG" = xyes; then
7732			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7733        fi
7734
7735fi
7736
7737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7738$as_echo "$DEBUG_LEVEL" >&6; }
7739
7740if test "x$DEBUG_LEVEL" != xrelease && \
7741   test "x$DEBUG_LEVEL" != xfastdebug && \
7742   test "x$DEBUG_LEVEL" != xslowdebug; then
7743   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7744fi
7745
7746
7747###############################################################################
7748#
7749# Setup legacy vars/targets and new vars to deal with different debug levels.
7750#
7751
7752case $DEBUG_LEVEL in
7753      release )
7754          VARIANT="OPT"
7755          FASTDEBUG="false"
7756          DEBUG_CLASSFILES="false"
7757          BUILD_VARIANT_RELEASE=""
7758          HOTSPOT_DEBUG_LEVEL="product"
7759          HOTSPOT_EXPORT="product"
7760           ;;
7761      fastdebug )
7762          VARIANT="DBG"
7763          FASTDEBUG="true"
7764          DEBUG_CLASSFILES="true"
7765          BUILD_VARIANT_RELEASE="-fastdebug"
7766          HOTSPOT_DEBUG_LEVEL="fastdebug"
7767          HOTSPOT_EXPORT="fastdebug"
7768           ;;
7769      slowdebug )
7770          VARIANT="DBG"
7771          FASTDEBUG="false"
7772          DEBUG_CLASSFILES="true"
7773          BUILD_VARIANT_RELEASE="-debug"
7774          HOTSPOT_DEBUG_LEVEL="jvmg"
7775          HOTSPOT_EXPORT="debug"
7776           ;;
7777esac
7778
7779#####
7780# Generate the legacy makefile targets for hotspot.
7781# The hotspot api for selecting the build artifacts, really, needs to be improved.
7782# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7783# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7784# But until then ...
7785HOTSPOT_TARGET=""
7786
7787if test "x$JVM_VARIANT_SERVER" = xtrue; then
7788    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7789fi
7790
7791if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7792    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7793fi
7794
7795if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7796    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7797fi
7798
7799if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7800    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7801fi
7802
7803if test "x$JVM_VARIANT_ZERO" = xtrue; then
7804    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7805fi
7806
7807if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7808    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7809fi
7810
7811HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7812
7813# On Macosx universal binaries are produced, but they only contain
7814# 64 bit intel. This invalidates control of which jvms are built
7815# from configure, but only server is valid anyway. Fix this
7816# when hotspot makefiles are rewritten.
7817if test "x$MACOSX_UNIVERSAL" = xtrue; then
7818    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7819fi
7820
7821#####
7822
7823
7824
7825
7826
7827
7828
7829
7830# With basic setup done, call the custom early hook.
7831
7832
7833# To properly create a configuration name, we need to have the OpenJDK target
7834# and options (variants and debug level) parsed.
7835
7836
7837
7838# Check whether --with-conf-name was given.
7839if test "${with_conf_name+set}" = set; then :
7840  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7841fi
7842
7843
7844# Test from where we are running configure, in or outside of src root.
7845# To enable comparison of directories, CURDIR needs to be symlink free
7846# just like SRC_ROOT already is
7847NOSYM_CURDIR="$CURDIR"
7848
7849    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7850        # Follow a chain of symbolic links. Use readlink
7851        # where it exists, else fall back to horribly
7852        # complicated shell code.
7853        if test "x$READLINK_TESTED" != yes; then
7854            # On MacOSX there is a readlink tool with a different
7855            # purpose than the GNU readlink tool. Check the found readlink.
7856            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7857            if test "x$ISGNU" = x; then
7858                 # A readlink that we do not know how to use.
7859                 # Are there other non-GNU readlinks out there?
7860                 READLINK_TESTED=yes
7861                 READLINK=
7862            fi
7863        fi
7864
7865        if test "x$READLINK" != x; then
7866            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7867        else
7868            # Save the current directory for restoring afterwards
7869            STARTDIR=$PWD
7870            COUNTER=0
7871            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7872            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7873            # Use the system pwd and not the shell builtin to resolve directory symlinks
7874            cd $sym_link_dir
7875            cd `$THEPWDCMD`
7876            sym_link_dir=`$THEPWDCMD`
7877            # Resolve file symlinks
7878            while test $COUNTER -lt 20; do
7879                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7880                if test "x$ISLINK" == x; then
7881                    # This is not a symbolic link! We are done!
7882                    break
7883                fi
7884                # Again resolve directory symlinks since the target of the just found
7885                # link could be in a different directory
7886                cd `$DIRNAME $ISLINK`
7887                sym_link_dir=`$THEPWDCMD`
7888                sym_link_file=`$BASENAME $ISLINK`
7889                let COUNTER=COUNTER+1
7890            done
7891            cd $STARTDIR
7892            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7893        fi
7894    fi
7895
7896if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7897        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7898        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7899    # We are running configure from the src root.
7900    # Create a default ./build/target-variant-debuglevel output root.
7901    if test "x${CONF_NAME}" = x; then
7902        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7903    fi
7904    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7905    $MKDIR -p "$OUTPUT_ROOT"
7906    if test ! -d "$OUTPUT_ROOT"; then
7907        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7908    fi
7909else
7910    # We are running configure from outside of the src dir.
7911    # Then use the current directory as output dir!
7912    # If configuration is situated in normal build directory, just use the build
7913    # directory name as configuration name, otherwise use the complete path.
7914    if test "x${CONF_NAME}" = x; then
7915        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7916    fi
7917    OUTPUT_ROOT="$CURDIR"
7918
7919    # WARNING: This might be a bad thing to do. You need to be sure you want to
7920    # have a configuration in this directory. Do some sanity checks!
7921
7922    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7923      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7924      # other files
7925      files_present=`$LS $OUTPUT_ROOT`
7926      # Configure has already touched config.log and confdefs.h in the current dir when this check
7927      # is performed.
7928      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7929                                             | $TR -d '\n'`
7930      if test "x$filtered_files" != x; then
7931        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7932$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7933        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7934$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7935        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7936$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7937        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7938$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7939        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7940$as_echo "$as_me: seriously mess up just about everything." >&6;}
7941        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7942$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7943        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7944$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7945        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7946      fi
7947    fi
7948fi
7949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7950$as_echo_n "checking what configuration name to use... " >&6; }
7951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7952$as_echo "$CONF_NAME" >&6; }
7953
7954
7955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7956
7957  # Input might be given as Windows format, start by converting to
7958  # unix format.
7959  path="$OUTPUT_ROOT"
7960  new_path=`$CYGPATH -u "$path"`
7961
7962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7965  # "foo.exe" is OK but "foo" is an error.
7966  #
7967  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7968  # It is also a way to make sure we got the proper file name for the real test later on.
7969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7970  if test "x$test_shortpath" = x; then
7971    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7972$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7973    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7974  fi
7975
7976  # Call helper function which possibly converts this using DOS-style short mode.
7977  # If so, the updated path is stored in $new_path.
7978
7979  input_path="$new_path"
7980  # Check if we need to convert this using DOS-style short mode. If the path
7981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7982  # take no chances and rewrite it.
7983  # Note: m4 eats our [], so we need to use [ and ] instead.
7984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7985  if test "x$has_forbidden_chars" != x; then
7986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7990      # Going to short mode and back again did indeed matter. Since short mode is
7991      # case insensitive, let's make it lowercase to improve readability.
7992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7993      # Now convert it back to Unix-stile (cygpath)
7994      input_path=`$CYGPATH -u "$shortmode_path"`
7995      new_path="$input_path"
7996    fi
7997  fi
7998
7999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8000  if test "x$test_cygdrive_prefix" = x; then
8001    # As a simple fix, exclude /usr/bin since it's not a real path.
8002    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8004      # a path prefixed by /cygdrive for fixpath to work.
8005      new_path="$CYGWIN_ROOT_PATH$input_path"
8006    fi
8007  fi
8008
8009
8010  if test "x$path" != "x$new_path"; then
8011    OUTPUT_ROOT="$new_path"
8012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8013$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8014  fi
8015
8016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8017
8018  path="$OUTPUT_ROOT"
8019  has_colon=`$ECHO $path | $GREP ^.:`
8020  new_path="$path"
8021  if test "x$has_colon" = x; then
8022    # Not in mixed or Windows style, start by that.
8023    new_path=`cmd //c echo $path`
8024  fi
8025
8026
8027  input_path="$new_path"
8028  # Check if we need to convert this using DOS-style short mode. If the path
8029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8030  # take no chances and rewrite it.
8031  # Note: m4 eats our [], so we need to use [ and ] instead.
8032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8033  if test "x$has_forbidden_chars" != x; then
8034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8036  fi
8037
8038
8039  windows_path="$new_path"
8040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8041    unix_path=`$CYGPATH -u "$windows_path"`
8042    new_path="$unix_path"
8043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8045    new_path="$unix_path"
8046  fi
8047
8048  if test "x$path" != "x$new_path"; then
8049    OUTPUT_ROOT="$new_path"
8050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8051$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8052  fi
8053
8054  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8055  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8056
8057  else
8058    # We're on a posix platform. Hooray! :)
8059    path="$OUTPUT_ROOT"
8060
8061    if test ! -f "$path" && test ! -d "$path"; then
8062      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8063    fi
8064
8065    has_space=`$ECHO "$path" | $GREP " "`
8066    if test "x$has_space" != x; then
8067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8068$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8069      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8070    fi
8071  fi
8072
8073
8074SPEC=$OUTPUT_ROOT/spec.gmk
8075
8076CONF_NAME=$CONF_NAME
8077
8078OUTPUT_ROOT=$OUTPUT_ROOT
8079
8080
8081# Most of the probed defines are put into config.h
8082ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8083
8084# The spec.gmk file contains all variables for the make system.
8085ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8086
8087# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8088ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8089
8090# The bootcycle-spec.gmk file contains support for boot cycle builds.
8091ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8092
8093# The compare.sh is used to compare the build output to other builds.
8094ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8095
8096# Spec.sh is currently used by compare-objects.sh
8097ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8098
8099# The generated Makefile knows where the spec.gmk is and where the source is.
8100# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8101# which will look for generated configurations
8102ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8103
8104
8105# Save the arguments given to us
8106echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8107
8108
8109# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8110
8111    for ac_prog in apt-get yum port pkgutil pkgadd
8112do
8113  # Extract the first word of "$ac_prog", so it can be a program name with args.
8114set dummy $ac_prog; ac_word=$2
8115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8116$as_echo_n "checking for $ac_word... " >&6; }
8117if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8118  $as_echo_n "(cached) " >&6
8119else
8120  if test -n "$PKGHANDLER"; then
8121  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8122else
8123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8124for as_dir in $PATH
8125do
8126  IFS=$as_save_IFS
8127  test -z "$as_dir" && as_dir=.
8128    for ac_exec_ext in '' $ac_executable_extensions; do
8129  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8130    ac_cv_prog_PKGHANDLER="$ac_prog"
8131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8132    break 2
8133  fi
8134done
8135  done
8136IFS=$as_save_IFS
8137
8138fi
8139fi
8140PKGHANDLER=$ac_cv_prog_PKGHANDLER
8141if test -n "$PKGHANDLER"; then
8142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8143$as_echo "$PKGHANDLER" >&6; }
8144else
8145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8146$as_echo "no" >&6; }
8147fi
8148
8149
8150  test -n "$PKGHANDLER" && break
8151done
8152
8153
8154
8155# Setup tools that requires more complex handling, or that is not needed by the configure script.
8156
8157
8158  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8159  if test "x$MAKE" != x; then
8160    # User has supplied a make, test it.
8161    if test ! -f "$MAKE"; then
8162      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8163    fi
8164
8165  MAKE_CANDIDATE=""$MAKE""
8166  DESCRIPTION="user supplied MAKE=$MAKE"
8167  if test "x$MAKE_CANDIDATE" != x; then
8168    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8169$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8170    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8171    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8172    if test "x$IS_GNU_MAKE" = x; then
8173      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8174$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8175    else
8176      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8177      if test "x$IS_MODERN_MAKE" = x; then
8178        { $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
8179$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;}
8180      else
8181        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8182          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8183            MAKE_EXPECTED_ENV='cygwin'
8184          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8185            MAKE_EXPECTED_ENV='msys'
8186          else
8187            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8188          fi
8189          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8190          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8191        else
8192          # Not relevant for non-Windows
8193          IS_MAKE_CORRECT_ENV=true
8194        fi
8195        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8196          { $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
8197$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;}
8198        else
8199          FOUND_MAKE=$MAKE_CANDIDATE
8200
8201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8202
8203  # First separate the path from the arguments. This will split at the first
8204  # space.
8205  complete="$FOUND_MAKE"
8206  path="${complete%% *}"
8207  tmp="$complete EOL"
8208  arguments="${tmp#* }"
8209
8210  # Input might be given as Windows format, start by converting to
8211  # unix format.
8212  new_path=`$CYGPATH -u "$path"`
8213
8214  # Now try to locate executable using which
8215  new_path=`$WHICH "$new_path" 2> /dev/null`
8216  # bat and cmd files are not always considered executable in cygwin causing which
8217  # to not find them
8218  if test "x$new_path" = x \
8219           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8220           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8221    new_path=`$CYGPATH -u "$path"`
8222  fi
8223  if test "x$new_path" = x; then
8224    # Oops. Which didn't find the executable.
8225    # The splitting of arguments from the executable at a space might have been incorrect,
8226    # since paths with space are more likely in Windows. Give it another try with the whole
8227    # argument.
8228    path="$complete"
8229    arguments="EOL"
8230    new_path=`$CYGPATH -u "$path"`
8231    new_path=`$WHICH "$new_path" 2> /dev/null`
8232    # bat and cmd files are not always considered executable in cygwin causing which
8233    # to not find them
8234    if test "x$new_path" = x \
8235             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8236             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8237      new_path=`$CYGPATH -u "$path"`
8238    fi
8239    if test "x$new_path" = x; then
8240      # It's still not found. Now this is an unrecoverable error.
8241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8242$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8243      has_space=`$ECHO "$complete" | $GREP " "`
8244      if test "x$has_space" != x; then
8245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8247      fi
8248      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8249    fi
8250  fi
8251
8252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8255  # "foo.exe" is OK but "foo" is an error.
8256  #
8257  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8258  # It is also a way to make sure we got the proper file name for the real test later on.
8259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8260  if test "x$test_shortpath" = x; then
8261    # Short path failed, file does not exist as specified.
8262    # Try adding .exe or .cmd
8263    if test -f "${new_path}.exe"; then
8264       input_to_shortpath="${new_path}.exe"
8265    elif test -f "${new_path}.cmd"; then
8266       input_to_shortpath="${new_path}.cmd"
8267    else
8268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8269$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8270      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8271$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8272      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8273    fi
8274  else
8275    input_to_shortpath="$new_path"
8276  fi
8277
8278  # Call helper function which possibly converts this using DOS-style short mode.
8279  # If so, the updated path is stored in $new_path.
8280  new_path="$input_to_shortpath"
8281
8282  input_path="$input_to_shortpath"
8283  # Check if we need to convert this using DOS-style short mode. If the path
8284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8285  # take no chances and rewrite it.
8286  # Note: m4 eats our [], so we need to use [ and ] instead.
8287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8288  if test "x$has_forbidden_chars" != x; then
8289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8293      # Going to short mode and back again did indeed matter. Since short mode is
8294      # case insensitive, let's make it lowercase to improve readability.
8295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8296      # Now convert it back to Unix-stile (cygpath)
8297      input_path=`$CYGPATH -u "$shortmode_path"`
8298      new_path="$input_path"
8299    fi
8300  fi
8301
8302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8303  if test "x$test_cygdrive_prefix" = x; then
8304    # As a simple fix, exclude /usr/bin since it's not a real path.
8305    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8307      # a path prefixed by /cygdrive for fixpath to work.
8308      new_path="$CYGWIN_ROOT_PATH$input_path"
8309    fi
8310  fi
8311
8312  # remove trailing .exe if any
8313  new_path="${new_path/%.exe/}"
8314
8315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8316
8317  # First separate the path from the arguments. This will split at the first
8318  # space.
8319  complete="$FOUND_MAKE"
8320  path="${complete%% *}"
8321  tmp="$complete EOL"
8322  arguments="${tmp#* }"
8323
8324  # Input might be given as Windows format, start by converting to
8325  # unix format.
8326  new_path="$path"
8327
8328  windows_path="$new_path"
8329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8330    unix_path=`$CYGPATH -u "$windows_path"`
8331    new_path="$unix_path"
8332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8334    new_path="$unix_path"
8335  fi
8336
8337
8338  # Now try to locate executable using which
8339  new_path=`$WHICH "$new_path" 2> /dev/null`
8340
8341  if test "x$new_path" = x; then
8342    # Oops. Which didn't find the executable.
8343    # The splitting of arguments from the executable at a space might have been incorrect,
8344    # since paths with space are more likely in Windows. Give it another try with the whole
8345    # argument.
8346    path="$complete"
8347    arguments="EOL"
8348    new_path="$path"
8349
8350  windows_path="$new_path"
8351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8352    unix_path=`$CYGPATH -u "$windows_path"`
8353    new_path="$unix_path"
8354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8356    new_path="$unix_path"
8357  fi
8358
8359
8360    new_path=`$WHICH "$new_path" 2> /dev/null`
8361
8362    if test "x$new_path" = x; then
8363      # It's still not found. Now this is an unrecoverable error.
8364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8365$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8366      has_space=`$ECHO "$complete" | $GREP " "`
8367      if test "x$has_space" != x; then
8368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8370      fi
8371      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8372    fi
8373  fi
8374
8375  # Now new_path has a complete unix path to the binary
8376  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8377    # Keep paths in /bin as-is, but remove trailing .exe if any
8378    new_path="${new_path/%.exe/}"
8379    # Do not save /bin paths to all_fixpath_prefixes!
8380  else
8381    # Not in mixed or Windows style, start by that.
8382    new_path=`cmd //c echo $new_path`
8383
8384  input_path="$new_path"
8385  # Check if we need to convert this using DOS-style short mode. If the path
8386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8387  # take no chances and rewrite it.
8388  # Note: m4 eats our [], so we need to use [ and ] instead.
8389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8390  if test "x$has_forbidden_chars" != x; then
8391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8393  fi
8394
8395    # Output is in $new_path
8396
8397  windows_path="$new_path"
8398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8399    unix_path=`$CYGPATH -u "$windows_path"`
8400    new_path="$unix_path"
8401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8403    new_path="$unix_path"
8404  fi
8405
8406    # remove trailing .exe if any
8407    new_path="${new_path/%.exe/}"
8408
8409    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8410    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8411  fi
8412
8413  else
8414    # We're on a posix platform. Hooray! :)
8415    # First separate the path from the arguments. This will split at the first
8416    # space.
8417    complete="$FOUND_MAKE"
8418    path="${complete%% *}"
8419    tmp="$complete EOL"
8420    arguments="${tmp#* }"
8421
8422    # Cannot rely on the command "which" here since it doesn't always work.
8423    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8424    if test -z "$is_absolute_path"; then
8425      # Path to executable is not absolute. Find it.
8426      IFS_save="$IFS"
8427      IFS=:
8428      for p in $PATH; do
8429        if test -f "$p/$path" && test -x "$p/$path"; then
8430          new_path="$p/$path"
8431          break
8432        fi
8433      done
8434      IFS="$IFS_save"
8435    else
8436      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8437$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8438      new_path="$path"
8439    fi
8440
8441    if test "x$new_path" = x; then
8442        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8443$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8444        has_space=`$ECHO "$complete" | $GREP " "`
8445        if test "x$has_space" != x; then
8446          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8447$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8448        fi
8449        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8450      fi
8451  fi
8452
8453      # Now join together the path and the arguments once again
8454      if test "x$arguments" != xEOL; then
8455        new_complete="$new_path ${arguments% *}"
8456      else
8457        new_complete="$new_path"
8458      fi
8459
8460  if test "x$complete" != "x$new_complete"; then
8461      FOUND_MAKE="$new_complete"
8462      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8463$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8464    fi
8465
8466        fi
8467      fi
8468    fi
8469  fi
8470
8471    if test "x$FOUND_MAKE" = x; then
8472      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8473    fi
8474  else
8475    # Try our hardest to locate a correct version of GNU make
8476    for ac_prog in gmake
8477do
8478  # Extract the first word of "$ac_prog", so it can be a program name with args.
8479set dummy $ac_prog; ac_word=$2
8480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8481$as_echo_n "checking for $ac_word... " >&6; }
8482if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8483  $as_echo_n "(cached) " >&6
8484else
8485  case $CHECK_GMAKE in
8486  [\\/]* | ?:[\\/]*)
8487  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8488  ;;
8489  *)
8490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8491for as_dir in $PATH
8492do
8493  IFS=$as_save_IFS
8494  test -z "$as_dir" && as_dir=.
8495    for ac_exec_ext in '' $ac_executable_extensions; do
8496  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8497    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8499    break 2
8500  fi
8501done
8502  done
8503IFS=$as_save_IFS
8504
8505  ;;
8506esac
8507fi
8508CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8509if test -n "$CHECK_GMAKE"; then
8510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8511$as_echo "$CHECK_GMAKE" >&6; }
8512else
8513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8514$as_echo "no" >&6; }
8515fi
8516
8517
8518  test -n "$CHECK_GMAKE" && break
8519done
8520
8521
8522  MAKE_CANDIDATE=""$CHECK_GMAKE""
8523  DESCRIPTION="gmake in PATH"
8524  if test "x$MAKE_CANDIDATE" != x; then
8525    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8526$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8527    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8528    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8529    if test "x$IS_GNU_MAKE" = x; then
8530      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8531$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8532    else
8533      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8534      if test "x$IS_MODERN_MAKE" = x; then
8535        { $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
8536$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;}
8537      else
8538        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8539          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8540            MAKE_EXPECTED_ENV='cygwin'
8541          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8542            MAKE_EXPECTED_ENV='msys'
8543          else
8544            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8545          fi
8546          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8547          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8548        else
8549          # Not relevant for non-Windows
8550          IS_MAKE_CORRECT_ENV=true
8551        fi
8552        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8553          { $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
8554$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;}
8555        else
8556          FOUND_MAKE=$MAKE_CANDIDATE
8557
8558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8559
8560  # First separate the path from the arguments. This will split at the first
8561  # space.
8562  complete="$FOUND_MAKE"
8563  path="${complete%% *}"
8564  tmp="$complete EOL"
8565  arguments="${tmp#* }"
8566
8567  # Input might be given as Windows format, start by converting to
8568  # unix format.
8569  new_path=`$CYGPATH -u "$path"`
8570
8571  # Now try to locate executable using which
8572  new_path=`$WHICH "$new_path" 2> /dev/null`
8573  # bat and cmd files are not always considered executable in cygwin causing which
8574  # to not find them
8575  if test "x$new_path" = x \
8576           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8577           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8578    new_path=`$CYGPATH -u "$path"`
8579  fi
8580  if test "x$new_path" = x; then
8581    # Oops. Which didn't find the executable.
8582    # The splitting of arguments from the executable at a space might have been incorrect,
8583    # since paths with space are more likely in Windows. Give it another try with the whole
8584    # argument.
8585    path="$complete"
8586    arguments="EOL"
8587    new_path=`$CYGPATH -u "$path"`
8588    new_path=`$WHICH "$new_path" 2> /dev/null`
8589    # bat and cmd files are not always considered executable in cygwin causing which
8590    # to not find them
8591    if test "x$new_path" = x \
8592             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8593             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8594      new_path=`$CYGPATH -u "$path"`
8595    fi
8596    if test "x$new_path" = x; then
8597      # It's still not found. Now this is an unrecoverable error.
8598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8599$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8600      has_space=`$ECHO "$complete" | $GREP " "`
8601      if test "x$has_space" != x; then
8602        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8603$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8604      fi
8605      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8606    fi
8607  fi
8608
8609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8612  # "foo.exe" is OK but "foo" is an error.
8613  #
8614  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8615  # It is also a way to make sure we got the proper file name for the real test later on.
8616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8617  if test "x$test_shortpath" = x; then
8618    # Short path failed, file does not exist as specified.
8619    # Try adding .exe or .cmd
8620    if test -f "${new_path}.exe"; then
8621       input_to_shortpath="${new_path}.exe"
8622    elif test -f "${new_path}.cmd"; then
8623       input_to_shortpath="${new_path}.cmd"
8624    else
8625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8626$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8627      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8628$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8629      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8630    fi
8631  else
8632    input_to_shortpath="$new_path"
8633  fi
8634
8635  # Call helper function which possibly converts this using DOS-style short mode.
8636  # If so, the updated path is stored in $new_path.
8637  new_path="$input_to_shortpath"
8638
8639  input_path="$input_to_shortpath"
8640  # Check if we need to convert this using DOS-style short mode. If the path
8641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8642  # take no chances and rewrite it.
8643  # Note: m4 eats our [], so we need to use [ and ] instead.
8644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8645  if test "x$has_forbidden_chars" != x; then
8646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8650      # Going to short mode and back again did indeed matter. Since short mode is
8651      # case insensitive, let's make it lowercase to improve readability.
8652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8653      # Now convert it back to Unix-stile (cygpath)
8654      input_path=`$CYGPATH -u "$shortmode_path"`
8655      new_path="$input_path"
8656    fi
8657  fi
8658
8659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8660  if test "x$test_cygdrive_prefix" = x; then
8661    # As a simple fix, exclude /usr/bin since it's not a real path.
8662    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8664      # a path prefixed by /cygdrive for fixpath to work.
8665      new_path="$CYGWIN_ROOT_PATH$input_path"
8666    fi
8667  fi
8668
8669  # remove trailing .exe if any
8670  new_path="${new_path/%.exe/}"
8671
8672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8673
8674  # First separate the path from the arguments. This will split at the first
8675  # space.
8676  complete="$FOUND_MAKE"
8677  path="${complete%% *}"
8678  tmp="$complete EOL"
8679  arguments="${tmp#* }"
8680
8681  # Input might be given as Windows format, start by converting to
8682  # unix format.
8683  new_path="$path"
8684
8685  windows_path="$new_path"
8686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8687    unix_path=`$CYGPATH -u "$windows_path"`
8688    new_path="$unix_path"
8689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8691    new_path="$unix_path"
8692  fi
8693
8694
8695  # Now try to locate executable using which
8696  new_path=`$WHICH "$new_path" 2> /dev/null`
8697
8698  if test "x$new_path" = x; then
8699    # Oops. Which didn't find the executable.
8700    # The splitting of arguments from the executable at a space might have been incorrect,
8701    # since paths with space are more likely in Windows. Give it another try with the whole
8702    # argument.
8703    path="$complete"
8704    arguments="EOL"
8705    new_path="$path"
8706
8707  windows_path="$new_path"
8708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8709    unix_path=`$CYGPATH -u "$windows_path"`
8710    new_path="$unix_path"
8711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8713    new_path="$unix_path"
8714  fi
8715
8716
8717    new_path=`$WHICH "$new_path" 2> /dev/null`
8718
8719    if test "x$new_path" = x; then
8720      # It's still not found. Now this is an unrecoverable error.
8721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8722$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8723      has_space=`$ECHO "$complete" | $GREP " "`
8724      if test "x$has_space" != x; then
8725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8727      fi
8728      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8729    fi
8730  fi
8731
8732  # Now new_path has a complete unix path to the binary
8733  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8734    # Keep paths in /bin as-is, but remove trailing .exe if any
8735    new_path="${new_path/%.exe/}"
8736    # Do not save /bin paths to all_fixpath_prefixes!
8737  else
8738    # Not in mixed or Windows style, start by that.
8739    new_path=`cmd //c echo $new_path`
8740
8741  input_path="$new_path"
8742  # Check if we need to convert this using DOS-style short mode. If the path
8743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8744  # take no chances and rewrite it.
8745  # Note: m4 eats our [], so we need to use [ and ] instead.
8746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8747  if test "x$has_forbidden_chars" != x; then
8748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8750  fi
8751
8752    # Output is in $new_path
8753
8754  windows_path="$new_path"
8755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8756    unix_path=`$CYGPATH -u "$windows_path"`
8757    new_path="$unix_path"
8758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8760    new_path="$unix_path"
8761  fi
8762
8763    # remove trailing .exe if any
8764    new_path="${new_path/%.exe/}"
8765
8766    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8767    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8768  fi
8769
8770  else
8771    # We're on a posix platform. Hooray! :)
8772    # First separate the path from the arguments. This will split at the first
8773    # space.
8774    complete="$FOUND_MAKE"
8775    path="${complete%% *}"
8776    tmp="$complete EOL"
8777    arguments="${tmp#* }"
8778
8779    # Cannot rely on the command "which" here since it doesn't always work.
8780    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8781    if test -z "$is_absolute_path"; then
8782      # Path to executable is not absolute. Find it.
8783      IFS_save="$IFS"
8784      IFS=:
8785      for p in $PATH; do
8786        if test -f "$p/$path" && test -x "$p/$path"; then
8787          new_path="$p/$path"
8788          break
8789        fi
8790      done
8791      IFS="$IFS_save"
8792    else
8793      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8794$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8795      new_path="$path"
8796    fi
8797
8798    if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
8804$as_echo "$as_me: This might be caused by spaces in the path, 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 join together the path and the arguments once again
8811      if test "x$arguments" != xEOL; then
8812        new_complete="$new_path ${arguments% *}"
8813      else
8814        new_complete="$new_path"
8815      fi
8816
8817  if test "x$complete" != "x$new_complete"; then
8818      FOUND_MAKE="$new_complete"
8819      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8820$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8821    fi
8822
8823        fi
8824      fi
8825    fi
8826  fi
8827
8828
8829    if test "x$FOUND_MAKE" = x; then
8830      for ac_prog in make
8831do
8832  # Extract the first word of "$ac_prog", so it can be a program name with args.
8833set dummy $ac_prog; ac_word=$2
8834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8835$as_echo_n "checking for $ac_word... " >&6; }
8836if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8837  $as_echo_n "(cached) " >&6
8838else
8839  case $CHECK_MAKE in
8840  [\\/]* | ?:[\\/]*)
8841  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8842  ;;
8843  *)
8844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8845for as_dir in $PATH
8846do
8847  IFS=$as_save_IFS
8848  test -z "$as_dir" && as_dir=.
8849    for ac_exec_ext in '' $ac_executable_extensions; do
8850  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8851    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8853    break 2
8854  fi
8855done
8856  done
8857IFS=$as_save_IFS
8858
8859  ;;
8860esac
8861fi
8862CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8863if test -n "$CHECK_MAKE"; then
8864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8865$as_echo "$CHECK_MAKE" >&6; }
8866else
8867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8868$as_echo "no" >&6; }
8869fi
8870
8871
8872  test -n "$CHECK_MAKE" && break
8873done
8874
8875
8876  MAKE_CANDIDATE=""$CHECK_MAKE""
8877  DESCRIPTION="make in PATH"
8878  if test "x$MAKE_CANDIDATE" != x; then
8879    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8880$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8881    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8882    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8883    if test "x$IS_GNU_MAKE" = x; then
8884      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8885$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8886    else
8887      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8888      if test "x$IS_MODERN_MAKE" = x; then
8889        { $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
8890$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;}
8891      else
8892        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8893          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8894            MAKE_EXPECTED_ENV='cygwin'
8895          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8896            MAKE_EXPECTED_ENV='msys'
8897          else
8898            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8899          fi
8900          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8901          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8902        else
8903          # Not relevant for non-Windows
8904          IS_MAKE_CORRECT_ENV=true
8905        fi
8906        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8907          { $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
8908$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;}
8909        else
8910          FOUND_MAKE=$MAKE_CANDIDATE
8911
8912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8913
8914  # First separate the path from the arguments. This will split at the first
8915  # space.
8916  complete="$FOUND_MAKE"
8917  path="${complete%% *}"
8918  tmp="$complete EOL"
8919  arguments="${tmp#* }"
8920
8921  # Input might be given as Windows format, start by converting to
8922  # unix format.
8923  new_path=`$CYGPATH -u "$path"`
8924
8925  # Now try to locate executable using which
8926  new_path=`$WHICH "$new_path" 2> /dev/null`
8927  # bat and cmd files are not always considered executable in cygwin causing which
8928  # to not find them
8929  if test "x$new_path" = x \
8930           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8931           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8932    new_path=`$CYGPATH -u "$path"`
8933  fi
8934  if test "x$new_path" = x; then
8935    # Oops. Which didn't find the executable.
8936    # The splitting of arguments from the executable at a space might have been incorrect,
8937    # since paths with space are more likely in Windows. Give it another try with the whole
8938    # argument.
8939    path="$complete"
8940    arguments="EOL"
8941    new_path=`$CYGPATH -u "$path"`
8942    new_path=`$WHICH "$new_path" 2> /dev/null`
8943    # bat and cmd files are not always considered executable in cygwin causing which
8944    # to not find them
8945    if test "x$new_path" = x \
8946             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8947             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8948      new_path=`$CYGPATH -u "$path"`
8949    fi
8950    if test "x$new_path" = x; then
8951      # It's still not found. Now this is an unrecoverable error.
8952      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8953$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8954      has_space=`$ECHO "$complete" | $GREP " "`
8955      if test "x$has_space" != x; then
8956        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8957$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8958      fi
8959      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8960    fi
8961  fi
8962
8963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8966  # "foo.exe" is OK but "foo" is an error.
8967  #
8968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8969  # It is also a way to make sure we got the proper file name for the real test later on.
8970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8971  if test "x$test_shortpath" = x; then
8972    # Short path failed, file does not exist as specified.
8973    # Try adding .exe or .cmd
8974    if test -f "${new_path}.exe"; then
8975       input_to_shortpath="${new_path}.exe"
8976    elif test -f "${new_path}.cmd"; then
8977       input_to_shortpath="${new_path}.cmd"
8978    else
8979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8980$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8981      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8982$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8983      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8984    fi
8985  else
8986    input_to_shortpath="$new_path"
8987  fi
8988
8989  # Call helper function which possibly converts this using DOS-style short mode.
8990  # If so, the updated path is stored in $new_path.
8991  new_path="$input_to_shortpath"
8992
8993  input_path="$input_to_shortpath"
8994  # Check if we need to convert this using DOS-style short mode. If the path
8995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8996  # take no chances and rewrite it.
8997  # Note: m4 eats our [], so we need to use [ and ] instead.
8998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8999  if test "x$has_forbidden_chars" != x; then
9000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9004      # Going to short mode and back again did indeed matter. Since short mode is
9005      # case insensitive, let's make it lowercase to improve readability.
9006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9007      # Now convert it back to Unix-stile (cygpath)
9008      input_path=`$CYGPATH -u "$shortmode_path"`
9009      new_path="$input_path"
9010    fi
9011  fi
9012
9013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9014  if test "x$test_cygdrive_prefix" = x; then
9015    # As a simple fix, exclude /usr/bin since it's not a real path.
9016    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9018      # a path prefixed by /cygdrive for fixpath to work.
9019      new_path="$CYGWIN_ROOT_PATH$input_path"
9020    fi
9021  fi
9022
9023  # remove trailing .exe if any
9024  new_path="${new_path/%.exe/}"
9025
9026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9027
9028  # First separate the path from the arguments. This will split at the first
9029  # space.
9030  complete="$FOUND_MAKE"
9031  path="${complete%% *}"
9032  tmp="$complete EOL"
9033  arguments="${tmp#* }"
9034
9035  # Input might be given as Windows format, start by converting to
9036  # unix format.
9037  new_path="$path"
9038
9039  windows_path="$new_path"
9040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9041    unix_path=`$CYGPATH -u "$windows_path"`
9042    new_path="$unix_path"
9043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9045    new_path="$unix_path"
9046  fi
9047
9048
9049  # Now try to locate executable using which
9050  new_path=`$WHICH "$new_path" 2> /dev/null`
9051
9052  if test "x$new_path" = x; then
9053    # Oops. Which didn't find the executable.
9054    # The splitting of arguments from the executable at a space might have been incorrect,
9055    # since paths with space are more likely in Windows. Give it another try with the whole
9056    # argument.
9057    path="$complete"
9058    arguments="EOL"
9059    new_path="$path"
9060
9061  windows_path="$new_path"
9062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9063    unix_path=`$CYGPATH -u "$windows_path"`
9064    new_path="$unix_path"
9065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9067    new_path="$unix_path"
9068  fi
9069
9070
9071    new_path=`$WHICH "$new_path" 2> /dev/null`
9072
9073    if test "x$new_path" = x; then
9074      # It's still not found. Now this is an unrecoverable error.
9075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9076$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9077      has_space=`$ECHO "$complete" | $GREP " "`
9078      if test "x$has_space" != x; then
9079        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9080$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9081      fi
9082      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9083    fi
9084  fi
9085
9086  # Now new_path has a complete unix path to the binary
9087  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9088    # Keep paths in /bin as-is, but remove trailing .exe if any
9089    new_path="${new_path/%.exe/}"
9090    # Do not save /bin paths to all_fixpath_prefixes!
9091  else
9092    # Not in mixed or Windows style, start by that.
9093    new_path=`cmd //c echo $new_path`
9094
9095  input_path="$new_path"
9096  # Check if we need to convert this using DOS-style short mode. If the path
9097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9098  # take no chances and rewrite it.
9099  # Note: m4 eats our [], so we need to use [ and ] instead.
9100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9101  if test "x$has_forbidden_chars" != x; then
9102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9104  fi
9105
9106    # Output is in $new_path
9107
9108  windows_path="$new_path"
9109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9110    unix_path=`$CYGPATH -u "$windows_path"`
9111    new_path="$unix_path"
9112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9114    new_path="$unix_path"
9115  fi
9116
9117    # remove trailing .exe if any
9118    new_path="${new_path/%.exe/}"
9119
9120    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9121    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9122  fi
9123
9124  else
9125    # We're on a posix platform. Hooray! :)
9126    # First separate the path from the arguments. This will split at the first
9127    # space.
9128    complete="$FOUND_MAKE"
9129    path="${complete%% *}"
9130    tmp="$complete EOL"
9131    arguments="${tmp#* }"
9132
9133    # Cannot rely on the command "which" here since it doesn't always work.
9134    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9135    if test -z "$is_absolute_path"; then
9136      # Path to executable is not absolute. Find it.
9137      IFS_save="$IFS"
9138      IFS=:
9139      for p in $PATH; do
9140        if test -f "$p/$path" && test -x "$p/$path"; then
9141          new_path="$p/$path"
9142          break
9143        fi
9144      done
9145      IFS="$IFS_save"
9146    else
9147      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9148$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9149      new_path="$path"
9150    fi
9151
9152    if test "x$new_path" = x; then
9153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9154$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9155        has_space=`$ECHO "$complete" | $GREP " "`
9156        if test "x$has_space" != x; then
9157          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9158$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9159        fi
9160        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9161      fi
9162  fi
9163
9164      # Now join together the path and the arguments once again
9165      if test "x$arguments" != xEOL; then
9166        new_complete="$new_path ${arguments% *}"
9167      else
9168        new_complete="$new_path"
9169      fi
9170
9171  if test "x$complete" != "x$new_complete"; then
9172      FOUND_MAKE="$new_complete"
9173      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9174$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9175    fi
9176
9177        fi
9178      fi
9179    fi
9180  fi
9181
9182    fi
9183
9184    if test "x$FOUND_MAKE" = x; then
9185      if test "x$TOOLS_DIR" != x; then
9186        # We have a tools-dir, check that as well before giving up.
9187        OLD_PATH=$PATH
9188        PATH=$TOOLS_DIR:$PATH
9189        for ac_prog in gmake
9190do
9191  # Extract the first word of "$ac_prog", so it can be a program name with args.
9192set dummy $ac_prog; ac_word=$2
9193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9194$as_echo_n "checking for $ac_word... " >&6; }
9195if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9196  $as_echo_n "(cached) " >&6
9197else
9198  case $CHECK_TOOLSDIR_GMAKE in
9199  [\\/]* | ?:[\\/]*)
9200  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9201  ;;
9202  *)
9203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9204for as_dir in $PATH
9205do
9206  IFS=$as_save_IFS
9207  test -z "$as_dir" && as_dir=.
9208    for ac_exec_ext in '' $ac_executable_extensions; do
9209  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9210    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9212    break 2
9213  fi
9214done
9215  done
9216IFS=$as_save_IFS
9217
9218  ;;
9219esac
9220fi
9221CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9222if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9224$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9225else
9226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9227$as_echo "no" >&6; }
9228fi
9229
9230
9231  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9232done
9233
9234
9235  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9236  DESCRIPTION="gmake in tools-dir"
9237  if test "x$MAKE_CANDIDATE" != x; then
9238    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9239$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9240    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9241    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9242    if test "x$IS_GNU_MAKE" = x; then
9243      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9244$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9245    else
9246      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9247      if test "x$IS_MODERN_MAKE" = x; then
9248        { $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
9249$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;}
9250      else
9251        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9252          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9253            MAKE_EXPECTED_ENV='cygwin'
9254          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9255            MAKE_EXPECTED_ENV='msys'
9256          else
9257            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9258          fi
9259          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9260          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9261        else
9262          # Not relevant for non-Windows
9263          IS_MAKE_CORRECT_ENV=true
9264        fi
9265        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9266          { $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
9267$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;}
9268        else
9269          FOUND_MAKE=$MAKE_CANDIDATE
9270
9271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9272
9273  # First separate the path from the arguments. This will split at the first
9274  # space.
9275  complete="$FOUND_MAKE"
9276  path="${complete%% *}"
9277  tmp="$complete EOL"
9278  arguments="${tmp#* }"
9279
9280  # Input might be given as Windows format, start by converting to
9281  # unix format.
9282  new_path=`$CYGPATH -u "$path"`
9283
9284  # Now try to locate executable using which
9285  new_path=`$WHICH "$new_path" 2> /dev/null`
9286  # bat and cmd files are not always considered executable in cygwin causing which
9287  # to not find them
9288  if test "x$new_path" = x \
9289           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9290           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9291    new_path=`$CYGPATH -u "$path"`
9292  fi
9293  if test "x$new_path" = x; then
9294    # Oops. Which didn't find the executable.
9295    # The splitting of arguments from the executable at a space might have been incorrect,
9296    # since paths with space are more likely in Windows. Give it another try with the whole
9297    # argument.
9298    path="$complete"
9299    arguments="EOL"
9300    new_path=`$CYGPATH -u "$path"`
9301    new_path=`$WHICH "$new_path" 2> /dev/null`
9302    # bat and cmd files are not always considered executable in cygwin causing which
9303    # to not find them
9304    if test "x$new_path" = x \
9305             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9306             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9307      new_path=`$CYGPATH -u "$path"`
9308    fi
9309    if test "x$new_path" = x; then
9310      # It's still not found. Now this is an unrecoverable error.
9311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9312$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9313      has_space=`$ECHO "$complete" | $GREP " "`
9314      if test "x$has_space" != x; then
9315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9317      fi
9318      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9319    fi
9320  fi
9321
9322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9325  # "foo.exe" is OK but "foo" is an error.
9326  #
9327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9328  # It is also a way to make sure we got the proper file name for the real test later on.
9329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9330  if test "x$test_shortpath" = x; then
9331    # Short path failed, file does not exist as specified.
9332    # Try adding .exe or .cmd
9333    if test -f "${new_path}.exe"; then
9334       input_to_shortpath="${new_path}.exe"
9335    elif test -f "${new_path}.cmd"; then
9336       input_to_shortpath="${new_path}.cmd"
9337    else
9338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9339$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9340      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9341$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9342      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9343    fi
9344  else
9345    input_to_shortpath="$new_path"
9346  fi
9347
9348  # Call helper function which possibly converts this using DOS-style short mode.
9349  # If so, the updated path is stored in $new_path.
9350  new_path="$input_to_shortpath"
9351
9352  input_path="$input_to_shortpath"
9353  # Check if we need to convert this using DOS-style short mode. If the path
9354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9355  # take no chances and rewrite it.
9356  # Note: m4 eats our [], so we need to use [ and ] instead.
9357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9358  if test "x$has_forbidden_chars" != x; then
9359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9363      # Going to short mode and back again did indeed matter. Since short mode is
9364      # case insensitive, let's make it lowercase to improve readability.
9365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9366      # Now convert it back to Unix-stile (cygpath)
9367      input_path=`$CYGPATH -u "$shortmode_path"`
9368      new_path="$input_path"
9369    fi
9370  fi
9371
9372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9373  if test "x$test_cygdrive_prefix" = x; then
9374    # As a simple fix, exclude /usr/bin since it's not a real path.
9375    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9377      # a path prefixed by /cygdrive for fixpath to work.
9378      new_path="$CYGWIN_ROOT_PATH$input_path"
9379    fi
9380  fi
9381
9382  # remove trailing .exe if any
9383  new_path="${new_path/%.exe/}"
9384
9385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9386
9387  # First separate the path from the arguments. This will split at the first
9388  # space.
9389  complete="$FOUND_MAKE"
9390  path="${complete%% *}"
9391  tmp="$complete EOL"
9392  arguments="${tmp#* }"
9393
9394  # Input might be given as Windows format, start by converting to
9395  # unix format.
9396  new_path="$path"
9397
9398  windows_path="$new_path"
9399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9400    unix_path=`$CYGPATH -u "$windows_path"`
9401    new_path="$unix_path"
9402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9404    new_path="$unix_path"
9405  fi
9406
9407
9408  # Now try to locate executable using which
9409  new_path=`$WHICH "$new_path" 2> /dev/null`
9410
9411  if test "x$new_path" = x; then
9412    # Oops. Which didn't find the executable.
9413    # The splitting of arguments from the executable at a space might have been incorrect,
9414    # since paths with space are more likely in Windows. Give it another try with the whole
9415    # argument.
9416    path="$complete"
9417    arguments="EOL"
9418    new_path="$path"
9419
9420  windows_path="$new_path"
9421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9422    unix_path=`$CYGPATH -u "$windows_path"`
9423    new_path="$unix_path"
9424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9426    new_path="$unix_path"
9427  fi
9428
9429
9430    new_path=`$WHICH "$new_path" 2> /dev/null`
9431
9432    if test "x$new_path" = x; then
9433      # It's still not found. Now this is an unrecoverable error.
9434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9435$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9436      has_space=`$ECHO "$complete" | $GREP " "`
9437      if test "x$has_space" != x; then
9438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9440      fi
9441      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9442    fi
9443  fi
9444
9445  # Now new_path has a complete unix path to the binary
9446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9447    # Keep paths in /bin as-is, but remove trailing .exe if any
9448    new_path="${new_path/%.exe/}"
9449    # Do not save /bin paths to all_fixpath_prefixes!
9450  else
9451    # Not in mixed or Windows style, start by that.
9452    new_path=`cmd //c echo $new_path`
9453
9454  input_path="$new_path"
9455  # Check if we need to convert this using DOS-style short mode. If the path
9456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9457  # take no chances and rewrite it.
9458  # Note: m4 eats our [], so we need to use [ and ] instead.
9459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9460  if test "x$has_forbidden_chars" != x; then
9461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9463  fi
9464
9465    # Output is in $new_path
9466
9467  windows_path="$new_path"
9468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9469    unix_path=`$CYGPATH -u "$windows_path"`
9470    new_path="$unix_path"
9471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9473    new_path="$unix_path"
9474  fi
9475
9476    # remove trailing .exe if any
9477    new_path="${new_path/%.exe/}"
9478
9479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9481  fi
9482
9483  else
9484    # We're on a posix platform. Hooray! :)
9485    # First separate the path from the arguments. This will split at the first
9486    # space.
9487    complete="$FOUND_MAKE"
9488    path="${complete%% *}"
9489    tmp="$complete EOL"
9490    arguments="${tmp#* }"
9491
9492    # Cannot rely on the command "which" here since it doesn't always work.
9493    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9494    if test -z "$is_absolute_path"; then
9495      # Path to executable is not absolute. Find it.
9496      IFS_save="$IFS"
9497      IFS=:
9498      for p in $PATH; do
9499        if test -f "$p/$path" && test -x "$p/$path"; then
9500          new_path="$p/$path"
9501          break
9502        fi
9503      done
9504      IFS="$IFS_save"
9505    else
9506      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9507$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9508      new_path="$path"
9509    fi
9510
9511    if test "x$new_path" = x; then
9512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9513$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9514        has_space=`$ECHO "$complete" | $GREP " "`
9515        if test "x$has_space" != x; then
9516          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9517$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9518        fi
9519        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9520      fi
9521  fi
9522
9523      # Now join together the path and the arguments once again
9524      if test "x$arguments" != xEOL; then
9525        new_complete="$new_path ${arguments% *}"
9526      else
9527        new_complete="$new_path"
9528      fi
9529
9530  if test "x$complete" != "x$new_complete"; then
9531      FOUND_MAKE="$new_complete"
9532      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9533$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9534    fi
9535
9536        fi
9537      fi
9538    fi
9539  fi
9540
9541        if test "x$FOUND_MAKE" = x; then
9542          for ac_prog in make
9543do
9544  # Extract the first word of "$ac_prog", so it can be a program name with args.
9545set dummy $ac_prog; ac_word=$2
9546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9547$as_echo_n "checking for $ac_word... " >&6; }
9548if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9549  $as_echo_n "(cached) " >&6
9550else
9551  case $CHECK_TOOLSDIR_MAKE in
9552  [\\/]* | ?:[\\/]*)
9553  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9554  ;;
9555  *)
9556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9557for as_dir in $PATH
9558do
9559  IFS=$as_save_IFS
9560  test -z "$as_dir" && as_dir=.
9561    for ac_exec_ext in '' $ac_executable_extensions; do
9562  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9563    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9565    break 2
9566  fi
9567done
9568  done
9569IFS=$as_save_IFS
9570
9571  ;;
9572esac
9573fi
9574CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9575if test -n "$CHECK_TOOLSDIR_MAKE"; then
9576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9577$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9578else
9579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9580$as_echo "no" >&6; }
9581fi
9582
9583
9584  test -n "$CHECK_TOOLSDIR_MAKE" && break
9585done
9586
9587
9588  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9589  DESCRIPTION="make in tools-dir"
9590  if test "x$MAKE_CANDIDATE" != x; then
9591    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9592$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9593    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9594    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9595    if test "x$IS_GNU_MAKE" = x; then
9596      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9597$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9598    else
9599      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9600      if test "x$IS_MODERN_MAKE" = x; then
9601        { $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
9602$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;}
9603      else
9604        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9605          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9606            MAKE_EXPECTED_ENV='cygwin'
9607          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9608            MAKE_EXPECTED_ENV='msys'
9609          else
9610            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9611          fi
9612          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9613          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9614        else
9615          # Not relevant for non-Windows
9616          IS_MAKE_CORRECT_ENV=true
9617        fi
9618        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9619          { $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
9620$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;}
9621        else
9622          FOUND_MAKE=$MAKE_CANDIDATE
9623
9624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9625
9626  # First separate the path from the arguments. This will split at the first
9627  # space.
9628  complete="$FOUND_MAKE"
9629  path="${complete%% *}"
9630  tmp="$complete EOL"
9631  arguments="${tmp#* }"
9632
9633  # Input might be given as Windows format, start by converting to
9634  # unix format.
9635  new_path=`$CYGPATH -u "$path"`
9636
9637  # Now try to locate executable using which
9638  new_path=`$WHICH "$new_path" 2> /dev/null`
9639  # bat and cmd files are not always considered executable in cygwin causing which
9640  # to not find them
9641  if test "x$new_path" = x \
9642           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9643           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9644    new_path=`$CYGPATH -u "$path"`
9645  fi
9646  if test "x$new_path" = x; then
9647    # Oops. Which didn't find the executable.
9648    # The splitting of arguments from the executable at a space might have been incorrect,
9649    # since paths with space are more likely in Windows. Give it another try with the whole
9650    # argument.
9651    path="$complete"
9652    arguments="EOL"
9653    new_path=`$CYGPATH -u "$path"`
9654    new_path=`$WHICH "$new_path" 2> /dev/null`
9655    # bat and cmd files are not always considered executable in cygwin causing which
9656    # to not find them
9657    if test "x$new_path" = x \
9658             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9659             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9660      new_path=`$CYGPATH -u "$path"`
9661    fi
9662    if test "x$new_path" = x; then
9663      # It's still not found. Now this is an unrecoverable error.
9664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9665$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9666      has_space=`$ECHO "$complete" | $GREP " "`
9667      if test "x$has_space" != x; then
9668        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9669$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9670      fi
9671      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9672    fi
9673  fi
9674
9675  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9676  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9677  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9678  # "foo.exe" is OK but "foo" is an error.
9679  #
9680  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9681  # It is also a way to make sure we got the proper file name for the real test later on.
9682  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9683  if test "x$test_shortpath" = x; then
9684    # Short path failed, file does not exist as specified.
9685    # Try adding .exe or .cmd
9686    if test -f "${new_path}.exe"; then
9687       input_to_shortpath="${new_path}.exe"
9688    elif test -f "${new_path}.cmd"; then
9689       input_to_shortpath="${new_path}.cmd"
9690    else
9691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9692$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9693      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9694$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9695      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9696    fi
9697  else
9698    input_to_shortpath="$new_path"
9699  fi
9700
9701  # Call helper function which possibly converts this using DOS-style short mode.
9702  # If so, the updated path is stored in $new_path.
9703  new_path="$input_to_shortpath"
9704
9705  input_path="$input_to_shortpath"
9706  # Check if we need to convert this using DOS-style short mode. If the path
9707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9708  # take no chances and rewrite it.
9709  # Note: m4 eats our [], so we need to use [ and ] instead.
9710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9711  if test "x$has_forbidden_chars" != x; then
9712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9716      # Going to short mode and back again did indeed matter. Since short mode is
9717      # case insensitive, let's make it lowercase to improve readability.
9718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9719      # Now convert it back to Unix-stile (cygpath)
9720      input_path=`$CYGPATH -u "$shortmode_path"`
9721      new_path="$input_path"
9722    fi
9723  fi
9724
9725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9726  if test "x$test_cygdrive_prefix" = x; then
9727    # As a simple fix, exclude /usr/bin since it's not a real path.
9728    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9730      # a path prefixed by /cygdrive for fixpath to work.
9731      new_path="$CYGWIN_ROOT_PATH$input_path"
9732    fi
9733  fi
9734
9735  # remove trailing .exe if any
9736  new_path="${new_path/%.exe/}"
9737
9738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9739
9740  # First separate the path from the arguments. This will split at the first
9741  # space.
9742  complete="$FOUND_MAKE"
9743  path="${complete%% *}"
9744  tmp="$complete EOL"
9745  arguments="${tmp#* }"
9746
9747  # Input might be given as Windows format, start by converting to
9748  # unix format.
9749  new_path="$path"
9750
9751  windows_path="$new_path"
9752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9753    unix_path=`$CYGPATH -u "$windows_path"`
9754    new_path="$unix_path"
9755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9757    new_path="$unix_path"
9758  fi
9759
9760
9761  # Now try to locate executable using which
9762  new_path=`$WHICH "$new_path" 2> /dev/null`
9763
9764  if test "x$new_path" = x; then
9765    # Oops. Which didn't find the executable.
9766    # The splitting of arguments from the executable at a space might have been incorrect,
9767    # since paths with space are more likely in Windows. Give it another try with the whole
9768    # argument.
9769    path="$complete"
9770    arguments="EOL"
9771    new_path="$path"
9772
9773  windows_path="$new_path"
9774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9775    unix_path=`$CYGPATH -u "$windows_path"`
9776    new_path="$unix_path"
9777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9779    new_path="$unix_path"
9780  fi
9781
9782
9783    new_path=`$WHICH "$new_path" 2> /dev/null`
9784
9785    if test "x$new_path" = x; then
9786      # It's still not found. Now this is an unrecoverable error.
9787      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9788$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9789      has_space=`$ECHO "$complete" | $GREP " "`
9790      if test "x$has_space" != x; then
9791        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9792$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9793      fi
9794      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9795    fi
9796  fi
9797
9798  # Now new_path has a complete unix path to the binary
9799  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9800    # Keep paths in /bin as-is, but remove trailing .exe if any
9801    new_path="${new_path/%.exe/}"
9802    # Do not save /bin paths to all_fixpath_prefixes!
9803  else
9804    # Not in mixed or Windows style, start by that.
9805    new_path=`cmd //c echo $new_path`
9806
9807  input_path="$new_path"
9808  # Check if we need to convert this using DOS-style short mode. If the path
9809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9810  # take no chances and rewrite it.
9811  # Note: m4 eats our [], so we need to use [ and ] instead.
9812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9813  if test "x$has_forbidden_chars" != x; then
9814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9815    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9816  fi
9817
9818    # Output is in $new_path
9819
9820  windows_path="$new_path"
9821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9822    unix_path=`$CYGPATH -u "$windows_path"`
9823    new_path="$unix_path"
9824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9826    new_path="$unix_path"
9827  fi
9828
9829    # remove trailing .exe if any
9830    new_path="${new_path/%.exe/}"
9831
9832    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9833    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9834  fi
9835
9836  else
9837    # We're on a posix platform. Hooray! :)
9838    # First separate the path from the arguments. This will split at the first
9839    # space.
9840    complete="$FOUND_MAKE"
9841    path="${complete%% *}"
9842    tmp="$complete EOL"
9843    arguments="${tmp#* }"
9844
9845    # Cannot rely on the command "which" here since it doesn't always work.
9846    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9847    if test -z "$is_absolute_path"; then
9848      # Path to executable is not absolute. Find it.
9849      IFS_save="$IFS"
9850      IFS=:
9851      for p in $PATH; do
9852        if test -f "$p/$path" && test -x "$p/$path"; then
9853          new_path="$p/$path"
9854          break
9855        fi
9856      done
9857      IFS="$IFS_save"
9858    else
9859      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9860$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9861      new_path="$path"
9862    fi
9863
9864    if test "x$new_path" = x; then
9865        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9866$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9867        has_space=`$ECHO "$complete" | $GREP " "`
9868        if test "x$has_space" != x; then
9869          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9870$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9871        fi
9872        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9873      fi
9874  fi
9875
9876      # Now join together the path and the arguments once again
9877      if test "x$arguments" != xEOL; then
9878        new_complete="$new_path ${arguments% *}"
9879      else
9880        new_complete="$new_path"
9881      fi
9882
9883  if test "x$complete" != "x$new_complete"; then
9884      FOUND_MAKE="$new_complete"
9885      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9886$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9887    fi
9888
9889        fi
9890      fi
9891    fi
9892  fi
9893
9894        fi
9895        PATH=$OLD_PATH
9896      fi
9897    fi
9898
9899    if test "x$FOUND_MAKE" = x; then
9900      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
9901    fi
9902  fi
9903
9904  MAKE=$FOUND_MAKE
9905
9906  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9907$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9908
9909
9910
9911    # Test if find supports -delete
9912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9913$as_echo_n "checking if find supports -delete... " >&6; }
9914    FIND_DELETE="-delete"
9915
9916    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9917
9918    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9919
9920    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9921    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9922        # No, it does not.
9923        rm $DELETEDIR/TestIfFindSupportsDelete
9924        FIND_DELETE="-exec rm \{\} \+"
9925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9926$as_echo "no" >&6; }
9927    else
9928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9929$as_echo "yes" >&6; }
9930    fi
9931    rmdir $DELETEDIR
9932
9933
9934
9935# These tools might not be installed by default,
9936# need hint on how to install them.
9937
9938    for ac_prog in unzip
9939do
9940  # Extract the first word of "$ac_prog", so it can be a program name with args.
9941set dummy $ac_prog; ac_word=$2
9942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9943$as_echo_n "checking for $ac_word... " >&6; }
9944if test "${ac_cv_path_UNZIP+set}" = set; then :
9945  $as_echo_n "(cached) " >&6
9946else
9947  case $UNZIP in
9948  [\\/]* | ?:[\\/]*)
9949  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9950  ;;
9951  *)
9952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9953for as_dir in $PATH
9954do
9955  IFS=$as_save_IFS
9956  test -z "$as_dir" && as_dir=.
9957    for ac_exec_ext in '' $ac_executable_extensions; do
9958  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9959    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9961    break 2
9962  fi
9963done
9964  done
9965IFS=$as_save_IFS
9966
9967  ;;
9968esac
9969fi
9970UNZIP=$ac_cv_path_UNZIP
9971if test -n "$UNZIP"; then
9972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9973$as_echo "$UNZIP" >&6; }
9974else
9975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9976$as_echo "no" >&6; }
9977fi
9978
9979
9980  test -n "$UNZIP" && break
9981done
9982
9983
9984    if test "x$UNZIP" = x; then
9985        if test "xunzip" = x; then
9986          PROG_NAME=unzip
9987        else
9988          PROG_NAME=unzip
9989        fi
9990        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9991$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9992        as_fn_error $? "Cannot continue" "$LINENO" 5
9993    fi
9994
9995
9996
9997    for ac_prog in zip
9998do
9999  # Extract the first word of "$ac_prog", so it can be a program name with args.
10000set dummy $ac_prog; ac_word=$2
10001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10002$as_echo_n "checking for $ac_word... " >&6; }
10003if test "${ac_cv_path_ZIP+set}" = set; then :
10004  $as_echo_n "(cached) " >&6
10005else
10006  case $ZIP in
10007  [\\/]* | ?:[\\/]*)
10008  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10009  ;;
10010  *)
10011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10012for as_dir in $PATH
10013do
10014  IFS=$as_save_IFS
10015  test -z "$as_dir" && as_dir=.
10016    for ac_exec_ext in '' $ac_executable_extensions; do
10017  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10018    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10020    break 2
10021  fi
10022done
10023  done
10024IFS=$as_save_IFS
10025
10026  ;;
10027esac
10028fi
10029ZIP=$ac_cv_path_ZIP
10030if test -n "$ZIP"; then
10031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10032$as_echo "$ZIP" >&6; }
10033else
10034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10035$as_echo "no" >&6; }
10036fi
10037
10038
10039  test -n "$ZIP" && break
10040done
10041
10042
10043    if test "x$ZIP" = x; then
10044        if test "xzip" = x; then
10045          PROG_NAME=zip
10046        else
10047          PROG_NAME=zip
10048        fi
10049        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10050$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10051        as_fn_error $? "Cannot continue" "$LINENO" 5
10052    fi
10053
10054
10055
10056# Non-required basic tools
10057
10058# Extract the first word of "ldd", so it can be a program name with args.
10059set dummy ldd; ac_word=$2
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10061$as_echo_n "checking for $ac_word... " >&6; }
10062if test "${ac_cv_path_LDD+set}" = set; then :
10063  $as_echo_n "(cached) " >&6
10064else
10065  case $LDD in
10066  [\\/]* | ?:[\\/]*)
10067  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10068  ;;
10069  *)
10070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10071for as_dir in $PATH
10072do
10073  IFS=$as_save_IFS
10074  test -z "$as_dir" && as_dir=.
10075    for ac_exec_ext in '' $ac_executable_extensions; do
10076  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10077    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10079    break 2
10080  fi
10081done
10082  done
10083IFS=$as_save_IFS
10084
10085  ;;
10086esac
10087fi
10088LDD=$ac_cv_path_LDD
10089if test -n "$LDD"; then
10090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10091$as_echo "$LDD" >&6; }
10092else
10093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10094$as_echo "no" >&6; }
10095fi
10096
10097
10098if test "x$LDD" = "x"; then
10099    # List shared lib dependencies is used for
10100    # debug output and checking for forbidden dependencies.
10101    # We can build without it.
10102    LDD="true"
10103fi
10104# Extract the first word of "otool", so it can be a program name with args.
10105set dummy otool; ac_word=$2
10106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10107$as_echo_n "checking for $ac_word... " >&6; }
10108if test "${ac_cv_path_OTOOL+set}" = set; then :
10109  $as_echo_n "(cached) " >&6
10110else
10111  case $OTOOL in
10112  [\\/]* | ?:[\\/]*)
10113  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10114  ;;
10115  *)
10116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10117for as_dir in $PATH
10118do
10119  IFS=$as_save_IFS
10120  test -z "$as_dir" && as_dir=.
10121    for ac_exec_ext in '' $ac_executable_extensions; do
10122  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10123    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10125    break 2
10126  fi
10127done
10128  done
10129IFS=$as_save_IFS
10130
10131  ;;
10132esac
10133fi
10134OTOOL=$ac_cv_path_OTOOL
10135if test -n "$OTOOL"; then
10136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10137$as_echo "$OTOOL" >&6; }
10138else
10139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10140$as_echo "no" >&6; }
10141fi
10142
10143
10144if test "x$OTOOL" = "x"; then
10145   OTOOL="true"
10146fi
10147for ac_prog in readelf greadelf
10148do
10149  # Extract the first word of "$ac_prog", so it can be a program name with args.
10150set dummy $ac_prog; ac_word=$2
10151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10152$as_echo_n "checking for $ac_word... " >&6; }
10153if test "${ac_cv_path_READELF+set}" = set; then :
10154  $as_echo_n "(cached) " >&6
10155else
10156  case $READELF in
10157  [\\/]* | ?:[\\/]*)
10158  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10159  ;;
10160  *)
10161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10162for as_dir in $PATH
10163do
10164  IFS=$as_save_IFS
10165  test -z "$as_dir" && as_dir=.
10166    for ac_exec_ext in '' $ac_executable_extensions; do
10167  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10168    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10170    break 2
10171  fi
10172done
10173  done
10174IFS=$as_save_IFS
10175
10176  ;;
10177esac
10178fi
10179READELF=$ac_cv_path_READELF
10180if test -n "$READELF"; then
10181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10182$as_echo "$READELF" >&6; }
10183else
10184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10185$as_echo "no" >&6; }
10186fi
10187
10188
10189  test -n "$READELF" && break
10190done
10191
10192# Extract the first word of "hg", so it can be a program name with args.
10193set dummy hg; ac_word=$2
10194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10195$as_echo_n "checking for $ac_word... " >&6; }
10196if test "${ac_cv_path_HG+set}" = set; then :
10197  $as_echo_n "(cached) " >&6
10198else
10199  case $HG in
10200  [\\/]* | ?:[\\/]*)
10201  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10202  ;;
10203  *)
10204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10205for as_dir in $PATH
10206do
10207  IFS=$as_save_IFS
10208  test -z "$as_dir" && as_dir=.
10209    for ac_exec_ext in '' $ac_executable_extensions; do
10210  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10211    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10213    break 2
10214  fi
10215done
10216  done
10217IFS=$as_save_IFS
10218
10219  ;;
10220esac
10221fi
10222HG=$ac_cv_path_HG
10223if test -n "$HG"; then
10224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10225$as_echo "$HG" >&6; }
10226else
10227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10228$as_echo "no" >&6; }
10229fi
10230
10231
10232# Extract the first word of "stat", so it can be a program name with args.
10233set dummy stat; ac_word=$2
10234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10235$as_echo_n "checking for $ac_word... " >&6; }
10236if test "${ac_cv_path_STAT+set}" = set; then :
10237  $as_echo_n "(cached) " >&6
10238else
10239  case $STAT in
10240  [\\/]* | ?:[\\/]*)
10241  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10242  ;;
10243  *)
10244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10245for as_dir in $PATH
10246do
10247  IFS=$as_save_IFS
10248  test -z "$as_dir" && as_dir=.
10249    for ac_exec_ext in '' $ac_executable_extensions; do
10250  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10251    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10253    break 2
10254  fi
10255done
10256  done
10257IFS=$as_save_IFS
10258
10259  ;;
10260esac
10261fi
10262STAT=$ac_cv_path_STAT
10263if test -n "$STAT"; then
10264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10265$as_echo "$STAT" >&6; }
10266else
10267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10268$as_echo "no" >&6; }
10269fi
10270
10271
10272# Extract the first word of "time", so it can be a program name with args.
10273set dummy time; ac_word=$2
10274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10275$as_echo_n "checking for $ac_word... " >&6; }
10276if test "${ac_cv_path_TIME+set}" = set; then :
10277  $as_echo_n "(cached) " >&6
10278else
10279  case $TIME in
10280  [\\/]* | ?:[\\/]*)
10281  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10282  ;;
10283  *)
10284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10285for as_dir in $PATH
10286do
10287  IFS=$as_save_IFS
10288  test -z "$as_dir" && as_dir=.
10289    for ac_exec_ext in '' $ac_executable_extensions; do
10290  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10291    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10293    break 2
10294  fi
10295done
10296  done
10297IFS=$as_save_IFS
10298
10299  ;;
10300esac
10301fi
10302TIME=$ac_cv_path_TIME
10303if test -n "$TIME"; then
10304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10305$as_echo "$TIME" >&6; }
10306else
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10308$as_echo "no" >&6; }
10309fi
10310
10311
10312
10313if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10314
10315    for ac_prog in comm
10316do
10317  # Extract the first word of "$ac_prog", so it can be a program name with args.
10318set dummy $ac_prog; ac_word=$2
10319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10320$as_echo_n "checking for $ac_word... " >&6; }
10321if test "${ac_cv_path_COMM+set}" = set; then :
10322  $as_echo_n "(cached) " >&6
10323else
10324  case $COMM in
10325  [\\/]* | ?:[\\/]*)
10326  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10327  ;;
10328  *)
10329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10330for as_dir in $PATH
10331do
10332  IFS=$as_save_IFS
10333  test -z "$as_dir" && as_dir=.
10334    for ac_exec_ext in '' $ac_executable_extensions; do
10335  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10336    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10338    break 2
10339  fi
10340done
10341  done
10342IFS=$as_save_IFS
10343
10344  ;;
10345esac
10346fi
10347COMM=$ac_cv_path_COMM
10348if test -n "$COMM"; then
10349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10350$as_echo "$COMM" >&6; }
10351else
10352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10353$as_echo "no" >&6; }
10354fi
10355
10356
10357  test -n "$COMM" && break
10358done
10359
10360
10361    if test "x$COMM" = x; then
10362        if test "xcomm" = x; then
10363          PROG_NAME=comm
10364        else
10365          PROG_NAME=comm
10366        fi
10367        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10368$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10369        as_fn_error $? "Cannot continue" "$LINENO" 5
10370    fi
10371
10372
10373fi
10374
10375if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10376
10377    for ac_prog in xattr
10378do
10379  # Extract the first word of "$ac_prog", so it can be a program name with args.
10380set dummy $ac_prog; ac_word=$2
10381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10382$as_echo_n "checking for $ac_word... " >&6; }
10383if test "${ac_cv_path_XATTR+set}" = set; then :
10384  $as_echo_n "(cached) " >&6
10385else
10386  case $XATTR in
10387  [\\/]* | ?:[\\/]*)
10388  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10389  ;;
10390  *)
10391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10392for as_dir in $PATH
10393do
10394  IFS=$as_save_IFS
10395  test -z "$as_dir" && as_dir=.
10396    for ac_exec_ext in '' $ac_executable_extensions; do
10397  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10398    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10400    break 2
10401  fi
10402done
10403  done
10404IFS=$as_save_IFS
10405
10406  ;;
10407esac
10408fi
10409XATTR=$ac_cv_path_XATTR
10410if test -n "$XATTR"; then
10411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10412$as_echo "$XATTR" >&6; }
10413else
10414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10415$as_echo "no" >&6; }
10416fi
10417
10418
10419  test -n "$XATTR" && break
10420done
10421
10422
10423    if test "x$XATTR" = x; then
10424        if test "xxattr" = x; then
10425          PROG_NAME=xattr
10426        else
10427          PROG_NAME=xattr
10428        fi
10429        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10430$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10431        as_fn_error $? "Cannot continue" "$LINENO" 5
10432    fi
10433
10434
10435fi
10436
10437
10438# Check if pkg-config is available.
10439
10440
10441if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10442	if test -n "$ac_tool_prefix"; then
10443  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10444set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10446$as_echo_n "checking for $ac_word... " >&6; }
10447if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10448  $as_echo_n "(cached) " >&6
10449else
10450  case $PKG_CONFIG in
10451  [\\/]* | ?:[\\/]*)
10452  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10453  ;;
10454  *)
10455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10456for as_dir in $PATH
10457do
10458  IFS=$as_save_IFS
10459  test -z "$as_dir" && as_dir=.
10460    for ac_exec_ext in '' $ac_executable_extensions; do
10461  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10462    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10464    break 2
10465  fi
10466done
10467  done
10468IFS=$as_save_IFS
10469
10470  ;;
10471esac
10472fi
10473PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10474if test -n "$PKG_CONFIG"; then
10475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10476$as_echo "$PKG_CONFIG" >&6; }
10477else
10478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10479$as_echo "no" >&6; }
10480fi
10481
10482
10483fi
10484if test -z "$ac_cv_path_PKG_CONFIG"; then
10485  ac_pt_PKG_CONFIG=$PKG_CONFIG
10486  # Extract the first word of "pkg-config", so it can be a program name with args.
10487set dummy pkg-config; ac_word=$2
10488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10489$as_echo_n "checking for $ac_word... " >&6; }
10490if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10491  $as_echo_n "(cached) " >&6
10492else
10493  case $ac_pt_PKG_CONFIG in
10494  [\\/]* | ?:[\\/]*)
10495  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10496  ;;
10497  *)
10498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10499for as_dir in $PATH
10500do
10501  IFS=$as_save_IFS
10502  test -z "$as_dir" && as_dir=.
10503    for ac_exec_ext in '' $ac_executable_extensions; do
10504  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10505    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10507    break 2
10508  fi
10509done
10510  done
10511IFS=$as_save_IFS
10512
10513  ;;
10514esac
10515fi
10516ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10517if test -n "$ac_pt_PKG_CONFIG"; then
10518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10519$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10520else
10521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10522$as_echo "no" >&6; }
10523fi
10524
10525  if test "x$ac_pt_PKG_CONFIG" = x; then
10526    PKG_CONFIG=""
10527  else
10528    case $cross_compiling:$ac_tool_warned in
10529yes:)
10530{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10531$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10532ac_tool_warned=yes ;;
10533esac
10534    PKG_CONFIG=$ac_pt_PKG_CONFIG
10535  fi
10536else
10537  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10538fi
10539
10540fi
10541if test -n "$PKG_CONFIG"; then
10542	_pkg_min_version=0.9.0
10543	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10544$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10545	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10546		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10547$as_echo "yes" >&6; }
10548	else
10549		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10550$as_echo "no" >&6; }
10551		PKG_CONFIG=""
10552	fi
10553
10554fi
10555
10556# After basic tools have been setup, we can check build os specific details.
10557
10558###############################################################################
10559
10560# Note that this is the build platform OS version!
10561
10562OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10563OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10564OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10565OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10566
10567
10568
10569
10570
10571# Setup builddeps, for automatic downloading of tools we need.
10572# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10573# boot-jdk setup, but we need to have basic tools setup first.
10574
10575
10576# Check whether --with-builddeps-conf was given.
10577if test "${with_builddeps_conf+set}" = set; then :
10578  withval=$with_builddeps_conf;
10579fi
10580
10581
10582
10583# Check whether --with-builddeps-server was given.
10584if test "${with_builddeps_server+set}" = set; then :
10585  withval=$with_builddeps_server;
10586fi
10587
10588
10589
10590# Check whether --with-builddeps-dir was given.
10591if test "${with_builddeps_dir+set}" = set; then :
10592  withval=$with_builddeps_dir;
10593else
10594  with_builddeps_dir=/localhome/builddeps
10595fi
10596
10597
10598
10599# Check whether --with-builddeps-group was given.
10600if test "${with_builddeps_group+set}" = set; then :
10601  withval=$with_builddeps_group;
10602fi
10603
10604
10605
10606
10607    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10608        if test "x$with_builddeps_conf" != x; then
10609            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10610$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10611            builddepsfile=$with_builddeps_conf
10612            if test -s $builddepsfile; then
10613                . $builddepsfile
10614                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10615$as_echo "loaded!" >&6; }
10616            else
10617               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10618           fi
10619        else
10620            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10621$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10622            builddepsfile=`mktemp`
10623            touch $builddepsfile
10624            # Put all found confs into a single file.
10625            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10626            # Source the file to acquire the variables
10627            if test -s $builddepsfile; then
10628                . $builddepsfile
10629                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10630$as_echo "found at least one!" >&6; }
10631            else
10632               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10633           fi
10634        fi
10635        # Create build and target names that use _ instead of "-" and ".".
10636        # This is necessary to use them in variable names.
10637        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10638        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10639        # Extract rewrite information for build and target
10640        eval rewritten_build=\${REWRITE_${build_var}}
10641        if test "x$rewritten_build" = x; then
10642            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10643            echo Build stays the same $rewritten_build
10644        else
10645            echo Rewriting build for builddeps into $rewritten_build
10646        fi
10647        eval rewritten_target=\${REWRITE_${target_var}}
10648        if test "x$rewritten_target" = x; then
10649            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10650            echo Target stays the same $rewritten_target
10651        else
10652            echo Rewriting target for builddeps into $rewritten_target
10653        fi
10654        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10655        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10656    fi
10657    for ac_prog in 7z unzip
10658do
10659  # Extract the first word of "$ac_prog", so it can be a program name with args.
10660set dummy $ac_prog; ac_word=$2
10661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10662$as_echo_n "checking for $ac_word... " >&6; }
10663if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10664  $as_echo_n "(cached) " >&6
10665else
10666  if test -n "$BDEPS_UNZIP"; then
10667  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10668else
10669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10670for as_dir in $PATH
10671do
10672  IFS=$as_save_IFS
10673  test -z "$as_dir" && as_dir=.
10674    for ac_exec_ext in '' $ac_executable_extensions; do
10675  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10676    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10678    break 2
10679  fi
10680done
10681  done
10682IFS=$as_save_IFS
10683
10684fi
10685fi
10686BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10687if test -n "$BDEPS_UNZIP"; then
10688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10689$as_echo "$BDEPS_UNZIP" >&6; }
10690else
10691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10692$as_echo "no" >&6; }
10693fi
10694
10695
10696  test -n "$BDEPS_UNZIP" && break
10697done
10698
10699    if test "x$BDEPS_UNZIP" = x7z; then
10700        BDEPS_UNZIP="7z x"
10701    fi
10702
10703    for ac_prog in wget lftp ftp
10704do
10705  # Extract the first word of "$ac_prog", so it can be a program name with args.
10706set dummy $ac_prog; ac_word=$2
10707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10708$as_echo_n "checking for $ac_word... " >&6; }
10709if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10710  $as_echo_n "(cached) " >&6
10711else
10712  if test -n "$BDEPS_FTP"; then
10713  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10714else
10715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10716for as_dir in $PATH
10717do
10718  IFS=$as_save_IFS
10719  test -z "$as_dir" && as_dir=.
10720    for ac_exec_ext in '' $ac_executable_extensions; do
10721  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10722    ac_cv_prog_BDEPS_FTP="$ac_prog"
10723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10724    break 2
10725  fi
10726done
10727  done
10728IFS=$as_save_IFS
10729
10730fi
10731fi
10732BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10733if test -n "$BDEPS_FTP"; then
10734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10735$as_echo "$BDEPS_FTP" >&6; }
10736else
10737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10738$as_echo "no" >&6; }
10739fi
10740
10741
10742  test -n "$BDEPS_FTP" && break
10743done
10744
10745
10746
10747###############################################################################
10748#
10749# Determine OpenJDK variants, options and version numbers.
10750#
10751###############################################################################
10752
10753# We need build & target for this.
10754
10755
10756###############################################################################
10757#
10758# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10759# We always build headless support.
10760#
10761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10762$as_echo_n "checking headful support... " >&6; }
10763# Check whether --enable-headful was given.
10764if test "${enable_headful+set}" = set; then :
10765  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10766else
10767  SUPPORT_HEADFUL=yes
10768fi
10769
10770
10771SUPPORT_HEADLESS=yes
10772BUILD_HEADLESS="BUILD_HEADLESS:=true"
10773
10774if test "x$SUPPORT_HEADFUL" = xyes; then
10775    # We are building both headful and headless.
10776    headful_msg="inlude support for both headful and headless"
10777fi
10778
10779if test "x$SUPPORT_HEADFUL" = xno; then
10780    # Thus we are building headless only.
10781    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10782    headful_msg="headless only"
10783fi
10784
10785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10786$as_echo "$headful_msg" >&6; }
10787
10788
10789
10790
10791
10792# Control wether Hotspot runs Queens test after build.
10793# Check whether --enable-hotspot-test-in-build was given.
10794if test "${enable_hotspot_test_in_build+set}" = set; then :
10795  enableval=$enable_hotspot_test_in_build;
10796else
10797  enable_hotspot_test_in_build=no
10798fi
10799
10800if test "x$enable_hotspot_test_in_build" = "xyes"; then
10801    TEST_IN_BUILD=true
10802else
10803    TEST_IN_BUILD=false
10804fi
10805
10806
10807###############################################################################
10808#
10809# Choose cacerts source file
10810#
10811
10812# Check whether --with-cacerts-file was given.
10813if test "${with_cacerts_file+set}" = set; then :
10814  withval=$with_cacerts_file;
10815fi
10816
10817if test "x$with_cacerts_file" != x; then
10818    CACERTS_FILE=$with_cacerts_file
10819else
10820    if test "x$OPENJDK" = "xtrue"; then
10821        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10822    else
10823        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10824    fi
10825fi
10826
10827
10828###############################################################################
10829#
10830# Enable or disable unlimited crypto
10831#
10832# Check whether --enable-unlimited-crypto was given.
10833if test "${enable_unlimited_crypto+set}" = set; then :
10834  enableval=$enable_unlimited_crypto;
10835else
10836  enable_unlimited_crypto=no
10837fi
10838
10839if test "x$enable_unlimited_crypto" = "xyes"; then
10840    UNLIMITED_CRYPTO=true
10841else
10842    UNLIMITED_CRYPTO=false
10843fi
10844
10845
10846###############################################################################
10847#
10848# Enable or disable the elliptic curve crypto implementation
10849#
10850
10851
10852###############################################################################
10853#
10854# Compress jars
10855#
10856COMPRESS_JARS=false
10857
10858
10859
10860
10861# Source the version numbers
10862. $AUTOCONF_DIR/version-numbers
10863
10864# Get the settings from parameters
10865
10866# Check whether --with-milestone was given.
10867if test "${with_milestone+set}" = set; then :
10868  withval=$with_milestone;
10869fi
10870
10871if test "x$with_milestone" = xyes; then
10872  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10873elif test "x$with_milestone" != x; then
10874    MILESTONE="$with_milestone"
10875fi
10876if test "x$MILESTONE" = x; then
10877  MILESTONE=internal
10878fi
10879
10880
10881# Check whether --with-build-number was given.
10882if test "${with_build_number+set}" = set; then :
10883  withval=$with_build_number;
10884fi
10885
10886if test "x$with_build_number" = xyes; then
10887  as_fn_error $? "Build number must have a value" "$LINENO" 5
10888elif test "x$with_build_number" != x; then
10889  JDK_BUILD_NUMBER="$with_build_number"
10890fi
10891if test "x$JDK_BUILD_NUMBER" = x; then
10892  JDK_BUILD_NUMBER=b00
10893fi
10894
10895
10896# Check whether --with-user-release-suffix was given.
10897if test "${with_user_release_suffix+set}" = set; then :
10898  withval=$with_user_release_suffix;
10899fi
10900
10901if test "x$with_user_release_suffix" = xyes; then
10902  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10903elif test "x$with_user_release_suffix" != x; then
10904  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10905else
10906  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10907  # Avoid [:alnum:] since it depends on the locale.
10908  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10909  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10910fi
10911
10912
10913# Now set the JDK version, milestone, build number etc.
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928COPYRIGHT_YEAR=`date +'%Y'`
10929
10930
10931if test "x$JDK_UPDATE_VERSION" != x; then
10932  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10933else
10934  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10935fi
10936
10937
10938COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10939
10940
10941
10942###############################################################################
10943#
10944# Setup BootJDK, used to bootstrap the build.
10945#
10946###############################################################################
10947
10948
10949BOOT_JDK_FOUND=no
10950
10951# Check whether --with-boot-jdk was given.
10952if test "${with_boot_jdk+set}" = set; then :
10953  withval=$with_boot_jdk;
10954fi
10955
10956
10957# We look for the Boot JDK through various means, going from more certain to
10958# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10959# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10960# must check if this is indeed valid; otherwise we'll continue looking.
10961
10962# Test: Is bootjdk explicitely set by command line arguments?
10963
10964  if test "x$BOOT_JDK_FOUND" = xno; then
10965    # Now execute the test
10966
10967if test "x$with_boot_jdk" != x; then
10968    BOOT_JDK=$with_boot_jdk
10969    BOOT_JDK_FOUND=maybe
10970    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10971$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10972fi
10973
10974
10975    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10976    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10977      # Do we have a bin/java?
10978      if test ! -x "$BOOT_JDK/bin/java"; then
10979        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10981        BOOT_JDK_FOUND=no
10982      else
10983        # Do we have a bin/javac?
10984        if test ! -x "$BOOT_JDK/bin/javac"; then
10985          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10987          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10988$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10989          BOOT_JDK_FOUND=no
10990        else
10991          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10992          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10993            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10995            BOOT_JDK_FOUND=no
10996          else
10997            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10998            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10999
11000            # Extra M4 quote needed to protect [] in grep expression.
11001            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11002            if test "x$FOUND_VERSION_78" = x; then
11003              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11005              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11006$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11007              BOOT_JDK_FOUND=no
11008            else
11009              # We're done! :-)
11010              BOOT_JDK_FOUND=yes
11011
11012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11013
11014  # Input might be given as Windows format, start by converting to
11015  # unix format.
11016  path="$BOOT_JDK"
11017  new_path=`$CYGPATH -u "$path"`
11018
11019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11022  # "foo.exe" is OK but "foo" is an error.
11023  #
11024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11025  # It is also a way to make sure we got the proper file name for the real test later on.
11026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11027  if test "x$test_shortpath" = x; then
11028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11029$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11030    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11031  fi
11032
11033  # Call helper function which possibly converts this using DOS-style short mode.
11034  # If so, the updated path is stored in $new_path.
11035
11036  input_path="$new_path"
11037  # Check if we need to convert this using DOS-style short mode. If the path
11038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11039  # take no chances and rewrite it.
11040  # Note: m4 eats our [], so we need to use [ and ] instead.
11041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11042  if test "x$has_forbidden_chars" != x; then
11043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11047      # Going to short mode and back again did indeed matter. Since short mode is
11048      # case insensitive, let's make it lowercase to improve readability.
11049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11050      # Now convert it back to Unix-stile (cygpath)
11051      input_path=`$CYGPATH -u "$shortmode_path"`
11052      new_path="$input_path"
11053    fi
11054  fi
11055
11056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11057  if test "x$test_cygdrive_prefix" = x; then
11058    # As a simple fix, exclude /usr/bin since it's not a real path.
11059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11061      # a path prefixed by /cygdrive for fixpath to work.
11062      new_path="$CYGWIN_ROOT_PATH$input_path"
11063    fi
11064  fi
11065
11066
11067  if test "x$path" != "x$new_path"; then
11068    BOOT_JDK="$new_path"
11069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11071  fi
11072
11073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11074
11075  path="$BOOT_JDK"
11076  has_colon=`$ECHO $path | $GREP ^.:`
11077  new_path="$path"
11078  if test "x$has_colon" = x; then
11079    # Not in mixed or Windows style, start by that.
11080    new_path=`cmd //c echo $path`
11081  fi
11082
11083
11084  input_path="$new_path"
11085  # Check if we need to convert this using DOS-style short mode. If the path
11086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11087  # take no chances and rewrite it.
11088  # Note: m4 eats our [], so we need to use [ and ] instead.
11089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11090  if test "x$has_forbidden_chars" != x; then
11091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11093  fi
11094
11095
11096  windows_path="$new_path"
11097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11098    unix_path=`$CYGPATH -u "$windows_path"`
11099    new_path="$unix_path"
11100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11102    new_path="$unix_path"
11103  fi
11104
11105  if test "x$path" != "x$new_path"; then
11106    BOOT_JDK="$new_path"
11107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11109  fi
11110
11111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11113
11114  else
11115    # We're on a posix platform. Hooray! :)
11116    path="$BOOT_JDK"
11117
11118    if test ! -f "$path" && test ! -d "$path"; then
11119      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11120    fi
11121
11122    has_space=`$ECHO "$path" | $GREP " "`
11123    if test "x$has_space" != x; then
11124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11125$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11126      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11127    fi
11128  fi
11129
11130              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11131$as_echo_n "checking for Boot JDK... " >&6; }
11132              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11133$as_echo "$BOOT_JDK" >&6; }
11134              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11135$as_echo_n "checking Boot JDK version... " >&6; }
11136              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11137              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11138$as_echo "$BOOT_JDK_VERSION" >&6; }
11139            fi # end check jdk version
11140          fi # end check rt.jar
11141        fi # end check javac
11142      fi # end check java
11143    fi # end check boot jdk found
11144  fi
11145
11146if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11147  # Having specified an argument which is incorrect will produce an instant failure;
11148  # we should not go on looking
11149  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11150fi
11151
11152# Test: Is bootjdk available from builddeps?
11153
11154  if test "x$BOOT_JDK_FOUND" = xno; then
11155    # Now execute the test
11156
11157
11158
11159    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11160        # Source the builddeps file again, to make sure it uses the latest variables!
11161        . $builddepsfile
11162        # Look for a target and build machine specific resource!
11163        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11164        if test "x$resource" = x; then
11165            # Ok, lets instead look for a target specific resource
11166            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11167        fi
11168        if test "x$resource" = x; then
11169            # Ok, lets instead look for a build specific resource
11170            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11171        fi
11172        if test "x$resource" = x; then
11173            # Ok, lets instead look for a generic resource
11174            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11175            resource=${builddep_bootjdk}
11176        fi
11177        if test "x$resource" != x; then
11178            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11179$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11180	    # If the resource in the builddeps.conf file is an existing directory,
11181	    # for example /java/linux/cups
11182	    if test -d ${resource}; then
11183	       depdir=${resource}
11184	    else
11185
11186# bootjdk is for example mymodule
11187# $resource is for example libs/general/libmymod_1_2_3.zip
11188# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11189# $with_builddeps_dir is for example /localhome/builddeps
11190# depdir is the name of the variable into which we store the depdir, eg MYMOD
11191# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11192# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11193    filename=`basename $resource`
11194    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11195    filebase=${filename%%.*}
11196    extension=${filename#*.}
11197    installdir=$with_builddeps_dir/$filebase
11198    if test ! -f $installdir/$filename.unpacked; then
11199        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11200$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11201        if test ! -d $installdir; then
11202            mkdir -p $installdir
11203        fi
11204        if test ! -d $installdir; then
11205            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11206        fi
11207        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11208        touch $tmpfile
11209        if test ! -f $tmpfile; then
11210            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11211        fi
11212
11213    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11214    # $tmpfile is the local file name for the downloaded file.
11215    VALID_TOOL=no
11216    if test "x$BDEPS_FTP" = xwget; then
11217       VALID_TOOL=yes
11218       wget -O $tmpfile $with_builddeps_server/$resource
11219    fi
11220    if test "x$BDEPS_FTP" = xlftp; then
11221       VALID_TOOL=yes
11222       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11223    fi
11224    if test "x$BDEPS_FTP" = xftp; then
11225        VALID_TOOL=yes
11226        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11227        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11228        FTPUSERPWD=${FTPSERVER%%@*}
11229        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11230            FTPUSER=${userpwd%%:*}
11231            FTPPWD=${userpwd#*@}
11232            FTPSERVER=${FTPSERVER#*@}
11233        else
11234            FTPUSER=ftp
11235            FTPPWD=ftp
11236        fi
11237        # the "pass" command does not work on some
11238        # ftp clients (read ftp.exe) but if it works,
11239        # passive mode is better!
11240        (\
11241            echo "user $FTPUSER $FTPPWD"        ;\
11242            echo "pass"                         ;\
11243            echo "bin"                          ;\
11244            echo "get $FTPPATH $tmpfile"              ;\
11245        ) | ftp -in $FTPSERVER
11246    fi
11247    if test "x$VALID_TOOL" != xyes; then
11248       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11249    fi
11250
11251        mv $tmpfile $installdir/$filename
11252        if test ! -s $installdir/$filename; then
11253            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11254        fi
11255        case "$extension" in
11256            zip)  echo "Unzipping $installdir/$filename..."
11257               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11258            ;;
11259            tar.gz) echo "Untaring $installdir/$filename..."
11260               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11261            ;;
11262            tgz) echo "Untaring $installdir/$filename..."
11263               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11264            ;;
11265            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11266            ;;
11267        esac
11268    fi
11269    if test -f $installdir/$filename.unpacked; then
11270        depdir=$installdir
11271    fi
11272
11273	    fi
11274            # Source the builddeps file again, because in the previous command, the depdir
11275            # was updated to point at the current build dependency install directory.
11276            . $builddepsfile
11277            # Now extract variables from the builddeps.conf files.
11278            theroot=${builddep_bootjdk_ROOT}
11279            thecflags=${builddep_bootjdk_CFLAGS}
11280            thelibs=${builddep_bootjdk_LIBS}
11281            if test "x$depdir" = x; then
11282                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11283            fi
11284            BOOT_JDK=$depdir
11285            if test "x$theroot" != x; then
11286               BOOT_JDK="$theroot"
11287            fi
11288            if test "x$thecflags" != x; then
11289               BOOT_JDK_CFLAGS="$thecflags"
11290            fi
11291            if test "x$thelibs" != x; then
11292               BOOT_JDK_LIBS="$thelibs"
11293            fi
11294            BOOT_JDK_FOUND=maybe
11295            else BOOT_JDK_FOUND=no
11296
11297        fi
11298        else BOOT_JDK_FOUND=no
11299
11300    fi
11301
11302
11303
11304    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11305    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11306      # Do we have a bin/java?
11307      if test ! -x "$BOOT_JDK/bin/java"; then
11308        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11310        BOOT_JDK_FOUND=no
11311      else
11312        # Do we have a bin/javac?
11313        if test ! -x "$BOOT_JDK/bin/javac"; then
11314          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11316          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11317$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11318          BOOT_JDK_FOUND=no
11319        else
11320          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11321          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11322            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11324            BOOT_JDK_FOUND=no
11325          else
11326            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11327            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11328
11329            # Extra M4 quote needed to protect [] in grep expression.
11330            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11331            if test "x$FOUND_VERSION_78" = x; then
11332              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11334              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11335$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11336              BOOT_JDK_FOUND=no
11337            else
11338              # We're done! :-)
11339              BOOT_JDK_FOUND=yes
11340
11341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11342
11343  # Input might be given as Windows format, start by converting to
11344  # unix format.
11345  path="$BOOT_JDK"
11346  new_path=`$CYGPATH -u "$path"`
11347
11348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11351  # "foo.exe" is OK but "foo" is an error.
11352  #
11353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11354  # It is also a way to make sure we got the proper file name for the real test later on.
11355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11356  if test "x$test_shortpath" = x; then
11357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11358$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11359    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11360  fi
11361
11362  # Call helper function which possibly converts this using DOS-style short mode.
11363  # If so, the updated path is stored in $new_path.
11364
11365  input_path="$new_path"
11366  # Check if we need to convert this using DOS-style short mode. If the path
11367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11368  # take no chances and rewrite it.
11369  # Note: m4 eats our [], so we need to use [ and ] instead.
11370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11371  if test "x$has_forbidden_chars" != x; then
11372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11376      # Going to short mode and back again did indeed matter. Since short mode is
11377      # case insensitive, let's make it lowercase to improve readability.
11378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11379      # Now convert it back to Unix-stile (cygpath)
11380      input_path=`$CYGPATH -u "$shortmode_path"`
11381      new_path="$input_path"
11382    fi
11383  fi
11384
11385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11386  if test "x$test_cygdrive_prefix" = x; then
11387    # As a simple fix, exclude /usr/bin since it's not a real path.
11388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11390      # a path prefixed by /cygdrive for fixpath to work.
11391      new_path="$CYGWIN_ROOT_PATH$input_path"
11392    fi
11393  fi
11394
11395
11396  if test "x$path" != "x$new_path"; then
11397    BOOT_JDK="$new_path"
11398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11400  fi
11401
11402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11403
11404  path="$BOOT_JDK"
11405  has_colon=`$ECHO $path | $GREP ^.:`
11406  new_path="$path"
11407  if test "x$has_colon" = x; then
11408    # Not in mixed or Windows style, start by that.
11409    new_path=`cmd //c echo $path`
11410  fi
11411
11412
11413  input_path="$new_path"
11414  # Check if we need to convert this using DOS-style short mode. If the path
11415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11416  # take no chances and rewrite it.
11417  # Note: m4 eats our [], so we need to use [ and ] instead.
11418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11419  if test "x$has_forbidden_chars" != x; then
11420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11422  fi
11423
11424
11425  windows_path="$new_path"
11426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11427    unix_path=`$CYGPATH -u "$windows_path"`
11428    new_path="$unix_path"
11429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11431    new_path="$unix_path"
11432  fi
11433
11434  if test "x$path" != "x$new_path"; then
11435    BOOT_JDK="$new_path"
11436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11437$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11438  fi
11439
11440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11442
11443  else
11444    # We're on a posix platform. Hooray! :)
11445    path="$BOOT_JDK"
11446
11447    if test ! -f "$path" && test ! -d "$path"; then
11448      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11449    fi
11450
11451    has_space=`$ECHO "$path" | $GREP " "`
11452    if test "x$has_space" != x; then
11453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11454$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11455      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11456    fi
11457  fi
11458
11459              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11460$as_echo_n "checking for Boot JDK... " >&6; }
11461              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11462$as_echo "$BOOT_JDK" >&6; }
11463              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11464$as_echo_n "checking Boot JDK version... " >&6; }
11465              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11466              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11467$as_echo "$BOOT_JDK_VERSION" >&6; }
11468            fi # end check jdk version
11469          fi # end check rt.jar
11470        fi # end check javac
11471      fi # end check java
11472    fi # end check boot jdk found
11473  fi
11474
11475
11476# Test: Is $JAVA_HOME set?
11477
11478  if test "x$BOOT_JDK_FOUND" = xno; then
11479    # Now execute the test
11480
11481    if test "x$JAVA_HOME" != x; then
11482        JAVA_HOME_PROCESSED="$JAVA_HOME"
11483
11484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11485
11486  # Input might be given as Windows format, start by converting to
11487  # unix format.
11488  path="$JAVA_HOME_PROCESSED"
11489  new_path=`$CYGPATH -u "$path"`
11490
11491  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11492  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11493  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11494  # "foo.exe" is OK but "foo" is an error.
11495  #
11496  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11497  # It is also a way to make sure we got the proper file name for the real test later on.
11498  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11499  if test "x$test_shortpath" = x; then
11500    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11501$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11502    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11503  fi
11504
11505  # Call helper function which possibly converts this using DOS-style short mode.
11506  # If so, the updated path is stored in $new_path.
11507
11508  input_path="$new_path"
11509  # Check if we need to convert this using DOS-style short mode. If the path
11510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11511  # take no chances and rewrite it.
11512  # Note: m4 eats our [], so we need to use [ and ] instead.
11513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11514  if test "x$has_forbidden_chars" != x; then
11515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11519      # Going to short mode and back again did indeed matter. Since short mode is
11520      # case insensitive, let's make it lowercase to improve readability.
11521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11522      # Now convert it back to Unix-stile (cygpath)
11523      input_path=`$CYGPATH -u "$shortmode_path"`
11524      new_path="$input_path"
11525    fi
11526  fi
11527
11528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11529  if test "x$test_cygdrive_prefix" = x; then
11530    # As a simple fix, exclude /usr/bin since it's not a real path.
11531    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11533      # a path prefixed by /cygdrive for fixpath to work.
11534      new_path="$CYGWIN_ROOT_PATH$input_path"
11535    fi
11536  fi
11537
11538
11539  if test "x$path" != "x$new_path"; then
11540    JAVA_HOME_PROCESSED="$new_path"
11541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11542$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11543  fi
11544
11545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11546
11547  path="$JAVA_HOME_PROCESSED"
11548  has_colon=`$ECHO $path | $GREP ^.:`
11549  new_path="$path"
11550  if test "x$has_colon" = x; then
11551    # Not in mixed or Windows style, start by that.
11552    new_path=`cmd //c echo $path`
11553  fi
11554
11555
11556  input_path="$new_path"
11557  # Check if we need to convert this using DOS-style short mode. If the path
11558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11559  # take no chances and rewrite it.
11560  # Note: m4 eats our [], so we need to use [ and ] instead.
11561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11562  if test "x$has_forbidden_chars" != x; then
11563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11564    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11565  fi
11566
11567
11568  windows_path="$new_path"
11569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11570    unix_path=`$CYGPATH -u "$windows_path"`
11571    new_path="$unix_path"
11572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11574    new_path="$unix_path"
11575  fi
11576
11577  if test "x$path" != "x$new_path"; then
11578    JAVA_HOME_PROCESSED="$new_path"
11579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11580$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11581  fi
11582
11583  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11584  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11585
11586  else
11587    # We're on a posix platform. Hooray! :)
11588    path="$JAVA_HOME_PROCESSED"
11589
11590    if test ! -f "$path" && test ! -d "$path"; then
11591      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11592    fi
11593
11594    has_space=`$ECHO "$path" | $GREP " "`
11595    if test "x$has_space" != x; then
11596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11597$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11598      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11599    fi
11600  fi
11601
11602        if test ! -d "$JAVA_HOME_PROCESSED"; then
11603            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11604$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11605        else
11606          # Aha, the user has set a JAVA_HOME
11607          # let us use that as the Boot JDK.
11608          BOOT_JDK="$JAVA_HOME_PROCESSED"
11609          BOOT_JDK_FOUND=maybe
11610          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11611$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11612        fi
11613    fi
11614
11615
11616    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11617    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11618      # Do we have a bin/java?
11619      if test ! -x "$BOOT_JDK/bin/java"; then
11620        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11622        BOOT_JDK_FOUND=no
11623      else
11624        # Do we have a bin/javac?
11625        if test ! -x "$BOOT_JDK/bin/javac"; then
11626          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11628          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11629$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11630          BOOT_JDK_FOUND=no
11631        else
11632          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11633          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11634            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11635$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11636            BOOT_JDK_FOUND=no
11637          else
11638            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11639            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11640
11641            # Extra M4 quote needed to protect [] in grep expression.
11642            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11643            if test "x$FOUND_VERSION_78" = x; then
11644              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11646              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11647$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11648              BOOT_JDK_FOUND=no
11649            else
11650              # We're done! :-)
11651              BOOT_JDK_FOUND=yes
11652
11653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11654
11655  # Input might be given as Windows format, start by converting to
11656  # unix format.
11657  path="$BOOT_JDK"
11658  new_path=`$CYGPATH -u "$path"`
11659
11660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11663  # "foo.exe" is OK but "foo" is an error.
11664  #
11665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11666  # It is also a way to make sure we got the proper file name for the real test later on.
11667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11668  if test "x$test_shortpath" = x; then
11669    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11670$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11671    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11672  fi
11673
11674  # Call helper function which possibly converts this using DOS-style short mode.
11675  # If so, the updated path is stored in $new_path.
11676
11677  input_path="$new_path"
11678  # Check if we need to convert this using DOS-style short mode. If the path
11679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11680  # take no chances and rewrite it.
11681  # Note: m4 eats our [], so we need to use [ and ] instead.
11682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11683  if test "x$has_forbidden_chars" != x; then
11684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11688      # Going to short mode and back again did indeed matter. Since short mode is
11689      # case insensitive, let's make it lowercase to improve readability.
11690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11691      # Now convert it back to Unix-stile (cygpath)
11692      input_path=`$CYGPATH -u "$shortmode_path"`
11693      new_path="$input_path"
11694    fi
11695  fi
11696
11697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11698  if test "x$test_cygdrive_prefix" = x; then
11699    # As a simple fix, exclude /usr/bin since it's not a real path.
11700    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11702      # a path prefixed by /cygdrive for fixpath to work.
11703      new_path="$CYGWIN_ROOT_PATH$input_path"
11704    fi
11705  fi
11706
11707
11708  if test "x$path" != "x$new_path"; then
11709    BOOT_JDK="$new_path"
11710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11711$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11712  fi
11713
11714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11715
11716  path="$BOOT_JDK"
11717  has_colon=`$ECHO $path | $GREP ^.:`
11718  new_path="$path"
11719  if test "x$has_colon" = x; then
11720    # Not in mixed or Windows style, start by that.
11721    new_path=`cmd //c echo $path`
11722  fi
11723
11724
11725  input_path="$new_path"
11726  # Check if we need to convert this using DOS-style short mode. If the path
11727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11728  # take no chances and rewrite it.
11729  # Note: m4 eats our [], so we need to use [ and ] instead.
11730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11731  if test "x$has_forbidden_chars" != x; then
11732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11734  fi
11735
11736
11737  windows_path="$new_path"
11738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11739    unix_path=`$CYGPATH -u "$windows_path"`
11740    new_path="$unix_path"
11741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11743    new_path="$unix_path"
11744  fi
11745
11746  if test "x$path" != "x$new_path"; then
11747    BOOT_JDK="$new_path"
11748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11749$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11750  fi
11751
11752  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11753  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11754
11755  else
11756    # We're on a posix platform. Hooray! :)
11757    path="$BOOT_JDK"
11758
11759    if test ! -f "$path" && test ! -d "$path"; then
11760      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11761    fi
11762
11763    has_space=`$ECHO "$path" | $GREP " "`
11764    if test "x$has_space" != x; then
11765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11766$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11767      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11768    fi
11769  fi
11770
11771              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11772$as_echo_n "checking for Boot JDK... " >&6; }
11773              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11774$as_echo "$BOOT_JDK" >&6; }
11775              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11776$as_echo_n "checking Boot JDK version... " >&6; }
11777              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11778              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11779$as_echo "$BOOT_JDK_VERSION" >&6; }
11780            fi # end check jdk version
11781          fi # end check rt.jar
11782        fi # end check javac
11783      fi # end check java
11784    fi # end check boot jdk found
11785  fi
11786
11787
11788# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11789
11790  if test "x$BOOT_JDK_FOUND" = xno; then
11791    # Now execute the test
11792
11793    if test -x /usr/libexec/java_home; then
11794        BOOT_JDK=`/usr/libexec/java_home`
11795        BOOT_JDK_FOUND=maybe
11796        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11797$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11798    fi
11799
11800
11801    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11802    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11803      # Do we have a bin/java?
11804      if test ! -x "$BOOT_JDK/bin/java"; then
11805        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11807        BOOT_JDK_FOUND=no
11808      else
11809        # Do we have a bin/javac?
11810        if test ! -x "$BOOT_JDK/bin/javac"; then
11811          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11813          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11814$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11815          BOOT_JDK_FOUND=no
11816        else
11817          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11818          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11819            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11821            BOOT_JDK_FOUND=no
11822          else
11823            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11824            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11825
11826            # Extra M4 quote needed to protect [] in grep expression.
11827            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11828            if test "x$FOUND_VERSION_78" = x; then
11829              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11831              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11832$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11833              BOOT_JDK_FOUND=no
11834            else
11835              # We're done! :-)
11836              BOOT_JDK_FOUND=yes
11837
11838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11839
11840  # Input might be given as Windows format, start by converting to
11841  # unix format.
11842  path="$BOOT_JDK"
11843  new_path=`$CYGPATH -u "$path"`
11844
11845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11848  # "foo.exe" is OK but "foo" is an error.
11849  #
11850  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11851  # It is also a way to make sure we got the proper file name for the real test later on.
11852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11853  if test "x$test_shortpath" = x; then
11854    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11855$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11856    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11857  fi
11858
11859  # Call helper function which possibly converts this using DOS-style short mode.
11860  # If so, the updated path is stored in $new_path.
11861
11862  input_path="$new_path"
11863  # Check if we need to convert this using DOS-style short mode. If the path
11864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11865  # take no chances and rewrite it.
11866  # Note: m4 eats our [], so we need to use [ and ] instead.
11867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11868  if test "x$has_forbidden_chars" != x; then
11869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11870    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11871    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11872    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11873      # Going to short mode and back again did indeed matter. Since short mode is
11874      # case insensitive, let's make it lowercase to improve readability.
11875      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11876      # Now convert it back to Unix-stile (cygpath)
11877      input_path=`$CYGPATH -u "$shortmode_path"`
11878      new_path="$input_path"
11879    fi
11880  fi
11881
11882  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11883  if test "x$test_cygdrive_prefix" = x; then
11884    # As a simple fix, exclude /usr/bin since it's not a real path.
11885    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11886      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11887      # a path prefixed by /cygdrive for fixpath to work.
11888      new_path="$CYGWIN_ROOT_PATH$input_path"
11889    fi
11890  fi
11891
11892
11893  if test "x$path" != "x$new_path"; then
11894    BOOT_JDK="$new_path"
11895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11896$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11897  fi
11898
11899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11900
11901  path="$BOOT_JDK"
11902  has_colon=`$ECHO $path | $GREP ^.:`
11903  new_path="$path"
11904  if test "x$has_colon" = x; then
11905    # Not in mixed or Windows style, start by that.
11906    new_path=`cmd //c echo $path`
11907  fi
11908
11909
11910  input_path="$new_path"
11911  # Check if we need to convert this using DOS-style short mode. If the path
11912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11913  # take no chances and rewrite it.
11914  # Note: m4 eats our [], so we need to use [ and ] instead.
11915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11916  if test "x$has_forbidden_chars" != x; then
11917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11918    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11919  fi
11920
11921
11922  windows_path="$new_path"
11923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11924    unix_path=`$CYGPATH -u "$windows_path"`
11925    new_path="$unix_path"
11926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11928    new_path="$unix_path"
11929  fi
11930
11931  if test "x$path" != "x$new_path"; then
11932    BOOT_JDK="$new_path"
11933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11934$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11935  fi
11936
11937  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11938  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11939
11940  else
11941    # We're on a posix platform. Hooray! :)
11942    path="$BOOT_JDK"
11943
11944    if test ! -f "$path" && test ! -d "$path"; then
11945      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11946    fi
11947
11948    has_space=`$ECHO "$path" | $GREP " "`
11949    if test "x$has_space" != x; then
11950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11951$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11952      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11953    fi
11954  fi
11955
11956              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11957$as_echo_n "checking for Boot JDK... " >&6; }
11958              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11959$as_echo "$BOOT_JDK" >&6; }
11960              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11961$as_echo_n "checking Boot JDK version... " >&6; }
11962              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11963              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11964$as_echo "$BOOT_JDK_VERSION" >&6; }
11965            fi # end check jdk version
11966          fi # end check rt.jar
11967        fi # end check javac
11968      fi # end check java
11969    fi # end check boot jdk found
11970  fi
11971
11972
11973# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11974
11975  if test "x$BOOT_JDK_FOUND" = xno; then
11976    # Now execute the test
11977
11978    # Extract the first word of "javac", so it can be a program name with args.
11979set dummy javac; ac_word=$2
11980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11981$as_echo_n "checking for $ac_word... " >&6; }
11982if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11983  $as_echo_n "(cached) " >&6
11984else
11985  case $JAVAC_CHECK in
11986  [\\/]* | ?:[\\/]*)
11987  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11988  ;;
11989  *)
11990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11991for as_dir in $PATH
11992do
11993  IFS=$as_save_IFS
11994  test -z "$as_dir" && as_dir=.
11995    for ac_exec_ext in '' $ac_executable_extensions; do
11996  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11997    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11999    break 2
12000  fi
12001done
12002  done
12003IFS=$as_save_IFS
12004
12005  ;;
12006esac
12007fi
12008JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12009if test -n "$JAVAC_CHECK"; then
12010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12011$as_echo "$JAVAC_CHECK" >&6; }
12012else
12013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12014$as_echo "no" >&6; }
12015fi
12016
12017
12018    # Extract the first word of "java", so it can be a program name with args.
12019set dummy java; ac_word=$2
12020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12021$as_echo_n "checking for $ac_word... " >&6; }
12022if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12023  $as_echo_n "(cached) " >&6
12024else
12025  case $JAVA_CHECK in
12026  [\\/]* | ?:[\\/]*)
12027  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12028  ;;
12029  *)
12030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12031for as_dir in $PATH
12032do
12033  IFS=$as_save_IFS
12034  test -z "$as_dir" && as_dir=.
12035    for ac_exec_ext in '' $ac_executable_extensions; do
12036  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12037    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12039    break 2
12040  fi
12041done
12042  done
12043IFS=$as_save_IFS
12044
12045  ;;
12046esac
12047fi
12048JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12049if test -n "$JAVA_CHECK"; then
12050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12051$as_echo "$JAVA_CHECK" >&6; }
12052else
12053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12054$as_echo "no" >&6; }
12055fi
12056
12057
12058    BINARY="$JAVAC_CHECK"
12059    if test "x$JAVAC_CHECK" = x; then
12060        BINARY="$JAVA_CHECK"
12061    fi
12062    if test "x$BINARY" != x; then
12063        # So there is a java(c) binary, it might be part of a JDK.
12064        # Lets find the JDK/JRE directory by following symbolic links.
12065        # Linux/GNU systems often have links from /usr/bin/java to
12066        # /etc/alternatives/java to the real JDK binary.
12067
12068    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12069        # Follow a chain of symbolic links. Use readlink
12070        # where it exists, else fall back to horribly
12071        # complicated shell code.
12072        if test "x$READLINK_TESTED" != yes; then
12073            # On MacOSX there is a readlink tool with a different
12074            # purpose than the GNU readlink tool. Check the found readlink.
12075            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12076            if test "x$ISGNU" = x; then
12077                 # A readlink that we do not know how to use.
12078                 # Are there other non-GNU readlinks out there?
12079                 READLINK_TESTED=yes
12080                 READLINK=
12081            fi
12082        fi
12083
12084        if test "x$READLINK" != x; then
12085            BINARY=`$READLINK -f $BINARY`
12086        else
12087            # Save the current directory for restoring afterwards
12088            STARTDIR=$PWD
12089            COUNTER=0
12090            sym_link_dir=`$DIRNAME $BINARY`
12091            sym_link_file=`$BASENAME $BINARY`
12092            # Use the system pwd and not the shell builtin to resolve directory symlinks
12093            cd $sym_link_dir
12094            cd `$THEPWDCMD`
12095            sym_link_dir=`$THEPWDCMD`
12096            # Resolve file symlinks
12097            while test $COUNTER -lt 20; do
12098                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12099                if test "x$ISLINK" == x; then
12100                    # This is not a symbolic link! We are done!
12101                    break
12102                fi
12103                # Again resolve directory symlinks since the target of the just found
12104                # link could be in a different directory
12105                cd `$DIRNAME $ISLINK`
12106                sym_link_dir=`$THEPWDCMD`
12107                sym_link_file=`$BASENAME $ISLINK`
12108                let COUNTER=COUNTER+1
12109            done
12110            cd $STARTDIR
12111            BINARY=$sym_link_dir/$sym_link_file
12112        fi
12113    fi
12114
12115        BOOT_JDK=`dirname "$BINARY"`
12116        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12117        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12118            # Looks like we found ourselves an JDK
12119            BOOT_JDK_FOUND=maybe
12120            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12121$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12122        fi
12123    fi
12124
12125
12126    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12127    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12128      # Do we have a bin/java?
12129      if test ! -x "$BOOT_JDK/bin/java"; then
12130        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12132        BOOT_JDK_FOUND=no
12133      else
12134        # Do we have a bin/javac?
12135        if test ! -x "$BOOT_JDK/bin/javac"; then
12136          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12137$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12138          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12139$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12140          BOOT_JDK_FOUND=no
12141        else
12142          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12143          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12144            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12146            BOOT_JDK_FOUND=no
12147          else
12148            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12149            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12150
12151            # Extra M4 quote needed to protect [] in grep expression.
12152            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12153            if test "x$FOUND_VERSION_78" = x; then
12154              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12156              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12157$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12158              BOOT_JDK_FOUND=no
12159            else
12160              # We're done! :-)
12161              BOOT_JDK_FOUND=yes
12162
12163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12164
12165  # Input might be given as Windows format, start by converting to
12166  # unix format.
12167  path="$BOOT_JDK"
12168  new_path=`$CYGPATH -u "$path"`
12169
12170  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12171  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12172  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12173  # "foo.exe" is OK but "foo" is an error.
12174  #
12175  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12176  # It is also a way to make sure we got the proper file name for the real test later on.
12177  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12178  if test "x$test_shortpath" = x; then
12179    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12180$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12181    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12182  fi
12183
12184  # Call helper function which possibly converts this using DOS-style short mode.
12185  # If so, the updated path is stored in $new_path.
12186
12187  input_path="$new_path"
12188  # Check if we need to convert this using DOS-style short mode. If the path
12189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12190  # take no chances and rewrite it.
12191  # Note: m4 eats our [], so we need to use [ and ] instead.
12192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12193  if test "x$has_forbidden_chars" != x; then
12194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12198      # Going to short mode and back again did indeed matter. Since short mode is
12199      # case insensitive, let's make it lowercase to improve readability.
12200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12201      # Now convert it back to Unix-stile (cygpath)
12202      input_path=`$CYGPATH -u "$shortmode_path"`
12203      new_path="$input_path"
12204    fi
12205  fi
12206
12207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12208  if test "x$test_cygdrive_prefix" = x; then
12209    # As a simple fix, exclude /usr/bin since it's not a real path.
12210    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12212      # a path prefixed by /cygdrive for fixpath to work.
12213      new_path="$CYGWIN_ROOT_PATH$input_path"
12214    fi
12215  fi
12216
12217
12218  if test "x$path" != "x$new_path"; then
12219    BOOT_JDK="$new_path"
12220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12221$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12222  fi
12223
12224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12225
12226  path="$BOOT_JDK"
12227  has_colon=`$ECHO $path | $GREP ^.:`
12228  new_path="$path"
12229  if test "x$has_colon" = x; then
12230    # Not in mixed or Windows style, start by that.
12231    new_path=`cmd //c echo $path`
12232  fi
12233
12234
12235  input_path="$new_path"
12236  # Check if we need to convert this using DOS-style short mode. If the path
12237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12238  # take no chances and rewrite it.
12239  # Note: m4 eats our [], so we need to use [ and ] instead.
12240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12241  if test "x$has_forbidden_chars" != x; then
12242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12244  fi
12245
12246
12247  windows_path="$new_path"
12248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12249    unix_path=`$CYGPATH -u "$windows_path"`
12250    new_path="$unix_path"
12251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12253    new_path="$unix_path"
12254  fi
12255
12256  if test "x$path" != "x$new_path"; then
12257    BOOT_JDK="$new_path"
12258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12259$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12260  fi
12261
12262  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12263  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12264
12265  else
12266    # We're on a posix platform. Hooray! :)
12267    path="$BOOT_JDK"
12268
12269    if test ! -f "$path" && test ! -d "$path"; then
12270      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12271    fi
12272
12273    has_space=`$ECHO "$path" | $GREP " "`
12274    if test "x$has_space" != x; then
12275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12276$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12277      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12278    fi
12279  fi
12280
12281              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12282$as_echo_n "checking for Boot JDK... " >&6; }
12283              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12284$as_echo "$BOOT_JDK" >&6; }
12285              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12286$as_echo_n "checking Boot JDK version... " >&6; }
12287              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12288              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12289$as_echo "$BOOT_JDK_VERSION" >&6; }
12290            fi # end check jdk version
12291          fi # end check rt.jar
12292        fi # end check javac
12293      fi # end check java
12294    fi # end check boot jdk found
12295  fi
12296
12297
12298# Test: Is there a JDK installed in default, well-known locations?
12299
12300  if test "x$BOOT_JDK_FOUND" = xno; then
12301    # Now execute the test
12302
12303  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12304
12305  if test "x$BOOT_JDK_FOUND" = xno; then
12306    # Now execute the test
12307
12308  if test "x$ProgramW6432" != x; then
12309    VIRTUAL_DIR="$ProgramW6432/Java"
12310
12311  windows_path="$VIRTUAL_DIR"
12312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12313    unix_path=`$CYGPATH -u "$windows_path"`
12314    VIRTUAL_DIR="$unix_path"
12315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12317    VIRTUAL_DIR="$unix_path"
12318  fi
12319
12320
12321  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12322  BOOT_JDK_SUFFIX=""
12323  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12324  if test "x$ALL_JDKS_FOUND" != x; then
12325    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12326
12327  if test "x$BOOT_JDK_FOUND" = xno; then
12328    # Now execute the test
12329
12330        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12331        if test -d "$BOOT_JDK"; then
12332          BOOT_JDK_FOUND=maybe
12333          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12334$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12335        fi
12336
12337
12338    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12339    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12340      # Do we have a bin/java?
12341      if test ! -x "$BOOT_JDK/bin/java"; then
12342        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12344        BOOT_JDK_FOUND=no
12345      else
12346        # Do we have a bin/javac?
12347        if test ! -x "$BOOT_JDK/bin/javac"; then
12348          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12350          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12351$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12352          BOOT_JDK_FOUND=no
12353        else
12354          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12355          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12356            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12358            BOOT_JDK_FOUND=no
12359          else
12360            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12361            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12362
12363            # Extra M4 quote needed to protect [] in grep expression.
12364            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12365            if test "x$FOUND_VERSION_78" = x; then
12366              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12367$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12368              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12369$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12370              BOOT_JDK_FOUND=no
12371            else
12372              # We're done! :-)
12373              BOOT_JDK_FOUND=yes
12374
12375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12376
12377  # Input might be given as Windows format, start by converting to
12378  # unix format.
12379  path="$BOOT_JDK"
12380  new_path=`$CYGPATH -u "$path"`
12381
12382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12385  # "foo.exe" is OK but "foo" is an error.
12386  #
12387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12388  # It is also a way to make sure we got the proper file name for the real test later on.
12389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12390  if test "x$test_shortpath" = x; then
12391    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12392$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12393    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12394  fi
12395
12396  # Call helper function which possibly converts this using DOS-style short mode.
12397  # If so, the updated path is stored in $new_path.
12398
12399  input_path="$new_path"
12400  # Check if we need to convert this using DOS-style short mode. If the path
12401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12402  # take no chances and rewrite it.
12403  # Note: m4 eats our [], so we need to use [ and ] instead.
12404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12405  if test "x$has_forbidden_chars" != x; then
12406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12410      # Going to short mode and back again did indeed matter. Since short mode is
12411      # case insensitive, let's make it lowercase to improve readability.
12412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12413      # Now convert it back to Unix-stile (cygpath)
12414      input_path=`$CYGPATH -u "$shortmode_path"`
12415      new_path="$input_path"
12416    fi
12417  fi
12418
12419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12420  if test "x$test_cygdrive_prefix" = x; then
12421    # As a simple fix, exclude /usr/bin since it's not a real path.
12422    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12424      # a path prefixed by /cygdrive for fixpath to work.
12425      new_path="$CYGWIN_ROOT_PATH$input_path"
12426    fi
12427  fi
12428
12429
12430  if test "x$path" != "x$new_path"; then
12431    BOOT_JDK="$new_path"
12432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12433$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12434  fi
12435
12436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12437
12438  path="$BOOT_JDK"
12439  has_colon=`$ECHO $path | $GREP ^.:`
12440  new_path="$path"
12441  if test "x$has_colon" = x; then
12442    # Not in mixed or Windows style, start by that.
12443    new_path=`cmd //c echo $path`
12444  fi
12445
12446
12447  input_path="$new_path"
12448  # Check if we need to convert this using DOS-style short mode. If the path
12449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12450  # take no chances and rewrite it.
12451  # Note: m4 eats our [], so we need to use [ and ] instead.
12452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12453  if test "x$has_forbidden_chars" != x; then
12454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12456  fi
12457
12458
12459  windows_path="$new_path"
12460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12461    unix_path=`$CYGPATH -u "$windows_path"`
12462    new_path="$unix_path"
12463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12465    new_path="$unix_path"
12466  fi
12467
12468  if test "x$path" != "x$new_path"; then
12469    BOOT_JDK="$new_path"
12470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12471$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12472  fi
12473
12474  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12475  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12476
12477  else
12478    # We're on a posix platform. Hooray! :)
12479    path="$BOOT_JDK"
12480
12481    if test ! -f "$path" && test ! -d "$path"; then
12482      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12483    fi
12484
12485    has_space=`$ECHO "$path" | $GREP " "`
12486    if test "x$has_space" != x; then
12487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12488$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12489      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12490    fi
12491  fi
12492
12493              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12494$as_echo_n "checking for Boot JDK... " >&6; }
12495              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12496$as_echo "$BOOT_JDK" >&6; }
12497              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12498$as_echo_n "checking Boot JDK version... " >&6; }
12499              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12500              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12501$as_echo "$BOOT_JDK_VERSION" >&6; }
12502            fi # end check jdk version
12503          fi # end check rt.jar
12504        fi # end check javac
12505      fi # end check java
12506    fi # end check boot jdk found
12507  fi
12508
12509    done
12510  fi
12511
12512  fi
12513
12514
12515    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12516    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12517      # Do we have a bin/java?
12518      if test ! -x "$BOOT_JDK/bin/java"; then
12519        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12521        BOOT_JDK_FOUND=no
12522      else
12523        # Do we have a bin/javac?
12524        if test ! -x "$BOOT_JDK/bin/javac"; then
12525          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12527          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12528$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12529          BOOT_JDK_FOUND=no
12530        else
12531          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12532          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12533            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12535            BOOT_JDK_FOUND=no
12536          else
12537            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12538            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12539
12540            # Extra M4 quote needed to protect [] in grep expression.
12541            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12542            if test "x$FOUND_VERSION_78" = x; then
12543              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12544$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12545              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12546$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12547              BOOT_JDK_FOUND=no
12548            else
12549              # We're done! :-)
12550              BOOT_JDK_FOUND=yes
12551
12552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12553
12554  # Input might be given as Windows format, start by converting to
12555  # unix format.
12556  path="$BOOT_JDK"
12557  new_path=`$CYGPATH -u "$path"`
12558
12559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12562  # "foo.exe" is OK but "foo" is an error.
12563  #
12564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12565  # It is also a way to make sure we got the proper file name for the real test later on.
12566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12567  if test "x$test_shortpath" = x; then
12568    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12569$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12570    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12571  fi
12572
12573  # Call helper function which possibly converts this using DOS-style short mode.
12574  # If so, the updated path is stored in $new_path.
12575
12576  input_path="$new_path"
12577  # Check if we need to convert this using DOS-style short mode. If the path
12578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12579  # take no chances and rewrite it.
12580  # Note: m4 eats our [], so we need to use [ and ] instead.
12581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12582  if test "x$has_forbidden_chars" != x; then
12583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12587      # Going to short mode and back again did indeed matter. Since short mode is
12588      # case insensitive, let's make it lowercase to improve readability.
12589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12590      # Now convert it back to Unix-stile (cygpath)
12591      input_path=`$CYGPATH -u "$shortmode_path"`
12592      new_path="$input_path"
12593    fi
12594  fi
12595
12596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12597  if test "x$test_cygdrive_prefix" = x; then
12598    # As a simple fix, exclude /usr/bin since it's not a real path.
12599    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12601      # a path prefixed by /cygdrive for fixpath to work.
12602      new_path="$CYGWIN_ROOT_PATH$input_path"
12603    fi
12604  fi
12605
12606
12607  if test "x$path" != "x$new_path"; then
12608    BOOT_JDK="$new_path"
12609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12610$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12611  fi
12612
12613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12614
12615  path="$BOOT_JDK"
12616  has_colon=`$ECHO $path | $GREP ^.:`
12617  new_path="$path"
12618  if test "x$has_colon" = x; then
12619    # Not in mixed or Windows style, start by that.
12620    new_path=`cmd //c echo $path`
12621  fi
12622
12623
12624  input_path="$new_path"
12625  # Check if we need to convert this using DOS-style short mode. If the path
12626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12627  # take no chances and rewrite it.
12628  # Note: m4 eats our [], so we need to use [ and ] instead.
12629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12630  if test "x$has_forbidden_chars" != x; then
12631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12633  fi
12634
12635
12636  windows_path="$new_path"
12637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12638    unix_path=`$CYGPATH -u "$windows_path"`
12639    new_path="$unix_path"
12640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12642    new_path="$unix_path"
12643  fi
12644
12645  if test "x$path" != "x$new_path"; then
12646    BOOT_JDK="$new_path"
12647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12648$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12649  fi
12650
12651  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12652  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12653
12654  else
12655    # We're on a posix platform. Hooray! :)
12656    path="$BOOT_JDK"
12657
12658    if test ! -f "$path" && test ! -d "$path"; then
12659      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12660    fi
12661
12662    has_space=`$ECHO "$path" | $GREP " "`
12663    if test "x$has_space" != x; then
12664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12665$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12666      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12667    fi
12668  fi
12669
12670              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12671$as_echo_n "checking for Boot JDK... " >&6; }
12672              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12673$as_echo "$BOOT_JDK" >&6; }
12674              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12675$as_echo_n "checking Boot JDK version... " >&6; }
12676              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12677              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12678$as_echo "$BOOT_JDK_VERSION" >&6; }
12679            fi # end check jdk version
12680          fi # end check rt.jar
12681        fi # end check javac
12682      fi # end check java
12683    fi # end check boot jdk found
12684  fi
12685
12686
12687  if test "x$BOOT_JDK_FOUND" = xno; then
12688    # Now execute the test
12689
12690  if test "x$PROGRAMW6432" != x; then
12691    VIRTUAL_DIR="$PROGRAMW6432/Java"
12692
12693  windows_path="$VIRTUAL_DIR"
12694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12695    unix_path=`$CYGPATH -u "$windows_path"`
12696    VIRTUAL_DIR="$unix_path"
12697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12699    VIRTUAL_DIR="$unix_path"
12700  fi
12701
12702
12703  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12704  BOOT_JDK_SUFFIX=""
12705  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12706  if test "x$ALL_JDKS_FOUND" != x; then
12707    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12708
12709  if test "x$BOOT_JDK_FOUND" = xno; then
12710    # Now execute the test
12711
12712        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12713        if test -d "$BOOT_JDK"; then
12714          BOOT_JDK_FOUND=maybe
12715          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12716$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12717        fi
12718
12719
12720    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12721    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12722      # Do we have a bin/java?
12723      if test ! -x "$BOOT_JDK/bin/java"; then
12724        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12726        BOOT_JDK_FOUND=no
12727      else
12728        # Do we have a bin/javac?
12729        if test ! -x "$BOOT_JDK/bin/javac"; then
12730          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12731$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12732          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12733$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12734          BOOT_JDK_FOUND=no
12735        else
12736          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12737          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12738            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12739$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12740            BOOT_JDK_FOUND=no
12741          else
12742            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12743            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12744
12745            # Extra M4 quote needed to protect [] in grep expression.
12746            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12747            if test "x$FOUND_VERSION_78" = x; then
12748              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12749$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12750              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12751$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12752              BOOT_JDK_FOUND=no
12753            else
12754              # We're done! :-)
12755              BOOT_JDK_FOUND=yes
12756
12757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12758
12759  # Input might be given as Windows format, start by converting to
12760  # unix format.
12761  path="$BOOT_JDK"
12762  new_path=`$CYGPATH -u "$path"`
12763
12764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12767  # "foo.exe" is OK but "foo" is an error.
12768  #
12769  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12770  # It is also a way to make sure we got the proper file name for the real test later on.
12771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12772  if test "x$test_shortpath" = x; then
12773    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12774$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12775    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12776  fi
12777
12778  # Call helper function which possibly converts this using DOS-style short mode.
12779  # If so, the updated path is stored in $new_path.
12780
12781  input_path="$new_path"
12782  # Check if we need to convert this using DOS-style short mode. If the path
12783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12784  # take no chances and rewrite it.
12785  # Note: m4 eats our [], so we need to use [ and ] instead.
12786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12787  if test "x$has_forbidden_chars" != x; then
12788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12792      # Going to short mode and back again did indeed matter. Since short mode is
12793      # case insensitive, let's make it lowercase to improve readability.
12794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12795      # Now convert it back to Unix-stile (cygpath)
12796      input_path=`$CYGPATH -u "$shortmode_path"`
12797      new_path="$input_path"
12798    fi
12799  fi
12800
12801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12802  if test "x$test_cygdrive_prefix" = x; then
12803    # As a simple fix, exclude /usr/bin since it's not a real path.
12804    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12806      # a path prefixed by /cygdrive for fixpath to work.
12807      new_path="$CYGWIN_ROOT_PATH$input_path"
12808    fi
12809  fi
12810
12811
12812  if test "x$path" != "x$new_path"; then
12813    BOOT_JDK="$new_path"
12814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12815$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12816  fi
12817
12818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12819
12820  path="$BOOT_JDK"
12821  has_colon=`$ECHO $path | $GREP ^.:`
12822  new_path="$path"
12823  if test "x$has_colon" = x; then
12824    # Not in mixed or Windows style, start by that.
12825    new_path=`cmd //c echo $path`
12826  fi
12827
12828
12829  input_path="$new_path"
12830  # Check if we need to convert this using DOS-style short mode. If the path
12831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12832  # take no chances and rewrite it.
12833  # Note: m4 eats our [], so we need to use [ and ] instead.
12834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12835  if test "x$has_forbidden_chars" != x; then
12836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12838  fi
12839
12840
12841  windows_path="$new_path"
12842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12843    unix_path=`$CYGPATH -u "$windows_path"`
12844    new_path="$unix_path"
12845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12847    new_path="$unix_path"
12848  fi
12849
12850  if test "x$path" != "x$new_path"; then
12851    BOOT_JDK="$new_path"
12852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12853$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12854  fi
12855
12856  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12857  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12858
12859  else
12860    # We're on a posix platform. Hooray! :)
12861    path="$BOOT_JDK"
12862
12863    if test ! -f "$path" && test ! -d "$path"; then
12864      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12865    fi
12866
12867    has_space=`$ECHO "$path" | $GREP " "`
12868    if test "x$has_space" != x; then
12869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12870$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12871      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12872    fi
12873  fi
12874
12875              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12876$as_echo_n "checking for Boot JDK... " >&6; }
12877              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12878$as_echo "$BOOT_JDK" >&6; }
12879              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12880$as_echo_n "checking Boot JDK version... " >&6; }
12881              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12882              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12883$as_echo "$BOOT_JDK_VERSION" >&6; }
12884            fi # end check jdk version
12885          fi # end check rt.jar
12886        fi # end check javac
12887      fi # end check java
12888    fi # end check boot jdk found
12889  fi
12890
12891    done
12892  fi
12893
12894  fi
12895
12896
12897    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12898    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12899      # Do we have a bin/java?
12900      if test ! -x "$BOOT_JDK/bin/java"; then
12901        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12903        BOOT_JDK_FOUND=no
12904      else
12905        # Do we have a bin/javac?
12906        if test ! -x "$BOOT_JDK/bin/javac"; then
12907          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12908$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12909          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12910$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12911          BOOT_JDK_FOUND=no
12912        else
12913          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12914          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12915            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12917            BOOT_JDK_FOUND=no
12918          else
12919            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12920            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12921
12922            # Extra M4 quote needed to protect [] in grep expression.
12923            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12924            if test "x$FOUND_VERSION_78" = x; then
12925              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12926$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12927              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12928$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12929              BOOT_JDK_FOUND=no
12930            else
12931              # We're done! :-)
12932              BOOT_JDK_FOUND=yes
12933
12934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12935
12936  # Input might be given as Windows format, start by converting to
12937  # unix format.
12938  path="$BOOT_JDK"
12939  new_path=`$CYGPATH -u "$path"`
12940
12941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12944  # "foo.exe" is OK but "foo" is an error.
12945  #
12946  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12947  # It is also a way to make sure we got the proper file name for the real test later on.
12948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12949  if test "x$test_shortpath" = x; then
12950    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12951$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12952    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12953  fi
12954
12955  # Call helper function which possibly converts this using DOS-style short mode.
12956  # If so, the updated path is stored in $new_path.
12957
12958  input_path="$new_path"
12959  # Check if we need to convert this using DOS-style short mode. If the path
12960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12961  # take no chances and rewrite it.
12962  # Note: m4 eats our [], so we need to use [ and ] instead.
12963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12964  if test "x$has_forbidden_chars" != x; then
12965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12966    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12967    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12968    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12969      # Going to short mode and back again did indeed matter. Since short mode is
12970      # case insensitive, let's make it lowercase to improve readability.
12971      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12972      # Now convert it back to Unix-stile (cygpath)
12973      input_path=`$CYGPATH -u "$shortmode_path"`
12974      new_path="$input_path"
12975    fi
12976  fi
12977
12978  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12979  if test "x$test_cygdrive_prefix" = x; then
12980    # As a simple fix, exclude /usr/bin since it's not a real path.
12981    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12982      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12983      # a path prefixed by /cygdrive for fixpath to work.
12984      new_path="$CYGWIN_ROOT_PATH$input_path"
12985    fi
12986  fi
12987
12988
12989  if test "x$path" != "x$new_path"; then
12990    BOOT_JDK="$new_path"
12991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12992$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12993  fi
12994
12995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12996
12997  path="$BOOT_JDK"
12998  has_colon=`$ECHO $path | $GREP ^.:`
12999  new_path="$path"
13000  if test "x$has_colon" = x; then
13001    # Not in mixed or Windows style, start by that.
13002    new_path=`cmd //c echo $path`
13003  fi
13004
13005
13006  input_path="$new_path"
13007  # Check if we need to convert this using DOS-style short mode. If the path
13008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13009  # take no chances and rewrite it.
13010  # Note: m4 eats our [], so we need to use [ and ] instead.
13011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13012  if test "x$has_forbidden_chars" != x; then
13013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13015  fi
13016
13017
13018  windows_path="$new_path"
13019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13020    unix_path=`$CYGPATH -u "$windows_path"`
13021    new_path="$unix_path"
13022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13024    new_path="$unix_path"
13025  fi
13026
13027  if test "x$path" != "x$new_path"; then
13028    BOOT_JDK="$new_path"
13029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13030$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13031  fi
13032
13033  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13034  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13035
13036  else
13037    # We're on a posix platform. Hooray! :)
13038    path="$BOOT_JDK"
13039
13040    if test ! -f "$path" && test ! -d "$path"; then
13041      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13042    fi
13043
13044    has_space=`$ECHO "$path" | $GREP " "`
13045    if test "x$has_space" != x; then
13046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13047$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13048      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13049    fi
13050  fi
13051
13052              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13053$as_echo_n "checking for Boot JDK... " >&6; }
13054              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13055$as_echo "$BOOT_JDK" >&6; }
13056              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13057$as_echo_n "checking Boot JDK version... " >&6; }
13058              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13059              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13060$as_echo "$BOOT_JDK_VERSION" >&6; }
13061            fi # end check jdk version
13062          fi # end check rt.jar
13063        fi # end check javac
13064      fi # end check java
13065    fi # end check boot jdk found
13066  fi
13067
13068
13069  if test "x$BOOT_JDK_FOUND" = xno; then
13070    # Now execute the test
13071
13072  if test "x$PROGRAMFILES" != x; then
13073    VIRTUAL_DIR="$PROGRAMFILES/Java"
13074
13075  windows_path="$VIRTUAL_DIR"
13076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13077    unix_path=`$CYGPATH -u "$windows_path"`
13078    VIRTUAL_DIR="$unix_path"
13079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13081    VIRTUAL_DIR="$unix_path"
13082  fi
13083
13084
13085  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13086  BOOT_JDK_SUFFIX=""
13087  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13088  if test "x$ALL_JDKS_FOUND" != x; then
13089    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13090
13091  if test "x$BOOT_JDK_FOUND" = xno; then
13092    # Now execute the test
13093
13094        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13095        if test -d "$BOOT_JDK"; then
13096          BOOT_JDK_FOUND=maybe
13097          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13098$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13099        fi
13100
13101
13102    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13103    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13104      # Do we have a bin/java?
13105      if test ! -x "$BOOT_JDK/bin/java"; then
13106        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13107$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13108        BOOT_JDK_FOUND=no
13109      else
13110        # Do we have a bin/javac?
13111        if test ! -x "$BOOT_JDK/bin/javac"; then
13112          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13113$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13114          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13115$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13116          BOOT_JDK_FOUND=no
13117        else
13118          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13119          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13120            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13121$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13122            BOOT_JDK_FOUND=no
13123          else
13124            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13125            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13126
13127            # Extra M4 quote needed to protect [] in grep expression.
13128            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13129            if test "x$FOUND_VERSION_78" = x; then
13130              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13132              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13133$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13134              BOOT_JDK_FOUND=no
13135            else
13136              # We're done! :-)
13137              BOOT_JDK_FOUND=yes
13138
13139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13140
13141  # Input might be given as Windows format, start by converting to
13142  # unix format.
13143  path="$BOOT_JDK"
13144  new_path=`$CYGPATH -u "$path"`
13145
13146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13149  # "foo.exe" is OK but "foo" is an error.
13150  #
13151  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13152  # It is also a way to make sure we got the proper file name for the real test later on.
13153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13154  if test "x$test_shortpath" = x; then
13155    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13156$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13157    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13158  fi
13159
13160  # Call helper function which possibly converts this using DOS-style short mode.
13161  # If so, the updated path is stored in $new_path.
13162
13163  input_path="$new_path"
13164  # Check if we need to convert this using DOS-style short mode. If the path
13165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13166  # take no chances and rewrite it.
13167  # Note: m4 eats our [], so we need to use [ and ] instead.
13168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13169  if test "x$has_forbidden_chars" != x; then
13170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13174      # Going to short mode and back again did indeed matter. Since short mode is
13175      # case insensitive, let's make it lowercase to improve readability.
13176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13177      # Now convert it back to Unix-stile (cygpath)
13178      input_path=`$CYGPATH -u "$shortmode_path"`
13179      new_path="$input_path"
13180    fi
13181  fi
13182
13183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13184  if test "x$test_cygdrive_prefix" = x; then
13185    # As a simple fix, exclude /usr/bin since it's not a real path.
13186    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13188      # a path prefixed by /cygdrive for fixpath to work.
13189      new_path="$CYGWIN_ROOT_PATH$input_path"
13190    fi
13191  fi
13192
13193
13194  if test "x$path" != "x$new_path"; then
13195    BOOT_JDK="$new_path"
13196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13197$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13198  fi
13199
13200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13201
13202  path="$BOOT_JDK"
13203  has_colon=`$ECHO $path | $GREP ^.:`
13204  new_path="$path"
13205  if test "x$has_colon" = x; then
13206    # Not in mixed or Windows style, start by that.
13207    new_path=`cmd //c echo $path`
13208  fi
13209
13210
13211  input_path="$new_path"
13212  # Check if we need to convert this using DOS-style short mode. If the path
13213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13214  # take no chances and rewrite it.
13215  # Note: m4 eats our [], so we need to use [ and ] instead.
13216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13217  if test "x$has_forbidden_chars" != x; then
13218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13220  fi
13221
13222
13223  windows_path="$new_path"
13224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13225    unix_path=`$CYGPATH -u "$windows_path"`
13226    new_path="$unix_path"
13227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13229    new_path="$unix_path"
13230  fi
13231
13232  if test "x$path" != "x$new_path"; then
13233    BOOT_JDK="$new_path"
13234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13235$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13236  fi
13237
13238  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13239  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13240
13241  else
13242    # We're on a posix platform. Hooray! :)
13243    path="$BOOT_JDK"
13244
13245    if test ! -f "$path" && test ! -d "$path"; then
13246      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13247    fi
13248
13249    has_space=`$ECHO "$path" | $GREP " "`
13250    if test "x$has_space" != x; then
13251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13252$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13253      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13254    fi
13255  fi
13256
13257              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13258$as_echo_n "checking for Boot JDK... " >&6; }
13259              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13260$as_echo "$BOOT_JDK" >&6; }
13261              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13262$as_echo_n "checking Boot JDK version... " >&6; }
13263              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13264              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13265$as_echo "$BOOT_JDK_VERSION" >&6; }
13266            fi # end check jdk version
13267          fi # end check rt.jar
13268        fi # end check javac
13269      fi # end check java
13270    fi # end check boot jdk found
13271  fi
13272
13273    done
13274  fi
13275
13276  fi
13277
13278
13279    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13280    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13281      # Do we have a bin/java?
13282      if test ! -x "$BOOT_JDK/bin/java"; then
13283        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13284$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13285        BOOT_JDK_FOUND=no
13286      else
13287        # Do we have a bin/javac?
13288        if test ! -x "$BOOT_JDK/bin/javac"; then
13289          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13290$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13291          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13292$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13293          BOOT_JDK_FOUND=no
13294        else
13295          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13296          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13297            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13298$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13299            BOOT_JDK_FOUND=no
13300          else
13301            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13302            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13303
13304            # Extra M4 quote needed to protect [] in grep expression.
13305            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13306            if test "x$FOUND_VERSION_78" = x; then
13307              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13308$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13309              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13310$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13311              BOOT_JDK_FOUND=no
13312            else
13313              # We're done! :-)
13314              BOOT_JDK_FOUND=yes
13315
13316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13317
13318  # Input might be given as Windows format, start by converting to
13319  # unix format.
13320  path="$BOOT_JDK"
13321  new_path=`$CYGPATH -u "$path"`
13322
13323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13326  # "foo.exe" is OK but "foo" is an error.
13327  #
13328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13329  # It is also a way to make sure we got the proper file name for the real test later on.
13330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13331  if test "x$test_shortpath" = x; then
13332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13333$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13334    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13335  fi
13336
13337  # Call helper function which possibly converts this using DOS-style short mode.
13338  # If so, the updated path is stored in $new_path.
13339
13340  input_path="$new_path"
13341  # Check if we need to convert this using DOS-style short mode. If the path
13342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13343  # take no chances and rewrite it.
13344  # Note: m4 eats our [], so we need to use [ and ] instead.
13345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13346  if test "x$has_forbidden_chars" != x; then
13347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13351      # Going to short mode and back again did indeed matter. Since short mode is
13352      # case insensitive, let's make it lowercase to improve readability.
13353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13354      # Now convert it back to Unix-stile (cygpath)
13355      input_path=`$CYGPATH -u "$shortmode_path"`
13356      new_path="$input_path"
13357    fi
13358  fi
13359
13360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13361  if test "x$test_cygdrive_prefix" = x; then
13362    # As a simple fix, exclude /usr/bin since it's not a real path.
13363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13365      # a path prefixed by /cygdrive for fixpath to work.
13366      new_path="$CYGWIN_ROOT_PATH$input_path"
13367    fi
13368  fi
13369
13370
13371  if test "x$path" != "x$new_path"; then
13372    BOOT_JDK="$new_path"
13373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13374$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13375  fi
13376
13377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13378
13379  path="$BOOT_JDK"
13380  has_colon=`$ECHO $path | $GREP ^.:`
13381  new_path="$path"
13382  if test "x$has_colon" = x; then
13383    # Not in mixed or Windows style, start by that.
13384    new_path=`cmd //c echo $path`
13385  fi
13386
13387
13388  input_path="$new_path"
13389  # Check if we need to convert this using DOS-style short mode. If the path
13390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13391  # take no chances and rewrite it.
13392  # Note: m4 eats our [], so we need to use [ and ] instead.
13393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13394  if test "x$has_forbidden_chars" != x; then
13395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13397  fi
13398
13399
13400  windows_path="$new_path"
13401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13402    unix_path=`$CYGPATH -u "$windows_path"`
13403    new_path="$unix_path"
13404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13406    new_path="$unix_path"
13407  fi
13408
13409  if test "x$path" != "x$new_path"; then
13410    BOOT_JDK="$new_path"
13411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13412$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13413  fi
13414
13415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13417
13418  else
13419    # We're on a posix platform. Hooray! :)
13420    path="$BOOT_JDK"
13421
13422    if test ! -f "$path" && test ! -d "$path"; then
13423      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13424    fi
13425
13426    has_space=`$ECHO "$path" | $GREP " "`
13427    if test "x$has_space" != x; then
13428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13429$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13430      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13431    fi
13432  fi
13433
13434              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13435$as_echo_n "checking for Boot JDK... " >&6; }
13436              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13437$as_echo "$BOOT_JDK" >&6; }
13438              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13439$as_echo_n "checking Boot JDK version... " >&6; }
13440              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13441              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13442$as_echo "$BOOT_JDK_VERSION" >&6; }
13443            fi # end check jdk version
13444          fi # end check rt.jar
13445        fi # end check javac
13446      fi # end check java
13447    fi # end check boot jdk found
13448  fi
13449
13450
13451  if test "x$BOOT_JDK_FOUND" = xno; then
13452    # Now execute the test
13453
13454  if test "x$ProgramFiles" != x; then
13455    VIRTUAL_DIR="$ProgramFiles/Java"
13456
13457  windows_path="$VIRTUAL_DIR"
13458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13459    unix_path=`$CYGPATH -u "$windows_path"`
13460    VIRTUAL_DIR="$unix_path"
13461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13463    VIRTUAL_DIR="$unix_path"
13464  fi
13465
13466
13467  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13468  BOOT_JDK_SUFFIX=""
13469  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13470  if test "x$ALL_JDKS_FOUND" != x; then
13471    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13472
13473  if test "x$BOOT_JDK_FOUND" = xno; then
13474    # Now execute the test
13475
13476        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13477        if test -d "$BOOT_JDK"; then
13478          BOOT_JDK_FOUND=maybe
13479          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13480$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13481        fi
13482
13483
13484    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13485    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13486      # Do we have a bin/java?
13487      if test ! -x "$BOOT_JDK/bin/java"; then
13488        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13490        BOOT_JDK_FOUND=no
13491      else
13492        # Do we have a bin/javac?
13493        if test ! -x "$BOOT_JDK/bin/javac"; then
13494          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13495$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13496          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13497$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13498          BOOT_JDK_FOUND=no
13499        else
13500          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13501          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13502            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13504            BOOT_JDK_FOUND=no
13505          else
13506            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13507            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13508
13509            # Extra M4 quote needed to protect [] in grep expression.
13510            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13511            if test "x$FOUND_VERSION_78" = x; then
13512              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13514              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13515$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13516              BOOT_JDK_FOUND=no
13517            else
13518              # We're done! :-)
13519              BOOT_JDK_FOUND=yes
13520
13521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13522
13523  # Input might be given as Windows format, start by converting to
13524  # unix format.
13525  path="$BOOT_JDK"
13526  new_path=`$CYGPATH -u "$path"`
13527
13528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13531  # "foo.exe" is OK but "foo" is an error.
13532  #
13533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13534  # It is also a way to make sure we got the proper file name for the real test later on.
13535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13536  if test "x$test_shortpath" = x; then
13537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13538$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13539    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13540  fi
13541
13542  # Call helper function which possibly converts this using DOS-style short mode.
13543  # If so, the updated path is stored in $new_path.
13544
13545  input_path="$new_path"
13546  # Check if we need to convert this using DOS-style short mode. If the path
13547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13548  # take no chances and rewrite it.
13549  # Note: m4 eats our [], so we need to use [ and ] instead.
13550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13551  if test "x$has_forbidden_chars" != x; then
13552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13556      # Going to short mode and back again did indeed matter. Since short mode is
13557      # case insensitive, let's make it lowercase to improve readability.
13558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13559      # Now convert it back to Unix-stile (cygpath)
13560      input_path=`$CYGPATH -u "$shortmode_path"`
13561      new_path="$input_path"
13562    fi
13563  fi
13564
13565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13566  if test "x$test_cygdrive_prefix" = x; then
13567    # As a simple fix, exclude /usr/bin since it's not a real path.
13568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13570      # a path prefixed by /cygdrive for fixpath to work.
13571      new_path="$CYGWIN_ROOT_PATH$input_path"
13572    fi
13573  fi
13574
13575
13576  if test "x$path" != "x$new_path"; then
13577    BOOT_JDK="$new_path"
13578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13579$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13580  fi
13581
13582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13583
13584  path="$BOOT_JDK"
13585  has_colon=`$ECHO $path | $GREP ^.:`
13586  new_path="$path"
13587  if test "x$has_colon" = x; then
13588    # Not in mixed or Windows style, start by that.
13589    new_path=`cmd //c echo $path`
13590  fi
13591
13592
13593  input_path="$new_path"
13594  # Check if we need to convert this using DOS-style short mode. If the path
13595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13596  # take no chances and rewrite it.
13597  # Note: m4 eats our [], so we need to use [ and ] instead.
13598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13599  if test "x$has_forbidden_chars" != x; then
13600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13602  fi
13603
13604
13605  windows_path="$new_path"
13606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13607    unix_path=`$CYGPATH -u "$windows_path"`
13608    new_path="$unix_path"
13609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13611    new_path="$unix_path"
13612  fi
13613
13614  if test "x$path" != "x$new_path"; then
13615    BOOT_JDK="$new_path"
13616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13617$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13618  fi
13619
13620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13622
13623  else
13624    # We're on a posix platform. Hooray! :)
13625    path="$BOOT_JDK"
13626
13627    if test ! -f "$path" && test ! -d "$path"; then
13628      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13629    fi
13630
13631    has_space=`$ECHO "$path" | $GREP " "`
13632    if test "x$has_space" != x; then
13633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13634$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13635      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13636    fi
13637  fi
13638
13639              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13640$as_echo_n "checking for Boot JDK... " >&6; }
13641              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13642$as_echo "$BOOT_JDK" >&6; }
13643              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13644$as_echo_n "checking Boot JDK version... " >&6; }
13645              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13646              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13647$as_echo "$BOOT_JDK_VERSION" >&6; }
13648            fi # end check jdk version
13649          fi # end check rt.jar
13650        fi # end check javac
13651      fi # end check java
13652    fi # end check boot jdk found
13653  fi
13654
13655    done
13656  fi
13657
13658  fi
13659
13660
13661    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13662    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13663      # Do we have a bin/java?
13664      if test ! -x "$BOOT_JDK/bin/java"; then
13665        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13666$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13667        BOOT_JDK_FOUND=no
13668      else
13669        # Do we have a bin/javac?
13670        if test ! -x "$BOOT_JDK/bin/javac"; then
13671          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13672$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13673          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13674$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13675          BOOT_JDK_FOUND=no
13676        else
13677          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13678          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13679            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13681            BOOT_JDK_FOUND=no
13682          else
13683            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13684            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13685
13686            # Extra M4 quote needed to protect [] in grep expression.
13687            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13688            if test "x$FOUND_VERSION_78" = x; then
13689              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13691              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13692$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13693              BOOT_JDK_FOUND=no
13694            else
13695              # We're done! :-)
13696              BOOT_JDK_FOUND=yes
13697
13698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13699
13700  # Input might be given as Windows format, start by converting to
13701  # unix format.
13702  path="$BOOT_JDK"
13703  new_path=`$CYGPATH -u "$path"`
13704
13705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13708  # "foo.exe" is OK but "foo" is an error.
13709  #
13710  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13711  # It is also a way to make sure we got the proper file name for the real test later on.
13712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13713  if test "x$test_shortpath" = x; then
13714    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13715$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13716    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13717  fi
13718
13719  # Call helper function which possibly converts this using DOS-style short mode.
13720  # If so, the updated path is stored in $new_path.
13721
13722  input_path="$new_path"
13723  # Check if we need to convert this using DOS-style short mode. If the path
13724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13725  # take no chances and rewrite it.
13726  # Note: m4 eats our [], so we need to use [ and ] instead.
13727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13728  if test "x$has_forbidden_chars" != x; then
13729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13730    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13731    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13732    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13733      # Going to short mode and back again did indeed matter. Since short mode is
13734      # case insensitive, let's make it lowercase to improve readability.
13735      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13736      # Now convert it back to Unix-stile (cygpath)
13737      input_path=`$CYGPATH -u "$shortmode_path"`
13738      new_path="$input_path"
13739    fi
13740  fi
13741
13742  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13743  if test "x$test_cygdrive_prefix" = x; then
13744    # As a simple fix, exclude /usr/bin since it's not a real path.
13745    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13746      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13747      # a path prefixed by /cygdrive for fixpath to work.
13748      new_path="$CYGWIN_ROOT_PATH$input_path"
13749    fi
13750  fi
13751
13752
13753  if test "x$path" != "x$new_path"; then
13754    BOOT_JDK="$new_path"
13755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13756$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13757  fi
13758
13759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13760
13761  path="$BOOT_JDK"
13762  has_colon=`$ECHO $path | $GREP ^.:`
13763  new_path="$path"
13764  if test "x$has_colon" = x; then
13765    # Not in mixed or Windows style, start by that.
13766    new_path=`cmd //c echo $path`
13767  fi
13768
13769
13770  input_path="$new_path"
13771  # Check if we need to convert this using DOS-style short mode. If the path
13772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13773  # take no chances and rewrite it.
13774  # Note: m4 eats our [], so we need to use [ and ] instead.
13775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13776  if test "x$has_forbidden_chars" != x; then
13777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13778    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13779  fi
13780
13781
13782  windows_path="$new_path"
13783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13784    unix_path=`$CYGPATH -u "$windows_path"`
13785    new_path="$unix_path"
13786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13788    new_path="$unix_path"
13789  fi
13790
13791  if test "x$path" != "x$new_path"; then
13792    BOOT_JDK="$new_path"
13793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13794$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13795  fi
13796
13797  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13798  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13799
13800  else
13801    # We're on a posix platform. Hooray! :)
13802    path="$BOOT_JDK"
13803
13804    if test ! -f "$path" && test ! -d "$path"; then
13805      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13806    fi
13807
13808    has_space=`$ECHO "$path" | $GREP " "`
13809    if test "x$has_space" != x; then
13810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13811$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13812      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13813    fi
13814  fi
13815
13816              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13817$as_echo_n "checking for Boot JDK... " >&6; }
13818              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13819$as_echo "$BOOT_JDK" >&6; }
13820              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13821$as_echo_n "checking Boot JDK version... " >&6; }
13822              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13823              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13824$as_echo "$BOOT_JDK_VERSION" >&6; }
13825            fi # end check jdk version
13826          fi # end check rt.jar
13827        fi # end check javac
13828      fi # end check java
13829    fi # end check boot jdk found
13830  fi
13831
13832
13833  if test "x$BOOT_JDK_FOUND" = xno; then
13834    # Now execute the test
13835
13836  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13837  BOOT_JDK_SUFFIX=""
13838  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13839  if test "x$ALL_JDKS_FOUND" != x; then
13840    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13841
13842  if test "x$BOOT_JDK_FOUND" = xno; then
13843    # Now execute the test
13844
13845        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13846        if test -d "$BOOT_JDK"; then
13847          BOOT_JDK_FOUND=maybe
13848          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13849$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13850        fi
13851
13852
13853    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13854    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13855      # Do we have a bin/java?
13856      if test ! -x "$BOOT_JDK/bin/java"; then
13857        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13859        BOOT_JDK_FOUND=no
13860      else
13861        # Do we have a bin/javac?
13862        if test ! -x "$BOOT_JDK/bin/javac"; then
13863          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13864$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13865          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13866$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13867          BOOT_JDK_FOUND=no
13868        else
13869          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13870          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13871            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13872$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13873            BOOT_JDK_FOUND=no
13874          else
13875            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13876            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13877
13878            # Extra M4 quote needed to protect [] in grep expression.
13879            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13880            if test "x$FOUND_VERSION_78" = x; then
13881              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13882$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13883              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13884$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13885              BOOT_JDK_FOUND=no
13886            else
13887              # We're done! :-)
13888              BOOT_JDK_FOUND=yes
13889
13890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13891
13892  # Input might be given as Windows format, start by converting to
13893  # unix format.
13894  path="$BOOT_JDK"
13895  new_path=`$CYGPATH -u "$path"`
13896
13897  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13898  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13899  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13900  # "foo.exe" is OK but "foo" is an error.
13901  #
13902  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13903  # It is also a way to make sure we got the proper file name for the real test later on.
13904  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13905  if test "x$test_shortpath" = x; then
13906    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13907$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13908    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13909  fi
13910
13911  # Call helper function which possibly converts this using DOS-style short mode.
13912  # If so, the updated path is stored in $new_path.
13913
13914  input_path="$new_path"
13915  # Check if we need to convert this using DOS-style short mode. If the path
13916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13917  # take no chances and rewrite it.
13918  # Note: m4 eats our [], so we need to use [ and ] instead.
13919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13920  if test "x$has_forbidden_chars" != x; then
13921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13925      # Going to short mode and back again did indeed matter. Since short mode is
13926      # case insensitive, let's make it lowercase to improve readability.
13927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13928      # Now convert it back to Unix-stile (cygpath)
13929      input_path=`$CYGPATH -u "$shortmode_path"`
13930      new_path="$input_path"
13931    fi
13932  fi
13933
13934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13935  if test "x$test_cygdrive_prefix" = x; then
13936    # As a simple fix, exclude /usr/bin since it's not a real path.
13937    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13939      # a path prefixed by /cygdrive for fixpath to work.
13940      new_path="$CYGWIN_ROOT_PATH$input_path"
13941    fi
13942  fi
13943
13944
13945  if test "x$path" != "x$new_path"; then
13946    BOOT_JDK="$new_path"
13947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13948$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13949  fi
13950
13951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13952
13953  path="$BOOT_JDK"
13954  has_colon=`$ECHO $path | $GREP ^.:`
13955  new_path="$path"
13956  if test "x$has_colon" = x; then
13957    # Not in mixed or Windows style, start by that.
13958    new_path=`cmd //c echo $path`
13959  fi
13960
13961
13962  input_path="$new_path"
13963  # Check if we need to convert this using DOS-style short mode. If the path
13964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13965  # take no chances and rewrite it.
13966  # Note: m4 eats our [], so we need to use [ and ] instead.
13967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13968  if test "x$has_forbidden_chars" != x; then
13969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13970    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13971  fi
13972
13973
13974  windows_path="$new_path"
13975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13976    unix_path=`$CYGPATH -u "$windows_path"`
13977    new_path="$unix_path"
13978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13980    new_path="$unix_path"
13981  fi
13982
13983  if test "x$path" != "x$new_path"; then
13984    BOOT_JDK="$new_path"
13985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13986$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13987  fi
13988
13989  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13990  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13991
13992  else
13993    # We're on a posix platform. Hooray! :)
13994    path="$BOOT_JDK"
13995
13996    if test ! -f "$path" && test ! -d "$path"; then
13997      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13998    fi
13999
14000    has_space=`$ECHO "$path" | $GREP " "`
14001    if test "x$has_space" != x; then
14002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14003$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14004      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14005    fi
14006  fi
14007
14008              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14009$as_echo_n "checking for Boot JDK... " >&6; }
14010              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14011$as_echo "$BOOT_JDK" >&6; }
14012              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14013$as_echo_n "checking Boot JDK version... " >&6; }
14014              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14015              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14016$as_echo "$BOOT_JDK_VERSION" >&6; }
14017            fi # end check jdk version
14018          fi # end check rt.jar
14019        fi # end check javac
14020      fi # end check java
14021    fi # end check boot jdk found
14022  fi
14023
14024    done
14025  fi
14026
14027
14028    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14029    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14030      # Do we have a bin/java?
14031      if test ! -x "$BOOT_JDK/bin/java"; then
14032        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14033$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14034        BOOT_JDK_FOUND=no
14035      else
14036        # Do we have a bin/javac?
14037        if test ! -x "$BOOT_JDK/bin/javac"; then
14038          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14040          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14041$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14042          BOOT_JDK_FOUND=no
14043        else
14044          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14045          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14046            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14048            BOOT_JDK_FOUND=no
14049          else
14050            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14051            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14052
14053            # Extra M4 quote needed to protect [] in grep expression.
14054            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14055            if test "x$FOUND_VERSION_78" = x; then
14056              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14058              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14059$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14060              BOOT_JDK_FOUND=no
14061            else
14062              # We're done! :-)
14063              BOOT_JDK_FOUND=yes
14064
14065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14066
14067  # Input might be given as Windows format, start by converting to
14068  # unix format.
14069  path="$BOOT_JDK"
14070  new_path=`$CYGPATH -u "$path"`
14071
14072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14075  # "foo.exe" is OK but "foo" is an error.
14076  #
14077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14078  # It is also a way to make sure we got the proper file name for the real test later on.
14079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14080  if test "x$test_shortpath" = x; then
14081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14082$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14083    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14084  fi
14085
14086  # Call helper function which possibly converts this using DOS-style short mode.
14087  # If so, the updated path is stored in $new_path.
14088
14089  input_path="$new_path"
14090  # Check if we need to convert this using DOS-style short mode. If the path
14091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14092  # take no chances and rewrite it.
14093  # Note: m4 eats our [], so we need to use [ and ] instead.
14094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14095  if test "x$has_forbidden_chars" != x; then
14096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14100      # Going to short mode and back again did indeed matter. Since short mode is
14101      # case insensitive, let's make it lowercase to improve readability.
14102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14103      # Now convert it back to Unix-stile (cygpath)
14104      input_path=`$CYGPATH -u "$shortmode_path"`
14105      new_path="$input_path"
14106    fi
14107  fi
14108
14109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14110  if test "x$test_cygdrive_prefix" = x; then
14111    # As a simple fix, exclude /usr/bin since it's not a real path.
14112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14114      # a path prefixed by /cygdrive for fixpath to work.
14115      new_path="$CYGWIN_ROOT_PATH$input_path"
14116    fi
14117  fi
14118
14119
14120  if test "x$path" != "x$new_path"; then
14121    BOOT_JDK="$new_path"
14122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14123$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14124  fi
14125
14126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14127
14128  path="$BOOT_JDK"
14129  has_colon=`$ECHO $path | $GREP ^.:`
14130  new_path="$path"
14131  if test "x$has_colon" = x; then
14132    # Not in mixed or Windows style, start by that.
14133    new_path=`cmd //c echo $path`
14134  fi
14135
14136
14137  input_path="$new_path"
14138  # Check if we need to convert this using DOS-style short mode. If the path
14139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14140  # take no chances and rewrite it.
14141  # Note: m4 eats our [], so we need to use [ and ] instead.
14142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14143  if test "x$has_forbidden_chars" != x; then
14144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14146  fi
14147
14148
14149  windows_path="$new_path"
14150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14151    unix_path=`$CYGPATH -u "$windows_path"`
14152    new_path="$unix_path"
14153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14155    new_path="$unix_path"
14156  fi
14157
14158  if test "x$path" != "x$new_path"; then
14159    BOOT_JDK="$new_path"
14160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14162  fi
14163
14164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14166
14167  else
14168    # We're on a posix platform. Hooray! :)
14169    path="$BOOT_JDK"
14170
14171    if test ! -f "$path" && test ! -d "$path"; then
14172      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14173    fi
14174
14175    has_space=`$ECHO "$path" | $GREP " "`
14176    if test "x$has_space" != x; then
14177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14179      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14180    fi
14181  fi
14182
14183              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14184$as_echo_n "checking for Boot JDK... " >&6; }
14185              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14186$as_echo "$BOOT_JDK" >&6; }
14187              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14188$as_echo_n "checking Boot JDK version... " >&6; }
14189              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14190              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14191$as_echo "$BOOT_JDK_VERSION" >&6; }
14192            fi # end check jdk version
14193          fi # end check rt.jar
14194        fi # end check javac
14195      fi # end check java
14196    fi # end check boot jdk found
14197  fi
14198
14199  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14200
14201  if test "x$BOOT_JDK_FOUND" = xno; then
14202    # Now execute the test
14203
14204  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14205  BOOT_JDK_SUFFIX="/Contents/Home"
14206  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14207  if test "x$ALL_JDKS_FOUND" != x; then
14208    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14209
14210  if test "x$BOOT_JDK_FOUND" = xno; then
14211    # Now execute the test
14212
14213        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14214        if test -d "$BOOT_JDK"; then
14215          BOOT_JDK_FOUND=maybe
14216          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14217$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14218        fi
14219
14220
14221    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14222    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14223      # Do we have a bin/java?
14224      if test ! -x "$BOOT_JDK/bin/java"; then
14225        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14227        BOOT_JDK_FOUND=no
14228      else
14229        # Do we have a bin/javac?
14230        if test ! -x "$BOOT_JDK/bin/javac"; then
14231          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14233          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14234$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14235          BOOT_JDK_FOUND=no
14236        else
14237          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14238          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14239            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14241            BOOT_JDK_FOUND=no
14242          else
14243            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14244            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14245
14246            # Extra M4 quote needed to protect [] in grep expression.
14247            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14248            if test "x$FOUND_VERSION_78" = x; then
14249              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14251              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14252$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14253              BOOT_JDK_FOUND=no
14254            else
14255              # We're done! :-)
14256              BOOT_JDK_FOUND=yes
14257
14258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14259
14260  # Input might be given as Windows format, start by converting to
14261  # unix format.
14262  path="$BOOT_JDK"
14263  new_path=`$CYGPATH -u "$path"`
14264
14265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14268  # "foo.exe" is OK but "foo" is an error.
14269  #
14270  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14271  # It is also a way to make sure we got the proper file name for the real test later on.
14272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14273  if test "x$test_shortpath" = x; then
14274    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14275$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14276    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14277  fi
14278
14279  # Call helper function which possibly converts this using DOS-style short mode.
14280  # If so, the updated path is stored in $new_path.
14281
14282  input_path="$new_path"
14283  # Check if we need to convert this using DOS-style short mode. If the path
14284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14285  # take no chances and rewrite it.
14286  # Note: m4 eats our [], so we need to use [ and ] instead.
14287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14288  if test "x$has_forbidden_chars" != x; then
14289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14293      # Going to short mode and back again did indeed matter. Since short mode is
14294      # case insensitive, let's make it lowercase to improve readability.
14295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14296      # Now convert it back to Unix-stile (cygpath)
14297      input_path=`$CYGPATH -u "$shortmode_path"`
14298      new_path="$input_path"
14299    fi
14300  fi
14301
14302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14303  if test "x$test_cygdrive_prefix" = x; then
14304    # As a simple fix, exclude /usr/bin since it's not a real path.
14305    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14307      # a path prefixed by /cygdrive for fixpath to work.
14308      new_path="$CYGWIN_ROOT_PATH$input_path"
14309    fi
14310  fi
14311
14312
14313  if test "x$path" != "x$new_path"; then
14314    BOOT_JDK="$new_path"
14315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14316$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14317  fi
14318
14319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14320
14321  path="$BOOT_JDK"
14322  has_colon=`$ECHO $path | $GREP ^.:`
14323  new_path="$path"
14324  if test "x$has_colon" = x; then
14325    # Not in mixed or Windows style, start by that.
14326    new_path=`cmd //c echo $path`
14327  fi
14328
14329
14330  input_path="$new_path"
14331  # Check if we need to convert this using DOS-style short mode. If the path
14332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14333  # take no chances and rewrite it.
14334  # Note: m4 eats our [], so we need to use [ and ] instead.
14335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14336  if test "x$has_forbidden_chars" != x; then
14337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14339  fi
14340
14341
14342  windows_path="$new_path"
14343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14344    unix_path=`$CYGPATH -u "$windows_path"`
14345    new_path="$unix_path"
14346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14348    new_path="$unix_path"
14349  fi
14350
14351  if test "x$path" != "x$new_path"; then
14352    BOOT_JDK="$new_path"
14353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14354$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14355  fi
14356
14357  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14358  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14359
14360  else
14361    # We're on a posix platform. Hooray! :)
14362    path="$BOOT_JDK"
14363
14364    if test ! -f "$path" && test ! -d "$path"; then
14365      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14366    fi
14367
14368    has_space=`$ECHO "$path" | $GREP " "`
14369    if test "x$has_space" != x; then
14370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14371$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14372      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14373    fi
14374  fi
14375
14376              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14377$as_echo_n "checking for Boot JDK... " >&6; }
14378              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14379$as_echo "$BOOT_JDK" >&6; }
14380              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14381$as_echo_n "checking Boot JDK version... " >&6; }
14382              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14383              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14384$as_echo "$BOOT_JDK_VERSION" >&6; }
14385            fi # end check jdk version
14386          fi # end check rt.jar
14387        fi # end check javac
14388      fi # end check java
14389    fi # end check boot jdk found
14390  fi
14391
14392    done
14393  fi
14394
14395
14396    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14397    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14398      # Do we have a bin/java?
14399      if test ! -x "$BOOT_JDK/bin/java"; then
14400        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14402        BOOT_JDK_FOUND=no
14403      else
14404        # Do we have a bin/javac?
14405        if test ! -x "$BOOT_JDK/bin/javac"; then
14406          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14407$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14408          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14409$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14410          BOOT_JDK_FOUND=no
14411        else
14412          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14413          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14414            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14416            BOOT_JDK_FOUND=no
14417          else
14418            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14419            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14420
14421            # Extra M4 quote needed to protect [] in grep expression.
14422            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14423            if test "x$FOUND_VERSION_78" = x; then
14424              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14425$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14426              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14427$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14428              BOOT_JDK_FOUND=no
14429            else
14430              # We're done! :-)
14431              BOOT_JDK_FOUND=yes
14432
14433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14434
14435  # Input might be given as Windows format, start by converting to
14436  # unix format.
14437  path="$BOOT_JDK"
14438  new_path=`$CYGPATH -u "$path"`
14439
14440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14443  # "foo.exe" is OK but "foo" is an error.
14444  #
14445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14446  # It is also a way to make sure we got the proper file name for the real test later on.
14447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14448  if test "x$test_shortpath" = x; then
14449    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14450$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14451    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14452  fi
14453
14454  # Call helper function which possibly converts this using DOS-style short mode.
14455  # If so, the updated path is stored in $new_path.
14456
14457  input_path="$new_path"
14458  # Check if we need to convert this using DOS-style short mode. If the path
14459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14460  # take no chances and rewrite it.
14461  # Note: m4 eats our [], so we need to use [ and ] instead.
14462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14463  if test "x$has_forbidden_chars" != x; then
14464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14468      # Going to short mode and back again did indeed matter. Since short mode is
14469      # case insensitive, let's make it lowercase to improve readability.
14470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14471      # Now convert it back to Unix-stile (cygpath)
14472      input_path=`$CYGPATH -u "$shortmode_path"`
14473      new_path="$input_path"
14474    fi
14475  fi
14476
14477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14478  if test "x$test_cygdrive_prefix" = x; then
14479    # As a simple fix, exclude /usr/bin since it's not a real path.
14480    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14482      # a path prefixed by /cygdrive for fixpath to work.
14483      new_path="$CYGWIN_ROOT_PATH$input_path"
14484    fi
14485  fi
14486
14487
14488  if test "x$path" != "x$new_path"; then
14489    BOOT_JDK="$new_path"
14490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14492  fi
14493
14494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14495
14496  path="$BOOT_JDK"
14497  has_colon=`$ECHO $path | $GREP ^.:`
14498  new_path="$path"
14499  if test "x$has_colon" = x; then
14500    # Not in mixed or Windows style, start by that.
14501    new_path=`cmd //c echo $path`
14502  fi
14503
14504
14505  input_path="$new_path"
14506  # Check if we need to convert this using DOS-style short mode. If the path
14507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14508  # take no chances and rewrite it.
14509  # Note: m4 eats our [], so we need to use [ and ] instead.
14510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14511  if test "x$has_forbidden_chars" != x; then
14512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14514  fi
14515
14516
14517  windows_path="$new_path"
14518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14519    unix_path=`$CYGPATH -u "$windows_path"`
14520    new_path="$unix_path"
14521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14523    new_path="$unix_path"
14524  fi
14525
14526  if test "x$path" != "x$new_path"; then
14527    BOOT_JDK="$new_path"
14528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14529$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14530  fi
14531
14532  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14533  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14534
14535  else
14536    # We're on a posix platform. Hooray! :)
14537    path="$BOOT_JDK"
14538
14539    if test ! -f "$path" && test ! -d "$path"; then
14540      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14541    fi
14542
14543    has_space=`$ECHO "$path" | $GREP " "`
14544    if test "x$has_space" != x; then
14545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14546$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14547      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14548    fi
14549  fi
14550
14551              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14552$as_echo_n "checking for Boot JDK... " >&6; }
14553              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14554$as_echo "$BOOT_JDK" >&6; }
14555              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14556$as_echo_n "checking Boot JDK version... " >&6; }
14557              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14558              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14559$as_echo "$BOOT_JDK_VERSION" >&6; }
14560            fi # end check jdk version
14561          fi # end check rt.jar
14562        fi # end check javac
14563      fi # end check java
14564    fi # end check boot jdk found
14565  fi
14566
14567
14568  if test "x$BOOT_JDK_FOUND" = xno; then
14569    # Now execute the test
14570
14571  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14572  BOOT_JDK_SUFFIX="/Contents/Home"
14573  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14574  if test "x$ALL_JDKS_FOUND" != x; then
14575    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14576
14577  if test "x$BOOT_JDK_FOUND" = xno; then
14578    # Now execute the test
14579
14580        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14581        if test -d "$BOOT_JDK"; then
14582          BOOT_JDK_FOUND=maybe
14583          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14584$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14585        fi
14586
14587
14588    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14589    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14590      # Do we have a bin/java?
14591      if test ! -x "$BOOT_JDK/bin/java"; then
14592        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14594        BOOT_JDK_FOUND=no
14595      else
14596        # Do we have a bin/javac?
14597        if test ! -x "$BOOT_JDK/bin/javac"; then
14598          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14600          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14601$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14602          BOOT_JDK_FOUND=no
14603        else
14604          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14605          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14606            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14608            BOOT_JDK_FOUND=no
14609          else
14610            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14611            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14612
14613            # Extra M4 quote needed to protect [] in grep expression.
14614            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14615            if test "x$FOUND_VERSION_78" = x; then
14616              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14618              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14619$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14620              BOOT_JDK_FOUND=no
14621            else
14622              # We're done! :-)
14623              BOOT_JDK_FOUND=yes
14624
14625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14626
14627  # Input might be given as Windows format, start by converting to
14628  # unix format.
14629  path="$BOOT_JDK"
14630  new_path=`$CYGPATH -u "$path"`
14631
14632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14635  # "foo.exe" is OK but "foo" is an error.
14636  #
14637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14638  # It is also a way to make sure we got the proper file name for the real test later on.
14639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14640  if test "x$test_shortpath" = x; then
14641    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14642$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14643    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14644  fi
14645
14646  # Call helper function which possibly converts this using DOS-style short mode.
14647  # If so, the updated path is stored in $new_path.
14648
14649  input_path="$new_path"
14650  # Check if we need to convert this using DOS-style short mode. If the path
14651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14652  # take no chances and rewrite it.
14653  # Note: m4 eats our [], so we need to use [ and ] instead.
14654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14655  if test "x$has_forbidden_chars" != x; then
14656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14660      # Going to short mode and back again did indeed matter. Since short mode is
14661      # case insensitive, let's make it lowercase to improve readability.
14662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14663      # Now convert it back to Unix-stile (cygpath)
14664      input_path=`$CYGPATH -u "$shortmode_path"`
14665      new_path="$input_path"
14666    fi
14667  fi
14668
14669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14670  if test "x$test_cygdrive_prefix" = x; then
14671    # As a simple fix, exclude /usr/bin since it's not a real path.
14672    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14674      # a path prefixed by /cygdrive for fixpath to work.
14675      new_path="$CYGWIN_ROOT_PATH$input_path"
14676    fi
14677  fi
14678
14679
14680  if test "x$path" != "x$new_path"; then
14681    BOOT_JDK="$new_path"
14682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14683$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14684  fi
14685
14686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14687
14688  path="$BOOT_JDK"
14689  has_colon=`$ECHO $path | $GREP ^.:`
14690  new_path="$path"
14691  if test "x$has_colon" = x; then
14692    # Not in mixed or Windows style, start by that.
14693    new_path=`cmd //c echo $path`
14694  fi
14695
14696
14697  input_path="$new_path"
14698  # Check if we need to convert this using DOS-style short mode. If the path
14699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14700  # take no chances and rewrite it.
14701  # Note: m4 eats our [], so we need to use [ and ] instead.
14702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14703  if test "x$has_forbidden_chars" != x; then
14704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14706  fi
14707
14708
14709  windows_path="$new_path"
14710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14711    unix_path=`$CYGPATH -u "$windows_path"`
14712    new_path="$unix_path"
14713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14715    new_path="$unix_path"
14716  fi
14717
14718  if test "x$path" != "x$new_path"; then
14719    BOOT_JDK="$new_path"
14720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14721$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14722  fi
14723
14724  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14725  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14726
14727  else
14728    # We're on a posix platform. Hooray! :)
14729    path="$BOOT_JDK"
14730
14731    if test ! -f "$path" && test ! -d "$path"; then
14732      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14733    fi
14734
14735    has_space=`$ECHO "$path" | $GREP " "`
14736    if test "x$has_space" != x; then
14737      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14738$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14739      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14740    fi
14741  fi
14742
14743              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14744$as_echo_n "checking for Boot JDK... " >&6; }
14745              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14746$as_echo "$BOOT_JDK" >&6; }
14747              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14748$as_echo_n "checking Boot JDK version... " >&6; }
14749              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14750              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14751$as_echo "$BOOT_JDK_VERSION" >&6; }
14752            fi # end check jdk version
14753          fi # end check rt.jar
14754        fi # end check javac
14755      fi # end check java
14756    fi # end check boot jdk found
14757  fi
14758
14759    done
14760  fi
14761
14762
14763    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14764    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14765      # Do we have a bin/java?
14766      if test ! -x "$BOOT_JDK/bin/java"; then
14767        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14769        BOOT_JDK_FOUND=no
14770      else
14771        # Do we have a bin/javac?
14772        if test ! -x "$BOOT_JDK/bin/javac"; then
14773          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14775          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14776$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14777          BOOT_JDK_FOUND=no
14778        else
14779          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14780          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14781            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14783            BOOT_JDK_FOUND=no
14784          else
14785            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14786            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14787
14788            # Extra M4 quote needed to protect [] in grep expression.
14789            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14790            if test "x$FOUND_VERSION_78" = x; then
14791              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14793              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14794$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14795              BOOT_JDK_FOUND=no
14796            else
14797              # We're done! :-)
14798              BOOT_JDK_FOUND=yes
14799
14800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14801
14802  # Input might be given as Windows format, start by converting to
14803  # unix format.
14804  path="$BOOT_JDK"
14805  new_path=`$CYGPATH -u "$path"`
14806
14807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14810  # "foo.exe" is OK but "foo" is an error.
14811  #
14812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14813  # It is also a way to make sure we got the proper file name for the real test later on.
14814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14815  if test "x$test_shortpath" = x; then
14816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14817$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14818    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14819  fi
14820
14821  # Call helper function which possibly converts this using DOS-style short mode.
14822  # If so, the updated path is stored in $new_path.
14823
14824  input_path="$new_path"
14825  # Check if we need to convert this using DOS-style short mode. If the path
14826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14827  # take no chances and rewrite it.
14828  # Note: m4 eats our [], so we need to use [ and ] instead.
14829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14830  if test "x$has_forbidden_chars" != x; then
14831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14835      # Going to short mode and back again did indeed matter. Since short mode is
14836      # case insensitive, let's make it lowercase to improve readability.
14837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14838      # Now convert it back to Unix-stile (cygpath)
14839      input_path=`$CYGPATH -u "$shortmode_path"`
14840      new_path="$input_path"
14841    fi
14842  fi
14843
14844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14845  if test "x$test_cygdrive_prefix" = x; then
14846    # As a simple fix, exclude /usr/bin since it's not a real path.
14847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14849      # a path prefixed by /cygdrive for fixpath to work.
14850      new_path="$CYGWIN_ROOT_PATH$input_path"
14851    fi
14852  fi
14853
14854
14855  if test "x$path" != "x$new_path"; then
14856    BOOT_JDK="$new_path"
14857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14858$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14859  fi
14860
14861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14862
14863  path="$BOOT_JDK"
14864  has_colon=`$ECHO $path | $GREP ^.:`
14865  new_path="$path"
14866  if test "x$has_colon" = x; then
14867    # Not in mixed or Windows style, start by that.
14868    new_path=`cmd //c echo $path`
14869  fi
14870
14871
14872  input_path="$new_path"
14873  # Check if we need to convert this using DOS-style short mode. If the path
14874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14875  # take no chances and rewrite it.
14876  # Note: m4 eats our [], so we need to use [ and ] instead.
14877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14878  if test "x$has_forbidden_chars" != x; then
14879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14881  fi
14882
14883
14884  windows_path="$new_path"
14885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14886    unix_path=`$CYGPATH -u "$windows_path"`
14887    new_path="$unix_path"
14888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14890    new_path="$unix_path"
14891  fi
14892
14893  if test "x$path" != "x$new_path"; then
14894    BOOT_JDK="$new_path"
14895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14896$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14897  fi
14898
14899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14901
14902  else
14903    # We're on a posix platform. Hooray! :)
14904    path="$BOOT_JDK"
14905
14906    if test ! -f "$path" && test ! -d "$path"; then
14907      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14908    fi
14909
14910    has_space=`$ECHO "$path" | $GREP " "`
14911    if test "x$has_space" != x; then
14912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14913$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14914      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14915    fi
14916  fi
14917
14918              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14919$as_echo_n "checking for Boot JDK... " >&6; }
14920              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14921$as_echo "$BOOT_JDK" >&6; }
14922              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14923$as_echo_n "checking Boot JDK version... " >&6; }
14924              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14925              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14926$as_echo "$BOOT_JDK_VERSION" >&6; }
14927            fi # end check jdk version
14928          fi # end check rt.jar
14929        fi # end check javac
14930      fi # end check java
14931    fi # end check boot jdk found
14932  fi
14933
14934  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14935
14936  if test "x$BOOT_JDK_FOUND" = xno; then
14937    # Now execute the test
14938
14939  BOOT_JDK_PREFIX="/usr/lib/jvm"
14940  BOOT_JDK_SUFFIX=""
14941  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14942  if test "x$ALL_JDKS_FOUND" != x; then
14943    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14944
14945  if test "x$BOOT_JDK_FOUND" = xno; then
14946    # Now execute the test
14947
14948        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14949        if test -d "$BOOT_JDK"; then
14950          BOOT_JDK_FOUND=maybe
14951          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14952$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14953        fi
14954
14955
14956    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14957    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14958      # Do we have a bin/java?
14959      if test ! -x "$BOOT_JDK/bin/java"; then
14960        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14962        BOOT_JDK_FOUND=no
14963      else
14964        # Do we have a bin/javac?
14965        if test ! -x "$BOOT_JDK/bin/javac"; then
14966          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14968          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14969$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14970          BOOT_JDK_FOUND=no
14971        else
14972          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14973          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14974            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14976            BOOT_JDK_FOUND=no
14977          else
14978            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14979            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14980
14981            # Extra M4 quote needed to protect [] in grep expression.
14982            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14983            if test "x$FOUND_VERSION_78" = x; then
14984              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14986              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14987$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14988              BOOT_JDK_FOUND=no
14989            else
14990              # We're done! :-)
14991              BOOT_JDK_FOUND=yes
14992
14993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14994
14995  # Input might be given as Windows format, start by converting to
14996  # unix format.
14997  path="$BOOT_JDK"
14998  new_path=`$CYGPATH -u "$path"`
14999
15000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15003  # "foo.exe" is OK but "foo" is an error.
15004  #
15005  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15006  # It is also a way to make sure we got the proper file name for the real test later on.
15007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15008  if test "x$test_shortpath" = x; then
15009    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15010$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15011    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15012  fi
15013
15014  # Call helper function which possibly converts this using DOS-style short mode.
15015  # If so, the updated path is stored in $new_path.
15016
15017  input_path="$new_path"
15018  # Check if we need to convert this using DOS-style short mode. If the path
15019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15020  # take no chances and rewrite it.
15021  # Note: m4 eats our [], so we need to use [ and ] instead.
15022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15023  if test "x$has_forbidden_chars" != x; then
15024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15028      # Going to short mode and back again did indeed matter. Since short mode is
15029      # case insensitive, let's make it lowercase to improve readability.
15030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15031      # Now convert it back to Unix-stile (cygpath)
15032      input_path=`$CYGPATH -u "$shortmode_path"`
15033      new_path="$input_path"
15034    fi
15035  fi
15036
15037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15038  if test "x$test_cygdrive_prefix" = x; then
15039    # As a simple fix, exclude /usr/bin since it's not a real path.
15040    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15042      # a path prefixed by /cygdrive for fixpath to work.
15043      new_path="$CYGWIN_ROOT_PATH$input_path"
15044    fi
15045  fi
15046
15047
15048  if test "x$path" != "x$new_path"; then
15049    BOOT_JDK="$new_path"
15050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15051$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15052  fi
15053
15054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15055
15056  path="$BOOT_JDK"
15057  has_colon=`$ECHO $path | $GREP ^.:`
15058  new_path="$path"
15059  if test "x$has_colon" = x; then
15060    # Not in mixed or Windows style, start by that.
15061    new_path=`cmd //c echo $path`
15062  fi
15063
15064
15065  input_path="$new_path"
15066  # Check if we need to convert this using DOS-style short mode. If the path
15067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15068  # take no chances and rewrite it.
15069  # Note: m4 eats our [], so we need to use [ and ] instead.
15070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15071  if test "x$has_forbidden_chars" != x; then
15072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15074  fi
15075
15076
15077  windows_path="$new_path"
15078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15079    unix_path=`$CYGPATH -u "$windows_path"`
15080    new_path="$unix_path"
15081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15083    new_path="$unix_path"
15084  fi
15085
15086  if test "x$path" != "x$new_path"; then
15087    BOOT_JDK="$new_path"
15088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15089$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15090  fi
15091
15092  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15093  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15094
15095  else
15096    # We're on a posix platform. Hooray! :)
15097    path="$BOOT_JDK"
15098
15099    if test ! -f "$path" && test ! -d "$path"; then
15100      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15101    fi
15102
15103    has_space=`$ECHO "$path" | $GREP " "`
15104    if test "x$has_space" != x; then
15105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15106$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15107      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15108    fi
15109  fi
15110
15111              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15112$as_echo_n "checking for Boot JDK... " >&6; }
15113              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15114$as_echo "$BOOT_JDK" >&6; }
15115              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15116$as_echo_n "checking Boot JDK version... " >&6; }
15117              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15118              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15119$as_echo "$BOOT_JDK_VERSION" >&6; }
15120            fi # end check jdk version
15121          fi # end check rt.jar
15122        fi # end check javac
15123      fi # end check java
15124    fi # end check boot jdk found
15125  fi
15126
15127    done
15128  fi
15129
15130
15131    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15132    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15133      # Do we have a bin/java?
15134      if test ! -x "$BOOT_JDK/bin/java"; then
15135        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15136$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15137        BOOT_JDK_FOUND=no
15138      else
15139        # Do we have a bin/javac?
15140        if test ! -x "$BOOT_JDK/bin/javac"; then
15141          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15143          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15144$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15145          BOOT_JDK_FOUND=no
15146        else
15147          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15148          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15149            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15151            BOOT_JDK_FOUND=no
15152          else
15153            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15154            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15155
15156            # Extra M4 quote needed to protect [] in grep expression.
15157            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15158            if test "x$FOUND_VERSION_78" = x; then
15159              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15161              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15162$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15163              BOOT_JDK_FOUND=no
15164            else
15165              # We're done! :-)
15166              BOOT_JDK_FOUND=yes
15167
15168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15169
15170  # Input might be given as Windows format, start by converting to
15171  # unix format.
15172  path="$BOOT_JDK"
15173  new_path=`$CYGPATH -u "$path"`
15174
15175  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15176  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15177  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15178  # "foo.exe" is OK but "foo" is an error.
15179  #
15180  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15181  # It is also a way to make sure we got the proper file name for the real test later on.
15182  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15183  if test "x$test_shortpath" = x; then
15184    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15185$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15186    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15187  fi
15188
15189  # Call helper function which possibly converts this using DOS-style short mode.
15190  # If so, the updated path is stored in $new_path.
15191
15192  input_path="$new_path"
15193  # Check if we need to convert this using DOS-style short mode. If the path
15194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15195  # take no chances and rewrite it.
15196  # Note: m4 eats our [], so we need to use [ and ] instead.
15197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15198  if test "x$has_forbidden_chars" != x; then
15199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15200    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15201    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15202    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15203      # Going to short mode and back again did indeed matter. Since short mode is
15204      # case insensitive, let's make it lowercase to improve readability.
15205      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15206      # Now convert it back to Unix-stile (cygpath)
15207      input_path=`$CYGPATH -u "$shortmode_path"`
15208      new_path="$input_path"
15209    fi
15210  fi
15211
15212  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15213  if test "x$test_cygdrive_prefix" = x; then
15214    # As a simple fix, exclude /usr/bin since it's not a real path.
15215    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15216      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15217      # a path prefixed by /cygdrive for fixpath to work.
15218      new_path="$CYGWIN_ROOT_PATH$input_path"
15219    fi
15220  fi
15221
15222
15223  if test "x$path" != "x$new_path"; then
15224    BOOT_JDK="$new_path"
15225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15226$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15227  fi
15228
15229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15230
15231  path="$BOOT_JDK"
15232  has_colon=`$ECHO $path | $GREP ^.:`
15233  new_path="$path"
15234  if test "x$has_colon" = x; then
15235    # Not in mixed or Windows style, start by that.
15236    new_path=`cmd //c echo $path`
15237  fi
15238
15239
15240  input_path="$new_path"
15241  # Check if we need to convert this using DOS-style short mode. If the path
15242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15243  # take no chances and rewrite it.
15244  # Note: m4 eats our [], so we need to use [ and ] instead.
15245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15246  if test "x$has_forbidden_chars" != x; then
15247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15248    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15249  fi
15250
15251
15252  windows_path="$new_path"
15253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15254    unix_path=`$CYGPATH -u "$windows_path"`
15255    new_path="$unix_path"
15256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15258    new_path="$unix_path"
15259  fi
15260
15261  if test "x$path" != "x$new_path"; then
15262    BOOT_JDK="$new_path"
15263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15264$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15265  fi
15266
15267  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15268  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15269
15270  else
15271    # We're on a posix platform. Hooray! :)
15272    path="$BOOT_JDK"
15273
15274    if test ! -f "$path" && test ! -d "$path"; then
15275      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15276    fi
15277
15278    has_space=`$ECHO "$path" | $GREP " "`
15279    if test "x$has_space" != x; then
15280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15281$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15282      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15283    fi
15284  fi
15285
15286              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15287$as_echo_n "checking for Boot JDK... " >&6; }
15288              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15289$as_echo "$BOOT_JDK" >&6; }
15290              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15291$as_echo_n "checking Boot JDK version... " >&6; }
15292              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15293              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15294$as_echo "$BOOT_JDK_VERSION" >&6; }
15295            fi # end check jdk version
15296          fi # end check rt.jar
15297        fi # end check javac
15298      fi # end check java
15299    fi # end check boot jdk found
15300  fi
15301
15302  fi
15303
15304
15305    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15306    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15307      # Do we have a bin/java?
15308      if test ! -x "$BOOT_JDK/bin/java"; then
15309        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15311        BOOT_JDK_FOUND=no
15312      else
15313        # Do we have a bin/javac?
15314        if test ! -x "$BOOT_JDK/bin/javac"; then
15315          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15316$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15317          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15318$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15319          BOOT_JDK_FOUND=no
15320        else
15321          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15322          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15323            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15325            BOOT_JDK_FOUND=no
15326          else
15327            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15328            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15329
15330            # Extra M4 quote needed to protect [] in grep expression.
15331            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15332            if test "x$FOUND_VERSION_78" = x; then
15333              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15335              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15336$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15337              BOOT_JDK_FOUND=no
15338            else
15339              # We're done! :-)
15340              BOOT_JDK_FOUND=yes
15341
15342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15343
15344  # Input might be given as Windows format, start by converting to
15345  # unix format.
15346  path="$BOOT_JDK"
15347  new_path=`$CYGPATH -u "$path"`
15348
15349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15352  # "foo.exe" is OK but "foo" is an error.
15353  #
15354  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15355  # It is also a way to make sure we got the proper file name for the real test later on.
15356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15357  if test "x$test_shortpath" = x; then
15358    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15359$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15360    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15361  fi
15362
15363  # Call helper function which possibly converts this using DOS-style short mode.
15364  # If so, the updated path is stored in $new_path.
15365
15366  input_path="$new_path"
15367  # Check if we need to convert this using DOS-style short mode. If the path
15368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15369  # take no chances and rewrite it.
15370  # Note: m4 eats our [], so we need to use [ and ] instead.
15371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15372  if test "x$has_forbidden_chars" != x; then
15373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15377      # Going to short mode and back again did indeed matter. Since short mode is
15378      # case insensitive, let's make it lowercase to improve readability.
15379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15380      # Now convert it back to Unix-stile (cygpath)
15381      input_path=`$CYGPATH -u "$shortmode_path"`
15382      new_path="$input_path"
15383    fi
15384  fi
15385
15386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15387  if test "x$test_cygdrive_prefix" = x; then
15388    # As a simple fix, exclude /usr/bin since it's not a real path.
15389    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15391      # a path prefixed by /cygdrive for fixpath to work.
15392      new_path="$CYGWIN_ROOT_PATH$input_path"
15393    fi
15394  fi
15395
15396
15397  if test "x$path" != "x$new_path"; then
15398    BOOT_JDK="$new_path"
15399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15400$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15401  fi
15402
15403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15404
15405  path="$BOOT_JDK"
15406  has_colon=`$ECHO $path | $GREP ^.:`
15407  new_path="$path"
15408  if test "x$has_colon" = x; then
15409    # Not in mixed or Windows style, start by that.
15410    new_path=`cmd //c echo $path`
15411  fi
15412
15413
15414  input_path="$new_path"
15415  # Check if we need to convert this using DOS-style short mode. If the path
15416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15417  # take no chances and rewrite it.
15418  # Note: m4 eats our [], so we need to use [ and ] instead.
15419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15420  if test "x$has_forbidden_chars" != x; then
15421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15423  fi
15424
15425
15426  windows_path="$new_path"
15427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15428    unix_path=`$CYGPATH -u "$windows_path"`
15429    new_path="$unix_path"
15430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15432    new_path="$unix_path"
15433  fi
15434
15435  if test "x$path" != "x$new_path"; then
15436    BOOT_JDK="$new_path"
15437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15438$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15439  fi
15440
15441  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15442  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15443
15444  else
15445    # We're on a posix platform. Hooray! :)
15446    path="$BOOT_JDK"
15447
15448    if test ! -f "$path" && test ! -d "$path"; then
15449      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15450    fi
15451
15452    has_space=`$ECHO "$path" | $GREP " "`
15453    if test "x$has_space" != x; then
15454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15455$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15456      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15457    fi
15458  fi
15459
15460              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15461$as_echo_n "checking for Boot JDK... " >&6; }
15462              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15463$as_echo "$BOOT_JDK" >&6; }
15464              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15465$as_echo_n "checking Boot JDK version... " >&6; }
15466              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15467              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15468$as_echo "$BOOT_JDK_VERSION" >&6; }
15469            fi # end check jdk version
15470          fi # end check rt.jar
15471        fi # end check javac
15472      fi # end check java
15473    fi # end check boot jdk found
15474  fi
15475
15476
15477# If we haven't found anything yet, we've truly lost. Give up.
15478if test "x$BOOT_JDK_FOUND" = xno; then
15479
15480    # Print a helpful message on how to acquire the necessary build dependency.
15481    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15482    MISSING_DEPENDENCY=openjdk
15483    PKGHANDLER_COMMAND=
15484
15485    case $PKGHANDLER in
15486	apt-get)
15487                apt_help     $MISSING_DEPENDENCY ;;
15488    yum)
15489                yum_help     $MISSING_DEPENDENCY ;;
15490	port)
15491                port_help    $MISSING_DEPENDENCY ;;
15492	pkgutil)
15493                pkgutil_help $MISSING_DEPENDENCY ;;
15494	pkgadd)
15495                pkgadd_help  $MISSING_DEPENDENCY ;;
15496    * )
15497      break ;;
15498    esac
15499
15500    if test "x$PKGHANDLER_COMMAND" != x; then
15501        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15502    fi
15503
15504  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15505$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15506  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15507$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15508  as_fn_error $? "Cannot continue" "$LINENO" 5
15509fi
15510
15511# Setup proper paths for what we found
15512BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15513if test ! -f "$BOOT_RTJAR"; then
15514    # On MacOSX it is called classes.jar
15515    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15516    if test -f "$BOOT_RTJAR"; then
15517      # Remove the ..
15518      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15519    fi
15520fi
15521BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15522BOOT_JDK="$BOOT_JDK"
15523
15524
15525
15526
15527# Setup tools from the Boot JDK.
15528
15529  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15530$as_echo_n "checking for java in Boot JDK... " >&6; }
15531  JAVA=$BOOT_JDK/bin/java
15532  if test ! -x $JAVA; then
15533      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15534$as_echo "not found" >&6; }
15535      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15536$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15537      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15538  fi
15539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15540$as_echo "ok" >&6; }
15541
15542
15543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15544$as_echo_n "checking for javac in Boot JDK... " >&6; }
15545  JAVAC=$BOOT_JDK/bin/javac
15546  if test ! -x $JAVAC; then
15547      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15548$as_echo "not found" >&6; }
15549      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15550$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15551      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15552  fi
15553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15554$as_echo "ok" >&6; }
15555
15556
15557  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15558$as_echo_n "checking for javah in Boot JDK... " >&6; }
15559  JAVAH=$BOOT_JDK/bin/javah
15560  if test ! -x $JAVAH; then
15561      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15562$as_echo "not found" >&6; }
15563      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15564$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15565      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15566  fi
15567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15568$as_echo "ok" >&6; }
15569
15570
15571  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15572$as_echo_n "checking for javap in Boot JDK... " >&6; }
15573  JAVAP=$BOOT_JDK/bin/javap
15574  if test ! -x $JAVAP; then
15575      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15576$as_echo "not found" >&6; }
15577      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15578$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15579      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15580  fi
15581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15582$as_echo "ok" >&6; }
15583
15584
15585  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15586$as_echo_n "checking for jar in Boot JDK... " >&6; }
15587  JAR=$BOOT_JDK/bin/jar
15588  if test ! -x $JAR; then
15589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15590$as_echo "not found" >&6; }
15591      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15592$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15593      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15594  fi
15595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15596$as_echo "ok" >&6; }
15597
15598
15599  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15600$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15601  RMIC=$BOOT_JDK/bin/rmic
15602  if test ! -x $RMIC; then
15603      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15604$as_echo "not found" >&6; }
15605      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15606$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15607      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15608  fi
15609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15610$as_echo "ok" >&6; }
15611
15612
15613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15614$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15615  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15616  if test ! -x $NATIVE2ASCII; then
15617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15618$as_echo "not found" >&6; }
15619      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15620$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15621      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15622  fi
15623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15624$as_echo "ok" >&6; }
15625
15626
15627# Finally, set some other options...
15628
15629# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15630BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15631
15632
15633
15634
15635##############################################################################
15636#
15637# Specify options for anything that is run with the Boot JDK.
15638#
15639
15640# Check whether --with-boot-jdk-jvmargs was given.
15641if test "${with_boot_jdk_jvmargs+set}" = set; then :
15642  withval=$with_boot_jdk_jvmargs;
15643fi
15644
15645
15646if test "x$with_boot_jdk_jvmargs" = x; then
15647    # Not all JVM:s accept the same arguments on the command line.
15648    # OpenJDK specific increase in thread stack for JDK build,
15649    # well more specifically, when running javac.
15650    if test "x$BUILD_NUM_BITS" = x32; then
15651       STACK_SIZE=768
15652    else
15653       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15654       # since 64-bit pointers are pushed on the stach. Apparently, we need
15655       # to increase the stack space when javacing the JDK....
15656       STACK_SIZE=1536
15657    fi
15658
15659    # Minimum amount of heap memory.
15660
15661    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15662    # If so, then append -Xms64M to boot_jdk_jvmargs
15663    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15664    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15665    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15666        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15667    fi
15668
15669    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15670        # Why does macosx need more heap? Its the huge JDK batch.
15671
15672    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15673    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15674    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15675    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15676    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15677        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15678    fi
15679
15680    else
15681
15682    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15683    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15684    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15685    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15686    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15687        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15688    fi
15689
15690    fi
15691    # When is adding -client something that speeds up the JVM?
15692    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15693
15694    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15695    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15696    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15697    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15698    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15699        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15700    fi
15701
15702
15703    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15704    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15705    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15706    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15707    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15708        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15709    fi
15710
15711
15712    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15713    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15714    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15715    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15716    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15717        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15718    fi
15719
15720    # Disable special log output when a debug build is used as Boot JDK...
15721
15722    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15723    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15724    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15725    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15726    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15727        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15728    fi
15729
15730fi
15731
15732BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15733
15734
15735
15736###############################################################################
15737#
15738# Configure the sources to use. We can add or override individual directories.
15739#
15740###############################################################################
15741
15742
15743
15744# Where are the sources. Any of these can be overridden
15745# using --with-override-corba and the likes.
15746LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15747CORBA_TOPDIR="$SRC_ROOT/corba"
15748JAXP_TOPDIR="$SRC_ROOT/jaxp"
15749JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15750HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15751NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15752JDK_TOPDIR="$SRC_ROOT/jdk"
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763###############################################################################
15764#
15765# Pickup additional source for a component from outside of the source root
15766# or override source for a component.
15767#
15768
15769# Check whether --with-add-source-root was given.
15770if test "${with_add_source_root+set}" = set; then :
15771  withval=$with_add_source_root;
15772fi
15773
15774
15775
15776# Check whether --with-override-source-root was given.
15777if test "${with_override_source_root+set}" = set; then :
15778  withval=$with_override_source_root;
15779fi
15780
15781
15782
15783# Check whether --with-adds-and-overrides was given.
15784if test "${with_adds_and_overrides+set}" = set; then :
15785  withval=$with_adds_and_overrides;
15786fi
15787
15788
15789if test "x$with_adds_and_overrides" != x; then
15790    with_add_source_root="$with_adds_and_overrides/adds"
15791    with_override_source_root="$with_adds_and_overrides/overrides"
15792fi
15793
15794if test "x$with_add_source_root" != x; then
15795    if ! test -d $with_add_source_root; then
15796       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15797    fi
15798    CURDIR="$PWD"
15799    cd "$with_add_source_root"
15800    ADD_SRC_ROOT="`pwd`"
15801    cd "$CURDIR"
15802    # Verify that the addon source root does not have any root makefiles.
15803    # If it does, then it is usually an error, prevent this.
15804    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15805       test -f $with_add_source_root/langtools/make/Makefile; then
15806        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
15807    fi
15808    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15809       test -f $with_add_source_root/corba/make/Makefile; then
15810        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
15811    fi
15812    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15813       test -f $with_add_source_root/jaxp/make/Makefile; then
15814        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
15815    fi
15816    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15817       test -f $with_add_source_root/jaxws/make/Makefile; then
15818        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
15819    fi
15820    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15821       test -f $with_add_source_root/hotspot/make/Makefile; then
15822        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
15823    fi
15824    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15825       test -f $with_add_source_root/jdk/make/Makefile; then
15826        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
15827    fi
15828fi
15829
15830
15831if test "x$with_override_source_root" != x; then
15832    if ! test -d $with_override_source_root; then
15833       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15834    fi
15835    CURDIR="$PWD"
15836    cd "$with_override_source_root"
15837    OVERRIDE_SRC_ROOT="`pwd`"
15838    cd "$CURDIR"
15839    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15840       test -f $with_override_source_root/langtools/make/Makefile; then
15841        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
15842    fi
15843    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15844       test -f $with_override_source_root/corba/make/Makefile; then
15845        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
15846    fi
15847    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15848       test -f $with_override_source_root/jaxp/make/Makefile; then
15849        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
15850    fi
15851    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15852       test -f $with_override_source_root/jaxws/make/Makefile; then
15853        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
15854    fi
15855    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15856       test -f $with_override_source_root/hotspot/make/Makefile; then
15857        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
15858    fi
15859    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15860       test -f $with_override_source_root/jdk/make/Makefile; then
15861        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
15862    fi
15863fi
15864
15865
15866###############################################################################
15867#
15868# Override a repo completely, this is used for example when you have 3 small
15869# development sandboxes of the langtools sources and want to avoid having 3 full
15870# OpenJDK sources checked out on disk.
15871#
15872# Assuming that the 3 langtools sandboxes are located here:
15873# /home/fredrik/sandbox1/langtools
15874# /home/fredrik/sandbox2/langtools
15875# /home/fredrik/sandbox3/langtools
15876#
15877# From the source root you create build subdirs manually:
15878#     mkdir -p build1 build2 build3
15879# in each build directory run:
15880#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15881#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15882#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15883#
15884
15885
15886# Check whether --with-override-langtools was given.
15887if test "${with_override_langtools+set}" = set; then :
15888  withval=$with_override_langtools;
15889fi
15890
15891
15892
15893# Check whether --with-override-corba was given.
15894if test "${with_override_corba+set}" = set; then :
15895  withval=$with_override_corba;
15896fi
15897
15898
15899
15900# Check whether --with-override-jaxp was given.
15901if test "${with_override_jaxp+set}" = set; then :
15902  withval=$with_override_jaxp;
15903fi
15904
15905
15906
15907# Check whether --with-override-jaxws was given.
15908if test "${with_override_jaxws+set}" = set; then :
15909  withval=$with_override_jaxws;
15910fi
15911
15912
15913
15914# Check whether --with-override-hotspot was given.
15915if test "${with_override_hotspot+set}" = set; then :
15916  withval=$with_override_hotspot;
15917fi
15918
15919
15920
15921# Check whether --with-override-jdk was given.
15922if test "${with_override_jdk+set}" = set; then :
15923  withval=$with_override_jdk;
15924fi
15925
15926
15927if test "x$with_override_langtools" != x; then
15928    CURDIR="$PWD"
15929    cd "$with_override_langtools"
15930    LANGTOOLS_TOPDIR="`pwd`"
15931    cd "$CURDIR"
15932    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15933        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15934    fi
15935    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15936$as_echo_n "checking if langtools should be overridden... " >&6; }
15937    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15938$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15939fi
15940if test "x$with_override_corba" != x; then
15941    CURDIR="$PWD"
15942    cd "$with_override_corba"
15943    CORBA_TOPDIR="`pwd`"
15944    cd "$CURDIR"
15945    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15946        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15947    fi
15948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15949$as_echo_n "checking if corba should be overridden... " >&6; }
15950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15951$as_echo "yes with $CORBA_TOPDIR" >&6; }
15952fi
15953if test "x$with_override_jaxp" != x; then
15954    CURDIR="$PWD"
15955    cd "$with_override_jaxp"
15956    JAXP_TOPDIR="`pwd`"
15957    cd "$CURDIR"
15958    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15959        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15960    fi
15961    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15962$as_echo_n "checking if jaxp should be overridden... " >&6; }
15963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15964$as_echo "yes with $JAXP_TOPDIR" >&6; }
15965fi
15966if test "x$with_override_jaxws" != x; then
15967    CURDIR="$PWD"
15968    cd "$with_override_jaxws"
15969    JAXWS_TOPDIR="`pwd`"
15970    cd "$CURDIR"
15971    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15972        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15973    fi
15974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15975$as_echo_n "checking if jaxws should be overridden... " >&6; }
15976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15977$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15978fi
15979if test "x$with_override_hotspot" != x; then
15980    CURDIR="$PWD"
15981    cd "$with_override_hotspot"
15982    HOTSPOT_TOPDIR="`pwd`"
15983    cd "$CURDIR"
15984    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15985       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15986        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15987    fi
15988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15989$as_echo_n "checking if hotspot should be overridden... " >&6; }
15990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15991$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15992fi
15993if test "x$with_override_nashorn" != x; then
15994    CURDIR="$PWD"
15995    cd "$with_override_nashorn"
15996    NASHORN_TOPDIR="`pwd`"
15997    cd "$CURDIR"
15998    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
15999        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16000    fi
16001    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16002$as_echo_n "checking if nashorn should be overridden... " >&6; }
16003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16004$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16005fi
16006if test "x$with_override_jdk" != x; then
16007    CURDIR="$PWD"
16008    cd "$with_override_jdk"
16009    JDK_TOPDIR="`pwd`"
16010    cd "$CURDIR"
16011    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16012        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16013    fi
16014    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16015$as_echo_n "checking if JDK should be overridden... " >&6; }
16016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16017$as_echo "yes with $JDK_TOPDIR" >&6; }
16018fi
16019
16020
16021
16022BUILD_OUTPUT="$OUTPUT_ROOT"
16023
16024
16025HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16026BUILD_HOTSPOT=true
16027
16028
16029
16030# Check whether --with-import-hotspot was given.
16031if test "${with_import_hotspot+set}" = set; then :
16032  withval=$with_import_hotspot;
16033fi
16034
16035if test "x$with_import_hotspot" != x; then
16036    CURDIR="$PWD"
16037    cd "$with_import_hotspot"
16038    HOTSPOT_DIST="`pwd`"
16039    cd "$CURDIR"
16040    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16041        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16042    fi
16043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16044$as_echo_n "checking if hotspot should be imported... " >&6; }
16045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16046$as_echo "yes from $HOTSPOT_DIST" >&6; }
16047    BUILD_HOTSPOT=false
16048fi
16049
16050JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16051
16052
16053###############################################################################
16054#
16055# Setup the toolchain (compilers etc), i.e. the tools that need to be
16056# cross-compilation aware.
16057#
16058###############################################################################
16059
16060
16061###############################################################################
16062#
16063# Configure the development tool paths and potential sysroot.
16064#
16065ac_ext=cpp
16066ac_cpp='$CXXCPP $CPPFLAGS'
16067ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16068ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16069ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16070
16071
16072# The option used to specify the target .o,.a or .so file.
16073# When compiling, how to specify the to be created object file.
16074CC_OUT_OPTION='-o$(SPACE)'
16075# When linking, how to specify the to be created executable.
16076EXE_OUT_OPTION='-o$(SPACE)'
16077# When linking, how to specify the to be created dynamically linkable library.
16078LD_OUT_OPTION='-o$(SPACE)'
16079# When archiving, how to specify the to be create static archive for object files.
16080AR_OUT_OPTION='rcs$(SPACE)'
16081
16082
16083
16084
16085
16086# Locate the actual tools
16087
16088if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16089
16090  # Store path to cygwin link.exe to help excluding it when searching for
16091  # VS linker. This must be done before changing the PATH when looking for VS.
16092  # Extract the first word of "link", so it can be a program name with args.
16093set dummy link; ac_word=$2
16094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16095$as_echo_n "checking for $ac_word... " >&6; }
16096if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16097  $as_echo_n "(cached) " >&6
16098else
16099  case $CYGWIN_LINK in
16100  [\\/]* | ?:[\\/]*)
16101  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16102  ;;
16103  *)
16104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16105for as_dir in $PATH
16106do
16107  IFS=$as_save_IFS
16108  test -z "$as_dir" && as_dir=.
16109    for ac_exec_ext in '' $ac_executable_extensions; do
16110  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16111    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16113    break 2
16114  fi
16115done
16116  done
16117IFS=$as_save_IFS
16118
16119  ;;
16120esac
16121fi
16122CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16123if test -n "$CYGWIN_LINK"; then
16124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16125$as_echo "$CYGWIN_LINK" >&6; }
16126else
16127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16128$as_echo "no" >&6; }
16129fi
16130
16131
16132  if test "x$CYGWIN_LINK" != x; then
16133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16134$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16135    "$CYGWIN_LINK" --version > /dev/null
16136    if test $? -eq 0 ; then
16137      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16138$as_echo "yes" >&6; }
16139    else
16140      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16141$as_echo "no" >&6; }
16142      # This might be the VS linker. Don't exclude it later on.
16143      CYGWIN_LINK=""
16144    fi
16145  fi
16146
16147  # First-hand choice is to locate and run the vsvars bat file.
16148
16149  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16150    VCVARSFILE="vc/bin/vcvars32.bat"
16151  else
16152    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16153  fi
16154
16155  VS_ENV_CMD=""
16156  VS_ENV_ARGS=""
16157  if test "x$with_toolsdir" != x; then
16158
16159  if test "x$VS_ENV_CMD" = x; then
16160    VS100BASE="$with_toolsdir/../.."
16161    METHOD="--with-tools-dir"
16162
16163  windows_path="$VS100BASE"
16164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16165    unix_path=`$CYGPATH -u "$windows_path"`
16166    VS100BASE="$unix_path"
16167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16169    VS100BASE="$unix_path"
16170  fi
16171
16172    if test -d "$VS100BASE"; then
16173      if test -f "$VS100BASE/$VCVARSFILE"; then
16174        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16175$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16176        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16177      else
16178        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16179$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16180        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16181$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16182      fi
16183    fi
16184  fi
16185
16186  fi
16187
16188  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16189    # Having specified an argument which is incorrect will produce an instant failure;
16190    # we should not go on looking
16191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16192$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16193    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16194$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16195    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16196  fi
16197
16198  if test "x$ProgramW6432" != x; then
16199
16200  if test "x$VS_ENV_CMD" = x; then
16201    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16202    METHOD="well-known name"
16203
16204  windows_path="$WIN_SDK_BASE"
16205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16206    unix_path=`$CYGPATH -u "$windows_path"`
16207    WIN_SDK_BASE="$unix_path"
16208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16210    WIN_SDK_BASE="$unix_path"
16211  fi
16212
16213    if test -d "$WIN_SDK_BASE"; then
16214      # There have been cases of partial or broken SDK installations. A missing
16215      # lib dir is not going to work.
16216      if test ! -d "$WIN_SDK_BASE/../lib"; then
16217        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16218$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16219        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16220$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16221      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16222        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16223$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16224        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16225        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16226          VS_ENV_ARGS="/x86"
16227        else
16228          VS_ENV_ARGS="/x64"
16229        fi
16230      else
16231        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16232$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16233        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16234$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16235      fi
16236    fi
16237  fi
16238
16239  fi
16240  if test "x$PROGRAMW6432" != x; then
16241
16242  if test "x$VS_ENV_CMD" = x; then
16243    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16244    METHOD="well-known name"
16245
16246  windows_path="$WIN_SDK_BASE"
16247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16248    unix_path=`$CYGPATH -u "$windows_path"`
16249    WIN_SDK_BASE="$unix_path"
16250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16252    WIN_SDK_BASE="$unix_path"
16253  fi
16254
16255    if test -d "$WIN_SDK_BASE"; then
16256      # There have been cases of partial or broken SDK installations. A missing
16257      # lib dir is not going to work.
16258      if test ! -d "$WIN_SDK_BASE/../lib"; then
16259        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16260$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16261        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16262$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16263      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16264        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16265$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16266        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16267        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16268          VS_ENV_ARGS="/x86"
16269        else
16270          VS_ENV_ARGS="/x64"
16271        fi
16272      else
16273        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16274$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16275        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16276$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16277      fi
16278    fi
16279  fi
16280
16281  fi
16282  if test "x$PROGRAMFILES" != x; then
16283
16284  if test "x$VS_ENV_CMD" = x; then
16285    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16286    METHOD="well-known name"
16287
16288  windows_path="$WIN_SDK_BASE"
16289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16290    unix_path=`$CYGPATH -u "$windows_path"`
16291    WIN_SDK_BASE="$unix_path"
16292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16294    WIN_SDK_BASE="$unix_path"
16295  fi
16296
16297    if test -d "$WIN_SDK_BASE"; then
16298      # There have been cases of partial or broken SDK installations. A missing
16299      # lib dir is not going to work.
16300      if test ! -d "$WIN_SDK_BASE/../lib"; then
16301        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16302$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16303        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16304$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16305      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16306        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16307$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16308        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16309        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16310          VS_ENV_ARGS="/x86"
16311        else
16312          VS_ENV_ARGS="/x64"
16313        fi
16314      else
16315        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16316$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16317        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16318$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16319      fi
16320    fi
16321  fi
16322
16323  fi
16324
16325  if test "x$VS_ENV_CMD" = x; then
16326    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16327    METHOD="well-known name"
16328
16329  windows_path="$WIN_SDK_BASE"
16330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16331    unix_path=`$CYGPATH -u "$windows_path"`
16332    WIN_SDK_BASE="$unix_path"
16333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16335    WIN_SDK_BASE="$unix_path"
16336  fi
16337
16338    if test -d "$WIN_SDK_BASE"; then
16339      # There have been cases of partial or broken SDK installations. A missing
16340      # lib dir is not going to work.
16341      if test ! -d "$WIN_SDK_BASE/../lib"; then
16342        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16343$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16344        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16345$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16346      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16347        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16348$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16349        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16350        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16351          VS_ENV_ARGS="/x86"
16352        else
16353          VS_ENV_ARGS="/x64"
16354        fi
16355      else
16356        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16357$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16358        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16359$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16360      fi
16361    fi
16362  fi
16363
16364
16365  if test "x$VS_ENV_CMD" = x; then
16366    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16367    METHOD="well-known name"
16368
16369  windows_path="$WIN_SDK_BASE"
16370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16371    unix_path=`$CYGPATH -u "$windows_path"`
16372    WIN_SDK_BASE="$unix_path"
16373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16375    WIN_SDK_BASE="$unix_path"
16376  fi
16377
16378    if test -d "$WIN_SDK_BASE"; then
16379      # There have been cases of partial or broken SDK installations. A missing
16380      # lib dir is not going to work.
16381      if test ! -d "$WIN_SDK_BASE/../lib"; then
16382        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16383$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16384        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16385$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16386      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16387        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16388$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16389        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16390        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16391          VS_ENV_ARGS="/x86"
16392        else
16393          VS_ENV_ARGS="/x64"
16394        fi
16395      else
16396        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16397$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16398        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16399$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16400      fi
16401    fi
16402  fi
16403
16404
16405  if test "x$VS100COMNTOOLS" != x; then
16406
16407  if test "x$VS_ENV_CMD" = x; then
16408    VS100BASE="$VS100COMNTOOLS/../.."
16409    METHOD="VS100COMNTOOLS variable"
16410
16411  windows_path="$VS100BASE"
16412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16413    unix_path=`$CYGPATH -u "$windows_path"`
16414    VS100BASE="$unix_path"
16415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16417    VS100BASE="$unix_path"
16418  fi
16419
16420    if test -d "$VS100BASE"; then
16421      if test -f "$VS100BASE/$VCVARSFILE"; then
16422        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16423$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16424        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16425      else
16426        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16427$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16428        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16429$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16430      fi
16431    fi
16432  fi
16433
16434  fi
16435  if test "x$PROGRAMFILES" != x; then
16436
16437  if test "x$VS_ENV_CMD" = x; then
16438    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16439    METHOD="well-known name"
16440
16441  windows_path="$VS100BASE"
16442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16443    unix_path=`$CYGPATH -u "$windows_path"`
16444    VS100BASE="$unix_path"
16445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16447    VS100BASE="$unix_path"
16448  fi
16449
16450    if test -d "$VS100BASE"; then
16451      if test -f "$VS100BASE/$VCVARSFILE"; then
16452        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16453$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16454        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16455      else
16456        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16457$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16458        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16459$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16460      fi
16461    fi
16462  fi
16463
16464  fi
16465
16466  if test "x$VS_ENV_CMD" = x; then
16467    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16468    METHOD="well-known name"
16469
16470  windows_path="$VS100BASE"
16471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16472    unix_path=`$CYGPATH -u "$windows_path"`
16473    VS100BASE="$unix_path"
16474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16476    VS100BASE="$unix_path"
16477  fi
16478
16479    if test -d "$VS100BASE"; then
16480      if test -f "$VS100BASE/$VCVARSFILE"; then
16481        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16482$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16483        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16484      else
16485        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16486$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16487        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16488$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16489      fi
16490    fi
16491  fi
16492
16493
16494  if test "x$VS_ENV_CMD" = x; then
16495    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16496    METHOD="well-known name"
16497
16498  windows_path="$VS100BASE"
16499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16500    unix_path=`$CYGPATH -u "$windows_path"`
16501    VS100BASE="$unix_path"
16502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16504    VS100BASE="$unix_path"
16505  fi
16506
16507    if test -d "$VS100BASE"; then
16508      if test -f "$VS100BASE/$VCVARSFILE"; then
16509        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16510$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16511        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16512      else
16513        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16514$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16515        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16516$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16517      fi
16518    fi
16519  fi
16520
16521
16522  if test "x$VS_ENV_CMD" != x; then
16523    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16524
16525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16526
16527  # First separate the path from the arguments. This will split at the first
16528  # space.
16529  complete="$VS_ENV_CMD"
16530  path="${complete%% *}"
16531  tmp="$complete EOL"
16532  arguments="${tmp#* }"
16533
16534  # Input might be given as Windows format, start by converting to
16535  # unix format.
16536  new_path=`$CYGPATH -u "$path"`
16537
16538  # Now try to locate executable using which
16539  new_path=`$WHICH "$new_path" 2> /dev/null`
16540  # bat and cmd files are not always considered executable in cygwin causing which
16541  # to not find them
16542  if test "x$new_path" = x \
16543           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16544           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16545    new_path=`$CYGPATH -u "$path"`
16546  fi
16547  if test "x$new_path" = x; then
16548    # Oops. Which didn't find the executable.
16549    # The splitting of arguments from the executable at a space might have been incorrect,
16550    # since paths with space are more likely in Windows. Give it another try with the whole
16551    # argument.
16552    path="$complete"
16553    arguments="EOL"
16554    new_path=`$CYGPATH -u "$path"`
16555    new_path=`$WHICH "$new_path" 2> /dev/null`
16556    # bat and cmd files are not always considered executable in cygwin causing which
16557    # to not find them
16558    if test "x$new_path" = x \
16559             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16560             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16561      new_path=`$CYGPATH -u "$path"`
16562    fi
16563    if test "x$new_path" = x; then
16564      # It's still not found. Now this is an unrecoverable error.
16565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16566$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16567      has_space=`$ECHO "$complete" | $GREP " "`
16568      if test "x$has_space" != x; then
16569        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16570$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16571      fi
16572      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16573    fi
16574  fi
16575
16576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16579  # "foo.exe" is OK but "foo" is an error.
16580  #
16581  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16582  # It is also a way to make sure we got the proper file name for the real test later on.
16583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16584  if test "x$test_shortpath" = x; then
16585    # Short path failed, file does not exist as specified.
16586    # Try adding .exe or .cmd
16587    if test -f "${new_path}.exe"; then
16588       input_to_shortpath="${new_path}.exe"
16589    elif test -f "${new_path}.cmd"; then
16590       input_to_shortpath="${new_path}.cmd"
16591    else
16592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16593$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16594      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16595$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16596      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16597    fi
16598  else
16599    input_to_shortpath="$new_path"
16600  fi
16601
16602  # Call helper function which possibly converts this using DOS-style short mode.
16603  # If so, the updated path is stored in $new_path.
16604  new_path="$input_to_shortpath"
16605
16606  input_path="$input_to_shortpath"
16607  # Check if we need to convert this using DOS-style short mode. If the path
16608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16609  # take no chances and rewrite it.
16610  # Note: m4 eats our [], so we need to use [ and ] instead.
16611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16612  if test "x$has_forbidden_chars" != x; then
16613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16617      # Going to short mode and back again did indeed matter. Since short mode is
16618      # case insensitive, let's make it lowercase to improve readability.
16619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16620      # Now convert it back to Unix-stile (cygpath)
16621      input_path=`$CYGPATH -u "$shortmode_path"`
16622      new_path="$input_path"
16623    fi
16624  fi
16625
16626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16627  if test "x$test_cygdrive_prefix" = x; then
16628    # As a simple fix, exclude /usr/bin since it's not a real path.
16629    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16631      # a path prefixed by /cygdrive for fixpath to work.
16632      new_path="$CYGWIN_ROOT_PATH$input_path"
16633    fi
16634  fi
16635
16636  # remove trailing .exe if any
16637  new_path="${new_path/%.exe/}"
16638
16639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16640
16641  # First separate the path from the arguments. This will split at the first
16642  # space.
16643  complete="$VS_ENV_CMD"
16644  path="${complete%% *}"
16645  tmp="$complete EOL"
16646  arguments="${tmp#* }"
16647
16648  # Input might be given as Windows format, start by converting to
16649  # unix format.
16650  new_path="$path"
16651
16652  windows_path="$new_path"
16653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16654    unix_path=`$CYGPATH -u "$windows_path"`
16655    new_path="$unix_path"
16656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16658    new_path="$unix_path"
16659  fi
16660
16661
16662  # Now try to locate executable using which
16663  new_path=`$WHICH "$new_path" 2> /dev/null`
16664
16665  if test "x$new_path" = x; then
16666    # Oops. Which didn't find the executable.
16667    # The splitting of arguments from the executable at a space might have been incorrect,
16668    # since paths with space are more likely in Windows. Give it another try with the whole
16669    # argument.
16670    path="$complete"
16671    arguments="EOL"
16672    new_path="$path"
16673
16674  windows_path="$new_path"
16675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16676    unix_path=`$CYGPATH -u "$windows_path"`
16677    new_path="$unix_path"
16678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16680    new_path="$unix_path"
16681  fi
16682
16683
16684    new_path=`$WHICH "$new_path" 2> /dev/null`
16685
16686    if test "x$new_path" = x; then
16687      # It's still not found. Now this is an unrecoverable error.
16688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16689$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16690      has_space=`$ECHO "$complete" | $GREP " "`
16691      if test "x$has_space" != x; then
16692        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16693$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16694      fi
16695      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16696    fi
16697  fi
16698
16699  # Now new_path has a complete unix path to the binary
16700  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16701    # Keep paths in /bin as-is, but remove trailing .exe if any
16702    new_path="${new_path/%.exe/}"
16703    # Do not save /bin paths to all_fixpath_prefixes!
16704  else
16705    # Not in mixed or Windows style, start by that.
16706    new_path=`cmd //c echo $new_path`
16707
16708  input_path="$new_path"
16709  # Check if we need to convert this using DOS-style short mode. If the path
16710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16711  # take no chances and rewrite it.
16712  # Note: m4 eats our [], so we need to use [ and ] instead.
16713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16714  if test "x$has_forbidden_chars" != x; then
16715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16716    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16717  fi
16718
16719    # Output is in $new_path
16720
16721  windows_path="$new_path"
16722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16723    unix_path=`$CYGPATH -u "$windows_path"`
16724    new_path="$unix_path"
16725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16727    new_path="$unix_path"
16728  fi
16729
16730    # remove trailing .exe if any
16731    new_path="${new_path/%.exe/}"
16732
16733    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16734    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16735  fi
16736
16737  else
16738    # We're on a posix platform. Hooray! :)
16739    # First separate the path from the arguments. This will split at the first
16740    # space.
16741    complete="$VS_ENV_CMD"
16742    path="${complete%% *}"
16743    tmp="$complete EOL"
16744    arguments="${tmp#* }"
16745
16746    # Cannot rely on the command "which" here since it doesn't always work.
16747    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16748    if test -z "$is_absolute_path"; then
16749      # Path to executable is not absolute. Find it.
16750      IFS_save="$IFS"
16751      IFS=:
16752      for p in $PATH; do
16753        if test -f "$p/$path" && test -x "$p/$path"; then
16754          new_path="$p/$path"
16755          break
16756        fi
16757      done
16758      IFS="$IFS_save"
16759    else
16760      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16761$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16762      new_path="$path"
16763    fi
16764
16765    if test "x$new_path" = x; then
16766        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16767$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16768        has_space=`$ECHO "$complete" | $GREP " "`
16769        if test "x$has_space" != x; then
16770          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16771$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16772        fi
16773        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16774      fi
16775  fi
16776
16777      # Now join together the path and the arguments once again
16778      if test "x$arguments" != xEOL; then
16779        new_complete="$new_path ${arguments% *}"
16780      else
16781        new_complete="$new_path"
16782      fi
16783
16784  if test "x$complete" != "x$new_complete"; then
16785      VS_ENV_CMD="$new_complete"
16786      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16787$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16788    fi
16789
16790
16791    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16792    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16793$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16794    cd $OUTPUT_ROOT
16795    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16796    # to autoconf standards.
16797
16798    #----
16799
16800    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16801    # but calculate the difference in Cygwin environment before/after running it and then
16802    # apply the diff.
16803
16804    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16805      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16806      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16807      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16808    else
16809      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16810      _dosbash=`cmd //c echo \`which bash\``
16811    fi
16812
16813    # generate the set of exported vars before/after the vs10 setup
16814    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16815    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16816    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16817    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16818
16819    # Now execute the newly created bat file.
16820    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16821    cmd /c localdevenvtmp.bat | cat
16822
16823    # apply the diff (less some non-vs10 vars named by "!")
16824    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16825    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16826    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16827
16828    # cleanup
16829    $RM localdevenvtmp*
16830    #----
16831    cd $CURDIR
16832    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16833      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16834$as_echo "no" >&6; }
16835      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16836$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16837      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16838$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16839      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16840$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16841      as_fn_error $? "Cannot continue" "$LINENO" 5
16842    fi
16843
16844    # Now set all paths and other env variables. This will allow the rest of
16845    # the configure script to find and run the compiler in the proper way.
16846    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16847$as_echo "$as_me: Setting extracted environment variables" >&6;}
16848    . $OUTPUT_ROOT/localdevenv.sh
16849  else
16850    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16851    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16852$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16853  fi
16854
16855  # At this point, we should have corrent variables in the environment, or we can't continue.
16856  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16857$as_echo_n "checking for Visual Studio variables... " >&6; }
16858
16859  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16860    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16862$as_echo "present but broken" >&6; }
16863      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16864    else
16865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16866$as_echo "ok" >&6; }
16867      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16868      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16869      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16870      VS_PATH="$PATH"
16871
16872
16873
16874    fi
16875  else
16876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16877$as_echo "not found" >&6; }
16878
16879    if test "x$VS_ENV_CMD" = x; then
16880      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16881$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16882      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16883$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16884    else
16885      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16886$as_echo "$as_me: Running the extraction script failed." >&6;}
16887    fi
16888    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16889$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16890    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16891$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16892    as_fn_error $? "Cannot continue" "$LINENO" 5
16893  fi
16894
16895  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16896$as_echo_n "checking for msvcr100.dll... " >&6; }
16897
16898# Check whether --with-msvcr-dll was given.
16899if test "${with_msvcr_dll+set}" = set; then :
16900  withval=$with_msvcr_dll;
16901fi
16902
16903  if test "x$with_msvcr_dll" != x; then
16904    MSVCR_DLL="$with_msvcr_dll"
16905  else
16906    if test "x$VCINSTALLDIR" != x; then
16907      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16908        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16909      else
16910        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16911        if test "x$MSVCR_DLL" = x; then
16912          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16913        fi
16914      fi
16915      if test "x$MSVCR_DLL" != x; then
16916        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16917$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16918      else
16919        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16920$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16921      fi
16922    fi
16923    if test "x$MSVCR_DLL" = x; then
16924      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16925        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16926$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16927        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16928      fi
16929    fi
16930  fi
16931  if test "x$MSVCR_DLL" = x; then
16932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16933$as_echo "no" >&6; }
16934    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16935  fi
16936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16937$as_echo "$MSVCR_DLL" >&6; }
16938
16939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16940
16941  # Input might be given as Windows format, start by converting to
16942  # unix format.
16943  path="$MSVCR_DLL"
16944  new_path=`$CYGPATH -u "$path"`
16945
16946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16949  # "foo.exe" is OK but "foo" is an error.
16950  #
16951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16952  # It is also a way to make sure we got the proper file name for the real test later on.
16953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16954  if test "x$test_shortpath" = x; then
16955    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16956$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16957    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16958  fi
16959
16960  # Call helper function which possibly converts this using DOS-style short mode.
16961  # If so, the updated path is stored in $new_path.
16962
16963  input_path="$new_path"
16964  # Check if we need to convert this using DOS-style short mode. If the path
16965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16966  # take no chances and rewrite it.
16967  # Note: m4 eats our [], so we need to use [ and ] instead.
16968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16969  if test "x$has_forbidden_chars" != x; then
16970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16974      # Going to short mode and back again did indeed matter. Since short mode is
16975      # case insensitive, let's make it lowercase to improve readability.
16976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16977      # Now convert it back to Unix-stile (cygpath)
16978      input_path=`$CYGPATH -u "$shortmode_path"`
16979      new_path="$input_path"
16980    fi
16981  fi
16982
16983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16984  if test "x$test_cygdrive_prefix" = x; then
16985    # As a simple fix, exclude /usr/bin since it's not a real path.
16986    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16988      # a path prefixed by /cygdrive for fixpath to work.
16989      new_path="$CYGWIN_ROOT_PATH$input_path"
16990    fi
16991  fi
16992
16993
16994  if test "x$path" != "x$new_path"; then
16995    MSVCR_DLL="$new_path"
16996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16997$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16998  fi
16999
17000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17001
17002  path="$MSVCR_DLL"
17003  has_colon=`$ECHO $path | $GREP ^.:`
17004  new_path="$path"
17005  if test "x$has_colon" = x; then
17006    # Not in mixed or Windows style, start by that.
17007    new_path=`cmd //c echo $path`
17008  fi
17009
17010
17011  input_path="$new_path"
17012  # Check if we need to convert this using DOS-style short mode. If the path
17013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17014  # take no chances and rewrite it.
17015  # Note: m4 eats our [], so we need to use [ and ] instead.
17016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17017  if test "x$has_forbidden_chars" != x; then
17018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17020  fi
17021
17022
17023  windows_path="$new_path"
17024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17025    unix_path=`$CYGPATH -u "$windows_path"`
17026    new_path="$unix_path"
17027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17029    new_path="$unix_path"
17030  fi
17031
17032  if test "x$path" != "x$new_path"; then
17033    MSVCR_DLL="$new_path"
17034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17035$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17036  fi
17037
17038  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17039  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17040
17041  else
17042    # We're on a posix platform. Hooray! :)
17043    path="$MSVCR_DLL"
17044
17045    if test ! -f "$path" && test ! -d "$path"; then
17046      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17047    fi
17048
17049    has_space=`$ECHO "$path" | $GREP " "`
17050    if test "x$has_space" != x; then
17051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17052$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17053      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17054    fi
17055  fi
17056
17057
17058
17059
17060# Check whether --with-dxsdk was given.
17061if test "${with_dxsdk+set}" = set; then :
17062  withval=$with_dxsdk;
17063fi
17064
17065
17066# Check whether --with-dxsdk-lib was given.
17067if test "${with_dxsdk_lib+set}" = set; then :
17068  withval=$with_dxsdk_lib;
17069fi
17070
17071
17072# Check whether --with-dxsdk-include was given.
17073if test "${with_dxsdk_include+set}" = set; then :
17074  withval=$with_dxsdk_include;
17075fi
17076
17077
17078  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17079$as_echo_n "checking for DirectX SDK... " >&6; }
17080
17081  if test "x$with_dxsdk" != x; then
17082    dxsdk_path="$with_dxsdk"
17083  elif test "x$DXSDK_DIR" != x; then
17084    dxsdk_path="$DXSDK_DIR"
17085  elif test -d "C:/DXSDK"; then
17086    dxsdk_path="C:/DXSDK"
17087  else
17088    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17089  fi
17090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17091$as_echo "$dxsdk_path" >&6; }
17092
17093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17094
17095  # Input might be given as Windows format, start by converting to
17096  # unix format.
17097  path="$dxsdk_path"
17098  new_path=`$CYGPATH -u "$path"`
17099
17100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17103  # "foo.exe" is OK but "foo" is an error.
17104  #
17105  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17106  # It is also a way to make sure we got the proper file name for the real test later on.
17107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17108  if test "x$test_shortpath" = x; then
17109    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17110$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17111    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17112  fi
17113
17114  # Call helper function which possibly converts this using DOS-style short mode.
17115  # If so, the updated path is stored in $new_path.
17116
17117  input_path="$new_path"
17118  # Check if we need to convert this using DOS-style short mode. If the path
17119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17120  # take no chances and rewrite it.
17121  # Note: m4 eats our [], so we need to use [ and ] instead.
17122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17123  if test "x$has_forbidden_chars" != x; then
17124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17128      # Going to short mode and back again did indeed matter. Since short mode is
17129      # case insensitive, let's make it lowercase to improve readability.
17130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17131      # Now convert it back to Unix-stile (cygpath)
17132      input_path=`$CYGPATH -u "$shortmode_path"`
17133      new_path="$input_path"
17134    fi
17135  fi
17136
17137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17138  if test "x$test_cygdrive_prefix" = x; then
17139    # As a simple fix, exclude /usr/bin since it's not a real path.
17140    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17142      # a path prefixed by /cygdrive for fixpath to work.
17143      new_path="$CYGWIN_ROOT_PATH$input_path"
17144    fi
17145  fi
17146
17147
17148  if test "x$path" != "x$new_path"; then
17149    dxsdk_path="$new_path"
17150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17151$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17152  fi
17153
17154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17155
17156  path="$dxsdk_path"
17157  has_colon=`$ECHO $path | $GREP ^.:`
17158  new_path="$path"
17159  if test "x$has_colon" = x; then
17160    # Not in mixed or Windows style, start by that.
17161    new_path=`cmd //c echo $path`
17162  fi
17163
17164
17165  input_path="$new_path"
17166  # Check if we need to convert this using DOS-style short mode. If the path
17167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17168  # take no chances and rewrite it.
17169  # Note: m4 eats our [], so we need to use [ and ] instead.
17170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17171  if test "x$has_forbidden_chars" != x; then
17172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17174  fi
17175
17176
17177  windows_path="$new_path"
17178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17179    unix_path=`$CYGPATH -u "$windows_path"`
17180    new_path="$unix_path"
17181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17183    new_path="$unix_path"
17184  fi
17185
17186  if test "x$path" != "x$new_path"; then
17187    dxsdk_path="$new_path"
17188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17189$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17190  fi
17191
17192  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17193  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17194
17195  else
17196    # We're on a posix platform. Hooray! :)
17197    path="$dxsdk_path"
17198
17199    if test ! -f "$path" && test ! -d "$path"; then
17200      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17201    fi
17202
17203    has_space=`$ECHO "$path" | $GREP " "`
17204    if test "x$has_space" != x; then
17205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17206$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17207      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17208    fi
17209  fi
17210
17211
17212  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17213$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17214  if test "x$with_dxsdk_lib" != x; then
17215    DXSDK_LIB_PATH="$with_dxsdk_lib"
17216  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17217    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17218  else
17219    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17220  fi
17221  # dsound.lib is linked to in jsoundds
17222  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17223    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17224  fi
17225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17226$as_echo "$DXSDK_LIB_PATH" >&6; }
17227
17228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17229
17230  # Input might be given as Windows format, start by converting to
17231  # unix format.
17232  path="$DXSDK_LIB_PATH"
17233  new_path=`$CYGPATH -u "$path"`
17234
17235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17238  # "foo.exe" is OK but "foo" is an error.
17239  #
17240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17241  # It is also a way to make sure we got the proper file name for the real test later on.
17242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17243  if test "x$test_shortpath" = x; then
17244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17245$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17246    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17247  fi
17248
17249  # Call helper function which possibly converts this using DOS-style short mode.
17250  # If so, the updated path is stored in $new_path.
17251
17252  input_path="$new_path"
17253  # Check if we need to convert this using DOS-style short mode. If the path
17254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17255  # take no chances and rewrite it.
17256  # Note: m4 eats our [], so we need to use [ and ] instead.
17257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17258  if test "x$has_forbidden_chars" != x; then
17259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17263      # Going to short mode and back again did indeed matter. Since short mode is
17264      # case insensitive, let's make it lowercase to improve readability.
17265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17266      # Now convert it back to Unix-stile (cygpath)
17267      input_path=`$CYGPATH -u "$shortmode_path"`
17268      new_path="$input_path"
17269    fi
17270  fi
17271
17272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17273  if test "x$test_cygdrive_prefix" = x; then
17274    # As a simple fix, exclude /usr/bin since it's not a real path.
17275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17277      # a path prefixed by /cygdrive for fixpath to work.
17278      new_path="$CYGWIN_ROOT_PATH$input_path"
17279    fi
17280  fi
17281
17282
17283  if test "x$path" != "x$new_path"; then
17284    DXSDK_LIB_PATH="$new_path"
17285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17286$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17287  fi
17288
17289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17290
17291  path="$DXSDK_LIB_PATH"
17292  has_colon=`$ECHO $path | $GREP ^.:`
17293  new_path="$path"
17294  if test "x$has_colon" = x; then
17295    # Not in mixed or Windows style, start by that.
17296    new_path=`cmd //c echo $path`
17297  fi
17298
17299
17300  input_path="$new_path"
17301  # Check if we need to convert this using DOS-style short mode. If the path
17302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17303  # take no chances and rewrite it.
17304  # Note: m4 eats our [], so we need to use [ and ] instead.
17305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17306  if test "x$has_forbidden_chars" != x; then
17307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17309  fi
17310
17311
17312  windows_path="$new_path"
17313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17314    unix_path=`$CYGPATH -u "$windows_path"`
17315    new_path="$unix_path"
17316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17318    new_path="$unix_path"
17319  fi
17320
17321  if test "x$path" != "x$new_path"; then
17322    DXSDK_LIB_PATH="$new_path"
17323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17324$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17325  fi
17326
17327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17329
17330  else
17331    # We're on a posix platform. Hooray! :)
17332    path="$DXSDK_LIB_PATH"
17333
17334    if test ! -f "$path" && test ! -d "$path"; then
17335      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17336    fi
17337
17338    has_space=`$ECHO "$path" | $GREP " "`
17339    if test "x$has_space" != x; then
17340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17341$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17342      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17343    fi
17344  fi
17345
17346
17347  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17348$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17349  if test "x$with_dxsdk_include" != x; then
17350    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17351  else
17352    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17353  fi
17354  # dsound.h is included in jsoundds
17355  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17356    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17357  fi
17358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17359$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17360
17361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17362
17363  # Input might be given as Windows format, start by converting to
17364  # unix format.
17365  path="$DXSDK_INCLUDE_PATH"
17366  new_path=`$CYGPATH -u "$path"`
17367
17368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17371  # "foo.exe" is OK but "foo" is an error.
17372  #
17373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17374  # It is also a way to make sure we got the proper file name for the real test later on.
17375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17376  if test "x$test_shortpath" = x; then
17377    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17378$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17379    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17380  fi
17381
17382  # Call helper function which possibly converts this using DOS-style short mode.
17383  # If so, the updated path is stored in $new_path.
17384
17385  input_path="$new_path"
17386  # Check if we need to convert this using DOS-style short mode. If the path
17387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17388  # take no chances and rewrite it.
17389  # Note: m4 eats our [], so we need to use [ and ] instead.
17390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17391  if test "x$has_forbidden_chars" != x; then
17392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17396      # Going to short mode and back again did indeed matter. Since short mode is
17397      # case insensitive, let's make it lowercase to improve readability.
17398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17399      # Now convert it back to Unix-stile (cygpath)
17400      input_path=`$CYGPATH -u "$shortmode_path"`
17401      new_path="$input_path"
17402    fi
17403  fi
17404
17405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17406  if test "x$test_cygdrive_prefix" = x; then
17407    # As a simple fix, exclude /usr/bin since it's not a real path.
17408    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17410      # a path prefixed by /cygdrive for fixpath to work.
17411      new_path="$CYGWIN_ROOT_PATH$input_path"
17412    fi
17413  fi
17414
17415
17416  if test "x$path" != "x$new_path"; then
17417    DXSDK_INCLUDE_PATH="$new_path"
17418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17419$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17420  fi
17421
17422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17423
17424  path="$DXSDK_INCLUDE_PATH"
17425  has_colon=`$ECHO $path | $GREP ^.:`
17426  new_path="$path"
17427  if test "x$has_colon" = x; then
17428    # Not in mixed or Windows style, start by that.
17429    new_path=`cmd //c echo $path`
17430  fi
17431
17432
17433  input_path="$new_path"
17434  # Check if we need to convert this using DOS-style short mode. If the path
17435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17436  # take no chances and rewrite it.
17437  # Note: m4 eats our [], so we need to use [ and ] instead.
17438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17439  if test "x$has_forbidden_chars" != x; then
17440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17442  fi
17443
17444
17445  windows_path="$new_path"
17446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17447    unix_path=`$CYGPATH -u "$windows_path"`
17448    new_path="$unix_path"
17449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17451    new_path="$unix_path"
17452  fi
17453
17454  if test "x$path" != "x$new_path"; then
17455    DXSDK_INCLUDE_PATH="$new_path"
17456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17457$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17458  fi
17459
17460  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17461  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17462
17463  else
17464    # We're on a posix platform. Hooray! :)
17465    path="$DXSDK_INCLUDE_PATH"
17466
17467    if test ! -f "$path" && test ! -d "$path"; then
17468      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17469    fi
17470
17471    has_space=`$ECHO "$path" | $GREP " "`
17472    if test "x$has_space" != x; then
17473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17474$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17475      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17476    fi
17477  fi
17478
17479
17480
17481
17482  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17483
17484fi
17485
17486
17487
17488# If --build AND --host is set, then the configure script will find any
17489# cross compilation tools in the PATH. Cross compilation tools
17490# follows the cross compilation standard where they are prefixed with ${host}.
17491# For example the binary i686-sun-solaris2.10-gcc
17492# will cross compile for i686-sun-solaris2.10
17493# If neither of build and host is not set, then build=host and the
17494# default compiler found in the path will be used.
17495# Setting only --host, does not seem to be really supported.
17496# Please set both --build and --host if you want to cross compile.
17497
17498if test "x$COMPILE_TYPE" = "xcross"; then
17499    # Now we to find a C/C++ compiler that can build executables for the build
17500    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17501    # once. Also, we need to do this before adding a tools dir to the path,
17502    # otherwise we might pick up cross-compilers which don't use standard naming.
17503    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17504    # to wait until they are properly discovered.
17505    for ac_prog in cl cc gcc
17506do
17507  # Extract the first word of "$ac_prog", so it can be a program name with args.
17508set dummy $ac_prog; ac_word=$2
17509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17510$as_echo_n "checking for $ac_word... " >&6; }
17511if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17512  $as_echo_n "(cached) " >&6
17513else
17514  case $BUILD_CC in
17515  [\\/]* | ?:[\\/]*)
17516  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17517  ;;
17518  *)
17519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17520for as_dir in $PATH
17521do
17522  IFS=$as_save_IFS
17523  test -z "$as_dir" && as_dir=.
17524    for ac_exec_ext in '' $ac_executable_extensions; do
17525  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17526    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17528    break 2
17529  fi
17530done
17531  done
17532IFS=$as_save_IFS
17533
17534  ;;
17535esac
17536fi
17537BUILD_CC=$ac_cv_path_BUILD_CC
17538if test -n "$BUILD_CC"; then
17539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17540$as_echo "$BUILD_CC" >&6; }
17541else
17542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17543$as_echo "no" >&6; }
17544fi
17545
17546
17547  test -n "$BUILD_CC" && break
17548done
17549
17550
17551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17552
17553  # First separate the path from the arguments. This will split at the first
17554  # space.
17555  complete="$BUILD_CC"
17556  path="${complete%% *}"
17557  tmp="$complete EOL"
17558  arguments="${tmp#* }"
17559
17560  # Input might be given as Windows format, start by converting to
17561  # unix format.
17562  new_path=`$CYGPATH -u "$path"`
17563
17564  # Now try to locate executable using which
17565  new_path=`$WHICH "$new_path" 2> /dev/null`
17566  # bat and cmd files are not always considered executable in cygwin causing which
17567  # to not find them
17568  if test "x$new_path" = x \
17569           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17570           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17571    new_path=`$CYGPATH -u "$path"`
17572  fi
17573  if test "x$new_path" = x; then
17574    # Oops. Which didn't find the executable.
17575    # The splitting of arguments from the executable at a space might have been incorrect,
17576    # since paths with space are more likely in Windows. Give it another try with the whole
17577    # argument.
17578    path="$complete"
17579    arguments="EOL"
17580    new_path=`$CYGPATH -u "$path"`
17581    new_path=`$WHICH "$new_path" 2> /dev/null`
17582    # bat and cmd files are not always considered executable in cygwin causing which
17583    # to not find them
17584    if test "x$new_path" = x \
17585             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17586             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17587      new_path=`$CYGPATH -u "$path"`
17588    fi
17589    if test "x$new_path" = x; then
17590      # It's still not found. Now this is an unrecoverable error.
17591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17592$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17593      has_space=`$ECHO "$complete" | $GREP " "`
17594      if test "x$has_space" != x; then
17595        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17596$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17597      fi
17598      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17599    fi
17600  fi
17601
17602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17605  # "foo.exe" is OK but "foo" is an error.
17606  #
17607  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17608  # It is also a way to make sure we got the proper file name for the real test later on.
17609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17610  if test "x$test_shortpath" = x; then
17611    # Short path failed, file does not exist as specified.
17612    # Try adding .exe or .cmd
17613    if test -f "${new_path}.exe"; then
17614       input_to_shortpath="${new_path}.exe"
17615    elif test -f "${new_path}.cmd"; then
17616       input_to_shortpath="${new_path}.cmd"
17617    else
17618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17619$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17620      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17621$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17622      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17623    fi
17624  else
17625    input_to_shortpath="$new_path"
17626  fi
17627
17628  # Call helper function which possibly converts this using DOS-style short mode.
17629  # If so, the updated path is stored in $new_path.
17630  new_path="$input_to_shortpath"
17631
17632  input_path="$input_to_shortpath"
17633  # Check if we need to convert this using DOS-style short mode. If the path
17634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17635  # take no chances and rewrite it.
17636  # Note: m4 eats our [], so we need to use [ and ] instead.
17637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17638  if test "x$has_forbidden_chars" != x; then
17639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17643      # Going to short mode and back again did indeed matter. Since short mode is
17644      # case insensitive, let's make it lowercase to improve readability.
17645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17646      # Now convert it back to Unix-stile (cygpath)
17647      input_path=`$CYGPATH -u "$shortmode_path"`
17648      new_path="$input_path"
17649    fi
17650  fi
17651
17652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17653  if test "x$test_cygdrive_prefix" = x; then
17654    # As a simple fix, exclude /usr/bin since it's not a real path.
17655    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17657      # a path prefixed by /cygdrive for fixpath to work.
17658      new_path="$CYGWIN_ROOT_PATH$input_path"
17659    fi
17660  fi
17661
17662  # remove trailing .exe if any
17663  new_path="${new_path/%.exe/}"
17664
17665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17666
17667  # First separate the path from the arguments. This will split at the first
17668  # space.
17669  complete="$BUILD_CC"
17670  path="${complete%% *}"
17671  tmp="$complete EOL"
17672  arguments="${tmp#* }"
17673
17674  # Input might be given as Windows format, start by converting to
17675  # unix format.
17676  new_path="$path"
17677
17678  windows_path="$new_path"
17679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17680    unix_path=`$CYGPATH -u "$windows_path"`
17681    new_path="$unix_path"
17682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17684    new_path="$unix_path"
17685  fi
17686
17687
17688  # Now try to locate executable using which
17689  new_path=`$WHICH "$new_path" 2> /dev/null`
17690
17691  if test "x$new_path" = x; then
17692    # Oops. Which didn't find the executable.
17693    # The splitting of arguments from the executable at a space might have been incorrect,
17694    # since paths with space are more likely in Windows. Give it another try with the whole
17695    # argument.
17696    path="$complete"
17697    arguments="EOL"
17698    new_path="$path"
17699
17700  windows_path="$new_path"
17701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17702    unix_path=`$CYGPATH -u "$windows_path"`
17703    new_path="$unix_path"
17704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17706    new_path="$unix_path"
17707  fi
17708
17709
17710    new_path=`$WHICH "$new_path" 2> /dev/null`
17711
17712    if test "x$new_path" = x; then
17713      # It's still not found. Now this is an unrecoverable error.
17714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17715$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17716      has_space=`$ECHO "$complete" | $GREP " "`
17717      if test "x$has_space" != x; then
17718        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17720      fi
17721      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17722    fi
17723  fi
17724
17725  # Now new_path has a complete unix path to the binary
17726  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17727    # Keep paths in /bin as-is, but remove trailing .exe if any
17728    new_path="${new_path/%.exe/}"
17729    # Do not save /bin paths to all_fixpath_prefixes!
17730  else
17731    # Not in mixed or Windows style, start by that.
17732    new_path=`cmd //c echo $new_path`
17733
17734  input_path="$new_path"
17735  # Check if we need to convert this using DOS-style short mode. If the path
17736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17737  # take no chances and rewrite it.
17738  # Note: m4 eats our [], so we need to use [ and ] instead.
17739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17740  if test "x$has_forbidden_chars" != x; then
17741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17742    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17743  fi
17744
17745    # Output is in $new_path
17746
17747  windows_path="$new_path"
17748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17749    unix_path=`$CYGPATH -u "$windows_path"`
17750    new_path="$unix_path"
17751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17753    new_path="$unix_path"
17754  fi
17755
17756    # remove trailing .exe if any
17757    new_path="${new_path/%.exe/}"
17758
17759    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17760    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17761  fi
17762
17763  else
17764    # We're on a posix platform. Hooray! :)
17765    # First separate the path from the arguments. This will split at the first
17766    # space.
17767    complete="$BUILD_CC"
17768    path="${complete%% *}"
17769    tmp="$complete EOL"
17770    arguments="${tmp#* }"
17771
17772    # Cannot rely on the command "which" here since it doesn't always work.
17773    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17774    if test -z "$is_absolute_path"; then
17775      # Path to executable is not absolute. Find it.
17776      IFS_save="$IFS"
17777      IFS=:
17778      for p in $PATH; do
17779        if test -f "$p/$path" && test -x "$p/$path"; then
17780          new_path="$p/$path"
17781          break
17782        fi
17783      done
17784      IFS="$IFS_save"
17785    else
17786      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17787$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17788      new_path="$path"
17789    fi
17790
17791    if test "x$new_path" = x; then
17792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17793$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17794        has_space=`$ECHO "$complete" | $GREP " "`
17795        if test "x$has_space" != x; then
17796          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17797$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17798        fi
17799        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17800      fi
17801  fi
17802
17803      # Now join together the path and the arguments once again
17804      if test "x$arguments" != xEOL; then
17805        new_complete="$new_path ${arguments% *}"
17806      else
17807        new_complete="$new_path"
17808      fi
17809
17810  if test "x$complete" != "x$new_complete"; then
17811      BUILD_CC="$new_complete"
17812      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17813$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17814    fi
17815
17816    for ac_prog in cl CC g++
17817do
17818  # Extract the first word of "$ac_prog", so it can be a program name with args.
17819set dummy $ac_prog; ac_word=$2
17820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17821$as_echo_n "checking for $ac_word... " >&6; }
17822if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17823  $as_echo_n "(cached) " >&6
17824else
17825  case $BUILD_CXX in
17826  [\\/]* | ?:[\\/]*)
17827  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17828  ;;
17829  *)
17830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17831for as_dir in $PATH
17832do
17833  IFS=$as_save_IFS
17834  test -z "$as_dir" && as_dir=.
17835    for ac_exec_ext in '' $ac_executable_extensions; do
17836  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17837    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17839    break 2
17840  fi
17841done
17842  done
17843IFS=$as_save_IFS
17844
17845  ;;
17846esac
17847fi
17848BUILD_CXX=$ac_cv_path_BUILD_CXX
17849if test -n "$BUILD_CXX"; then
17850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17851$as_echo "$BUILD_CXX" >&6; }
17852else
17853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17854$as_echo "no" >&6; }
17855fi
17856
17857
17858  test -n "$BUILD_CXX" && break
17859done
17860
17861
17862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17863
17864  # First separate the path from the arguments. This will split at the first
17865  # space.
17866  complete="$BUILD_CXX"
17867  path="${complete%% *}"
17868  tmp="$complete EOL"
17869  arguments="${tmp#* }"
17870
17871  # Input might be given as Windows format, start by converting to
17872  # unix format.
17873  new_path=`$CYGPATH -u "$path"`
17874
17875  # Now try to locate executable using which
17876  new_path=`$WHICH "$new_path" 2> /dev/null`
17877  # bat and cmd files are not always considered executable in cygwin causing which
17878  # to not find them
17879  if test "x$new_path" = x \
17880           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17881           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17882    new_path=`$CYGPATH -u "$path"`
17883  fi
17884  if test "x$new_path" = x; then
17885    # Oops. Which didn't find the executable.
17886    # The splitting of arguments from the executable at a space might have been incorrect,
17887    # since paths with space are more likely in Windows. Give it another try with the whole
17888    # argument.
17889    path="$complete"
17890    arguments="EOL"
17891    new_path=`$CYGPATH -u "$path"`
17892    new_path=`$WHICH "$new_path" 2> /dev/null`
17893    # bat and cmd files are not always considered executable in cygwin causing which
17894    # to not find them
17895    if test "x$new_path" = x \
17896             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17897             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17898      new_path=`$CYGPATH -u "$path"`
17899    fi
17900    if test "x$new_path" = x; then
17901      # It's still not found. Now this is an unrecoverable error.
17902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17903$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17904      has_space=`$ECHO "$complete" | $GREP " "`
17905      if test "x$has_space" != x; then
17906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17908      fi
17909      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17910    fi
17911  fi
17912
17913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17916  # "foo.exe" is OK but "foo" is an error.
17917  #
17918  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17919  # It is also a way to make sure we got the proper file name for the real test later on.
17920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17921  if test "x$test_shortpath" = x; then
17922    # Short path failed, file does not exist as specified.
17923    # Try adding .exe or .cmd
17924    if test -f "${new_path}.exe"; then
17925       input_to_shortpath="${new_path}.exe"
17926    elif test -f "${new_path}.cmd"; then
17927       input_to_shortpath="${new_path}.cmd"
17928    else
17929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17930$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17931      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17932$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17933      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17934    fi
17935  else
17936    input_to_shortpath="$new_path"
17937  fi
17938
17939  # Call helper function which possibly converts this using DOS-style short mode.
17940  # If so, the updated path is stored in $new_path.
17941  new_path="$input_to_shortpath"
17942
17943  input_path="$input_to_shortpath"
17944  # Check if we need to convert this using DOS-style short mode. If the path
17945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17946  # take no chances and rewrite it.
17947  # Note: m4 eats our [], so we need to use [ and ] instead.
17948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17949  if test "x$has_forbidden_chars" != x; then
17950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17951    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17952    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17953    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17954      # Going to short mode and back again did indeed matter. Since short mode is
17955      # case insensitive, let's make it lowercase to improve readability.
17956      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17957      # Now convert it back to Unix-stile (cygpath)
17958      input_path=`$CYGPATH -u "$shortmode_path"`
17959      new_path="$input_path"
17960    fi
17961  fi
17962
17963  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17964  if test "x$test_cygdrive_prefix" = x; then
17965    # As a simple fix, exclude /usr/bin since it's not a real path.
17966    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17967      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17968      # a path prefixed by /cygdrive for fixpath to work.
17969      new_path="$CYGWIN_ROOT_PATH$input_path"
17970    fi
17971  fi
17972
17973  # remove trailing .exe if any
17974  new_path="${new_path/%.exe/}"
17975
17976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17977
17978  # First separate the path from the arguments. This will split at the first
17979  # space.
17980  complete="$BUILD_CXX"
17981  path="${complete%% *}"
17982  tmp="$complete EOL"
17983  arguments="${tmp#* }"
17984
17985  # Input might be given as Windows format, start by converting to
17986  # unix format.
17987  new_path="$path"
17988
17989  windows_path="$new_path"
17990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17991    unix_path=`$CYGPATH -u "$windows_path"`
17992    new_path="$unix_path"
17993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17995    new_path="$unix_path"
17996  fi
17997
17998
17999  # Now try to locate executable using which
18000  new_path=`$WHICH "$new_path" 2> /dev/null`
18001
18002  if test "x$new_path" = x; then
18003    # Oops. Which didn't find the executable.
18004    # The splitting of arguments from the executable at a space might have been incorrect,
18005    # since paths with space are more likely in Windows. Give it another try with the whole
18006    # argument.
18007    path="$complete"
18008    arguments="EOL"
18009    new_path="$path"
18010
18011  windows_path="$new_path"
18012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18013    unix_path=`$CYGPATH -u "$windows_path"`
18014    new_path="$unix_path"
18015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18017    new_path="$unix_path"
18018  fi
18019
18020
18021    new_path=`$WHICH "$new_path" 2> /dev/null`
18022
18023    if test "x$new_path" = x; then
18024      # It's still not found. Now this is an unrecoverable error.
18025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18026$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18027      has_space=`$ECHO "$complete" | $GREP " "`
18028      if test "x$has_space" != x; then
18029        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18030$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18031      fi
18032      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18033    fi
18034  fi
18035
18036  # Now new_path has a complete unix path to the binary
18037  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18038    # Keep paths in /bin as-is, but remove trailing .exe if any
18039    new_path="${new_path/%.exe/}"
18040    # Do not save /bin paths to all_fixpath_prefixes!
18041  else
18042    # Not in mixed or Windows style, start by that.
18043    new_path=`cmd //c echo $new_path`
18044
18045  input_path="$new_path"
18046  # Check if we need to convert this using DOS-style short mode. If the path
18047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18048  # take no chances and rewrite it.
18049  # Note: m4 eats our [], so we need to use [ and ] instead.
18050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18051  if test "x$has_forbidden_chars" != x; then
18052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18054  fi
18055
18056    # Output is in $new_path
18057
18058  windows_path="$new_path"
18059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18060    unix_path=`$CYGPATH -u "$windows_path"`
18061    new_path="$unix_path"
18062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18064    new_path="$unix_path"
18065  fi
18066
18067    # remove trailing .exe if any
18068    new_path="${new_path/%.exe/}"
18069
18070    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18071    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18072  fi
18073
18074  else
18075    # We're on a posix platform. Hooray! :)
18076    # First separate the path from the arguments. This will split at the first
18077    # space.
18078    complete="$BUILD_CXX"
18079    path="${complete%% *}"
18080    tmp="$complete EOL"
18081    arguments="${tmp#* }"
18082
18083    # Cannot rely on the command "which" here since it doesn't always work.
18084    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18085    if test -z "$is_absolute_path"; then
18086      # Path to executable is not absolute. Find it.
18087      IFS_save="$IFS"
18088      IFS=:
18089      for p in $PATH; do
18090        if test -f "$p/$path" && test -x "$p/$path"; then
18091          new_path="$p/$path"
18092          break
18093        fi
18094      done
18095      IFS="$IFS_save"
18096    else
18097      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18098$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18099      new_path="$path"
18100    fi
18101
18102    if test "x$new_path" = x; then
18103        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18104$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18105        has_space=`$ECHO "$complete" | $GREP " "`
18106        if test "x$has_space" != x; then
18107          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18108$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18109        fi
18110        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18111      fi
18112  fi
18113
18114      # Now join together the path and the arguments once again
18115      if test "x$arguments" != xEOL; then
18116        new_complete="$new_path ${arguments% *}"
18117      else
18118        new_complete="$new_path"
18119      fi
18120
18121  if test "x$complete" != "x$new_complete"; then
18122      BUILD_CXX="$new_complete"
18123      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18124$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18125    fi
18126
18127    # Extract the first word of "ld", so it can be a program name with args.
18128set dummy ld; ac_word=$2
18129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18130$as_echo_n "checking for $ac_word... " >&6; }
18131if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18132  $as_echo_n "(cached) " >&6
18133else
18134  case $BUILD_LD in
18135  [\\/]* | ?:[\\/]*)
18136  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18137  ;;
18138  *)
18139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18140for as_dir in $PATH
18141do
18142  IFS=$as_save_IFS
18143  test -z "$as_dir" && as_dir=.
18144    for ac_exec_ext in '' $ac_executable_extensions; do
18145  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18146    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18148    break 2
18149  fi
18150done
18151  done
18152IFS=$as_save_IFS
18153
18154  ;;
18155esac
18156fi
18157BUILD_LD=$ac_cv_path_BUILD_LD
18158if test -n "$BUILD_LD"; then
18159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18160$as_echo "$BUILD_LD" >&6; }
18161else
18162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18163$as_echo "no" >&6; }
18164fi
18165
18166
18167
18168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18169
18170  # First separate the path from the arguments. This will split at the first
18171  # space.
18172  complete="$BUILD_LD"
18173  path="${complete%% *}"
18174  tmp="$complete EOL"
18175  arguments="${tmp#* }"
18176
18177  # Input might be given as Windows format, start by converting to
18178  # unix format.
18179  new_path=`$CYGPATH -u "$path"`
18180
18181  # Now try to locate executable using which
18182  new_path=`$WHICH "$new_path" 2> /dev/null`
18183  # bat and cmd files are not always considered executable in cygwin causing which
18184  # to not find them
18185  if test "x$new_path" = x \
18186           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18187           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18188    new_path=`$CYGPATH -u "$path"`
18189  fi
18190  if test "x$new_path" = x; then
18191    # Oops. Which didn't find the executable.
18192    # The splitting of arguments from the executable at a space might have been incorrect,
18193    # since paths with space are more likely in Windows. Give it another try with the whole
18194    # argument.
18195    path="$complete"
18196    arguments="EOL"
18197    new_path=`$CYGPATH -u "$path"`
18198    new_path=`$WHICH "$new_path" 2> /dev/null`
18199    # bat and cmd files are not always considered executable in cygwin causing which
18200    # to not find them
18201    if test "x$new_path" = x \
18202             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18203             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18204      new_path=`$CYGPATH -u "$path"`
18205    fi
18206    if test "x$new_path" = x; then
18207      # It's still not found. Now this is an unrecoverable error.
18208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18209$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18210      has_space=`$ECHO "$complete" | $GREP " "`
18211      if test "x$has_space" != x; then
18212        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18213$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18214      fi
18215      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18216    fi
18217  fi
18218
18219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18222  # "foo.exe" is OK but "foo" is an error.
18223  #
18224  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18225  # It is also a way to make sure we got the proper file name for the real test later on.
18226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18227  if test "x$test_shortpath" = x; then
18228    # Short path failed, file does not exist as specified.
18229    # Try adding .exe or .cmd
18230    if test -f "${new_path}.exe"; then
18231       input_to_shortpath="${new_path}.exe"
18232    elif test -f "${new_path}.cmd"; then
18233       input_to_shortpath="${new_path}.cmd"
18234    else
18235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18236$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18237      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18238$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18239      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18240    fi
18241  else
18242    input_to_shortpath="$new_path"
18243  fi
18244
18245  # Call helper function which possibly converts this using DOS-style short mode.
18246  # If so, the updated path is stored in $new_path.
18247  new_path="$input_to_shortpath"
18248
18249  input_path="$input_to_shortpath"
18250  # Check if we need to convert this using DOS-style short mode. If the path
18251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18252  # take no chances and rewrite it.
18253  # Note: m4 eats our [], so we need to use [ and ] instead.
18254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18255  if test "x$has_forbidden_chars" != x; then
18256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18260      # Going to short mode and back again did indeed matter. Since short mode is
18261      # case insensitive, let's make it lowercase to improve readability.
18262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18263      # Now convert it back to Unix-stile (cygpath)
18264      input_path=`$CYGPATH -u "$shortmode_path"`
18265      new_path="$input_path"
18266    fi
18267  fi
18268
18269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18270  if test "x$test_cygdrive_prefix" = x; then
18271    # As a simple fix, exclude /usr/bin since it's not a real path.
18272    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18274      # a path prefixed by /cygdrive for fixpath to work.
18275      new_path="$CYGWIN_ROOT_PATH$input_path"
18276    fi
18277  fi
18278
18279  # remove trailing .exe if any
18280  new_path="${new_path/%.exe/}"
18281
18282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18283
18284  # First separate the path from the arguments. This will split at the first
18285  # space.
18286  complete="$BUILD_LD"
18287  path="${complete%% *}"
18288  tmp="$complete EOL"
18289  arguments="${tmp#* }"
18290
18291  # Input might be given as Windows format, start by converting to
18292  # unix format.
18293  new_path="$path"
18294
18295  windows_path="$new_path"
18296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18297    unix_path=`$CYGPATH -u "$windows_path"`
18298    new_path="$unix_path"
18299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18301    new_path="$unix_path"
18302  fi
18303
18304
18305  # Now try to locate executable using which
18306  new_path=`$WHICH "$new_path" 2> /dev/null`
18307
18308  if test "x$new_path" = x; then
18309    # Oops. Which didn't find the executable.
18310    # The splitting of arguments from the executable at a space might have been incorrect,
18311    # since paths with space are more likely in Windows. Give it another try with the whole
18312    # argument.
18313    path="$complete"
18314    arguments="EOL"
18315    new_path="$path"
18316
18317  windows_path="$new_path"
18318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18319    unix_path=`$CYGPATH -u "$windows_path"`
18320    new_path="$unix_path"
18321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18323    new_path="$unix_path"
18324  fi
18325
18326
18327    new_path=`$WHICH "$new_path" 2> /dev/null`
18328
18329    if test "x$new_path" = x; then
18330      # It's still not found. Now this is an unrecoverable error.
18331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18332$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18333      has_space=`$ECHO "$complete" | $GREP " "`
18334      if test "x$has_space" != x; then
18335        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18336$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18337      fi
18338      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18339    fi
18340  fi
18341
18342  # Now new_path has a complete unix path to the binary
18343  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18344    # Keep paths in /bin as-is, but remove trailing .exe if any
18345    new_path="${new_path/%.exe/}"
18346    # Do not save /bin paths to all_fixpath_prefixes!
18347  else
18348    # Not in mixed or Windows style, start by that.
18349    new_path=`cmd //c echo $new_path`
18350
18351  input_path="$new_path"
18352  # Check if we need to convert this using DOS-style short mode. If the path
18353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18354  # take no chances and rewrite it.
18355  # Note: m4 eats our [], so we need to use [ and ] instead.
18356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18357  if test "x$has_forbidden_chars" != x; then
18358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18360  fi
18361
18362    # Output is in $new_path
18363
18364  windows_path="$new_path"
18365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18366    unix_path=`$CYGPATH -u "$windows_path"`
18367    new_path="$unix_path"
18368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18370    new_path="$unix_path"
18371  fi
18372
18373    # remove trailing .exe if any
18374    new_path="${new_path/%.exe/}"
18375
18376    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18377    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18378  fi
18379
18380  else
18381    # We're on a posix platform. Hooray! :)
18382    # First separate the path from the arguments. This will split at the first
18383    # space.
18384    complete="$BUILD_LD"
18385    path="${complete%% *}"
18386    tmp="$complete EOL"
18387    arguments="${tmp#* }"
18388
18389    # Cannot rely on the command "which" here since it doesn't always work.
18390    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18391    if test -z "$is_absolute_path"; then
18392      # Path to executable is not absolute. Find it.
18393      IFS_save="$IFS"
18394      IFS=:
18395      for p in $PATH; do
18396        if test -f "$p/$path" && test -x "$p/$path"; then
18397          new_path="$p/$path"
18398          break
18399        fi
18400      done
18401      IFS="$IFS_save"
18402    else
18403      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18404$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18405      new_path="$path"
18406    fi
18407
18408    if test "x$new_path" = x; then
18409        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18410$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18411        has_space=`$ECHO "$complete" | $GREP " "`
18412        if test "x$has_space" != x; then
18413          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18414$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18415        fi
18416        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18417      fi
18418  fi
18419
18420      # Now join together the path and the arguments once again
18421      if test "x$arguments" != xEOL; then
18422        new_complete="$new_path ${arguments% *}"
18423      else
18424        new_complete="$new_path"
18425      fi
18426
18427  if test "x$complete" != "x$new_complete"; then
18428      BUILD_LD="$new_complete"
18429      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18430$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18431    fi
18432
18433fi
18434
18435
18436
18437
18438# If a devkit is found on the builddeps server, then prepend its path to the
18439# PATH variable. If there are cross compilers available in the devkit, these
18440# will be found by AC_PROG_CC et al.
18441DEVKIT=
18442
18443
18444    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18445        # Source the builddeps file again, to make sure it uses the latest variables!
18446        . $builddepsfile
18447        # Look for a target and build machine specific resource!
18448        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18449        if test "x$resource" = x; then
18450            # Ok, lets instead look for a target specific resource
18451            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18452        fi
18453        if test "x$resource" = x; then
18454            # Ok, lets instead look for a build specific resource
18455            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18456        fi
18457        if test "x$resource" = x; then
18458            # Ok, lets instead look for a generic resource
18459            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18460            resource=${builddep_devkit}
18461        fi
18462        if test "x$resource" != x; then
18463            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18464$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18465	    # If the resource in the builddeps.conf file is an existing directory,
18466	    # for example /java/linux/cups
18467	    if test -d ${resource}; then
18468	       depdir=${resource}
18469	    else
18470
18471# devkit is for example mymodule
18472# $resource is for example libs/general/libmymod_1_2_3.zip
18473# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18474# $with_builddeps_dir is for example /localhome/builddeps
18475# depdir is the name of the variable into which we store the depdir, eg MYMOD
18476# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18477# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18478    filename=`basename $resource`
18479    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18480    filebase=${filename%%.*}
18481    extension=${filename#*.}
18482    installdir=$with_builddeps_dir/$filebase
18483    if test ! -f $installdir/$filename.unpacked; then
18484        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18485$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18486        if test ! -d $installdir; then
18487            mkdir -p $installdir
18488        fi
18489        if test ! -d $installdir; then
18490            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18491        fi
18492        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18493        touch $tmpfile
18494        if test ! -f $tmpfile; then
18495            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18496        fi
18497
18498    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18499    # $tmpfile is the local file name for the downloaded file.
18500    VALID_TOOL=no
18501    if test "x$BDEPS_FTP" = xwget; then
18502       VALID_TOOL=yes
18503       wget -O $tmpfile $with_builddeps_server/$resource
18504    fi
18505    if test "x$BDEPS_FTP" = xlftp; then
18506       VALID_TOOL=yes
18507       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18508    fi
18509    if test "x$BDEPS_FTP" = xftp; then
18510        VALID_TOOL=yes
18511        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18512        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18513        FTPUSERPWD=${FTPSERVER%%@*}
18514        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18515            FTPUSER=${userpwd%%:*}
18516            FTPPWD=${userpwd#*@}
18517            FTPSERVER=${FTPSERVER#*@}
18518        else
18519            FTPUSER=ftp
18520            FTPPWD=ftp
18521        fi
18522        # the "pass" command does not work on some
18523        # ftp clients (read ftp.exe) but if it works,
18524        # passive mode is better!
18525        (\
18526            echo "user $FTPUSER $FTPPWD"        ;\
18527            echo "pass"                         ;\
18528            echo "bin"                          ;\
18529            echo "get $FTPPATH $tmpfile"              ;\
18530        ) | ftp -in $FTPSERVER
18531    fi
18532    if test "x$VALID_TOOL" != xyes; then
18533       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18534    fi
18535
18536        mv $tmpfile $installdir/$filename
18537        if test ! -s $installdir/$filename; then
18538            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18539        fi
18540        case "$extension" in
18541            zip)  echo "Unzipping $installdir/$filename..."
18542               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18543            ;;
18544            tar.gz) echo "Untaring $installdir/$filename..."
18545               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18546            ;;
18547            tgz) echo "Untaring $installdir/$filename..."
18548               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18549            ;;
18550            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18551            ;;
18552        esac
18553    fi
18554    if test -f $installdir/$filename.unpacked; then
18555        depdir=$installdir
18556    fi
18557
18558	    fi
18559            # Source the builddeps file again, because in the previous command, the depdir
18560            # was updated to point at the current build dependency install directory.
18561            . $builddepsfile
18562            # Now extract variables from the builddeps.conf files.
18563            theroot=${builddep_devkit_ROOT}
18564            thecflags=${builddep_devkit_CFLAGS}
18565            thelibs=${builddep_devkit_LIBS}
18566            if test "x$depdir" = x; then
18567                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18568            fi
18569            DEVKIT=$depdir
18570            if test "x$theroot" != x; then
18571               DEVKIT="$theroot"
18572            fi
18573            if test "x$thecflags" != x; then
18574               DEVKIT_CFLAGS="$thecflags"
18575            fi
18576            if test "x$thelibs" != x; then
18577               DEVKIT_LIBS="$thelibs"
18578            fi
18579            # Found devkit
18580                     PATH="$DEVKIT/bin:$PATH"
18581                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18582                     if test "x$x_includes" = "xNONE"; then
18583                         x_includes="$SYS_ROOT/usr/include/X11"
18584                     fi
18585                     if test "x$x_libraries" = "xNONE"; then
18586                         x_libraries="$SYS_ROOT/usr/lib"
18587                     fi
18588
18589
18590        fi
18591
18592    fi
18593
18594
18595if test "x$SYS_ROOT" != "x/" ; then
18596    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18597    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18598    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18599    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18600    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18601    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18602fi
18603
18604# Store the CFLAGS etal passed to the configure script.
18605ORG_CFLAGS="$CFLAGS"
18606ORG_CXXFLAGS="$CXXFLAGS"
18607ORG_OBJCFLAGS="$OBJCFLAGS"
18608
18609# autoconf magic only relies on PATH, so update it if tools dir is specified
18610OLD_PATH="$PATH"
18611if test "x$TOOLS_DIR" != x; then
18612  PATH=$TOOLS_DIR:$PATH
18613fi
18614
18615
18616### Locate C compiler (CC)
18617
18618# On windows, only cl.exe is supported.
18619# On Solaris, cc is preferred to gcc.
18620# Elsewhere, gcc is preferred to cc.
18621
18622if test "x$CC" != x; then
18623  COMPILER_CHECK_LIST="$CC"
18624elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18625  COMPILER_CHECK_LIST="cl"
18626elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18627  COMPILER_CHECK_LIST="cc gcc"
18628else
18629  COMPILER_CHECK_LIST="gcc cc"
18630fi
18631
18632
18633  COMPILER_NAME=C
18634
18635  CC=
18636  # If TOOLS_DIR is set, check for all compiler names in there first
18637  # before checking the rest of the PATH.
18638  if test -n "$TOOLS_DIR"; then
18639    PATH_save="$PATH"
18640    PATH="$TOOLS_DIR"
18641    for ac_prog in $COMPILER_CHECK_LIST
18642do
18643  # Extract the first word of "$ac_prog", so it can be a program name with args.
18644set dummy $ac_prog; ac_word=$2
18645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18646$as_echo_n "checking for $ac_word... " >&6; }
18647if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18648  $as_echo_n "(cached) " >&6
18649else
18650  case $TOOLS_DIR_CC in
18651  [\\/]* | ?:[\\/]*)
18652  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18653  ;;
18654  *)
18655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18656for as_dir in $PATH
18657do
18658  IFS=$as_save_IFS
18659  test -z "$as_dir" && as_dir=.
18660    for ac_exec_ext in '' $ac_executable_extensions; do
18661  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18662    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18664    break 2
18665  fi
18666done
18667  done
18668IFS=$as_save_IFS
18669
18670  ;;
18671esac
18672fi
18673TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18674if test -n "$TOOLS_DIR_CC"; then
18675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18676$as_echo "$TOOLS_DIR_CC" >&6; }
18677else
18678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18679$as_echo "no" >&6; }
18680fi
18681
18682
18683  test -n "$TOOLS_DIR_CC" && break
18684done
18685
18686    CC=$TOOLS_DIR_CC
18687    PATH="$PATH_save"
18688  fi
18689
18690  # AC_PATH_PROGS can't be run multiple times with the same variable,
18691  # so create a new name for this run.
18692  if test "x$CC" = x; then
18693    for ac_prog in $COMPILER_CHECK_LIST
18694do
18695  # Extract the first word of "$ac_prog", so it can be a program name with args.
18696set dummy $ac_prog; ac_word=$2
18697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18698$as_echo_n "checking for $ac_word... " >&6; }
18699if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18700  $as_echo_n "(cached) " >&6
18701else
18702  case $POTENTIAL_CC in
18703  [\\/]* | ?:[\\/]*)
18704  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18705  ;;
18706  *)
18707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18708for as_dir in $PATH
18709do
18710  IFS=$as_save_IFS
18711  test -z "$as_dir" && as_dir=.
18712    for ac_exec_ext in '' $ac_executable_extensions; do
18713  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18714    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18716    break 2
18717  fi
18718done
18719  done
18720IFS=$as_save_IFS
18721
18722  ;;
18723esac
18724fi
18725POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18726if test -n "$POTENTIAL_CC"; then
18727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18728$as_echo "$POTENTIAL_CC" >&6; }
18729else
18730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18731$as_echo "no" >&6; }
18732fi
18733
18734
18735  test -n "$POTENTIAL_CC" && break
18736done
18737
18738    CC=$POTENTIAL_CC
18739  fi
18740
18741  if test "x$CC" = x; then
18742
18743    # Print a helpful message on how to acquire the necessary build dependency.
18744    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18745    MISSING_DEPENDENCY=devkit
18746    PKGHANDLER_COMMAND=
18747
18748    case $PKGHANDLER in
18749	apt-get)
18750                apt_help     $MISSING_DEPENDENCY ;;
18751    yum)
18752                yum_help     $MISSING_DEPENDENCY ;;
18753	port)
18754                port_help    $MISSING_DEPENDENCY ;;
18755	pkgutil)
18756                pkgutil_help $MISSING_DEPENDENCY ;;
18757	pkgadd)
18758                pkgadd_help  $MISSING_DEPENDENCY ;;
18759    * )
18760      break ;;
18761    esac
18762
18763    if test "x$PKGHANDLER_COMMAND" != x; then
18764        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18765    fi
18766
18767      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18768  fi
18769
18770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18771
18772  # First separate the path from the arguments. This will split at the first
18773  # space.
18774  complete="$CC"
18775  path="${complete%% *}"
18776  tmp="$complete EOL"
18777  arguments="${tmp#* }"
18778
18779  # Input might be given as Windows format, start by converting to
18780  # unix format.
18781  new_path=`$CYGPATH -u "$path"`
18782
18783  # Now try to locate executable using which
18784  new_path=`$WHICH "$new_path" 2> /dev/null`
18785  # bat and cmd files are not always considered executable in cygwin causing which
18786  # to not find them
18787  if test "x$new_path" = x \
18788           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18789           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18790    new_path=`$CYGPATH -u "$path"`
18791  fi
18792  if test "x$new_path" = x; then
18793    # Oops. Which didn't find the executable.
18794    # The splitting of arguments from the executable at a space might have been incorrect,
18795    # since paths with space are more likely in Windows. Give it another try with the whole
18796    # argument.
18797    path="$complete"
18798    arguments="EOL"
18799    new_path=`$CYGPATH -u "$path"`
18800    new_path=`$WHICH "$new_path" 2> /dev/null`
18801    # bat and cmd files are not always considered executable in cygwin causing which
18802    # to not find them
18803    if test "x$new_path" = x \
18804             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18805             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18806      new_path=`$CYGPATH -u "$path"`
18807    fi
18808    if test "x$new_path" = x; then
18809      # It's still not found. Now this is an unrecoverable error.
18810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18811$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18812      has_space=`$ECHO "$complete" | $GREP " "`
18813      if test "x$has_space" != x; then
18814        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18815$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18816      fi
18817      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18818    fi
18819  fi
18820
18821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18824  # "foo.exe" is OK but "foo" is an error.
18825  #
18826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18827  # It is also a way to make sure we got the proper file name for the real test later on.
18828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18829  if test "x$test_shortpath" = x; then
18830    # Short path failed, file does not exist as specified.
18831    # Try adding .exe or .cmd
18832    if test -f "${new_path}.exe"; then
18833       input_to_shortpath="${new_path}.exe"
18834    elif test -f "${new_path}.cmd"; then
18835       input_to_shortpath="${new_path}.cmd"
18836    else
18837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18838$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18839      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18840$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18841      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18842    fi
18843  else
18844    input_to_shortpath="$new_path"
18845  fi
18846
18847  # Call helper function which possibly converts this using DOS-style short mode.
18848  # If so, the updated path is stored in $new_path.
18849  new_path="$input_to_shortpath"
18850
18851  input_path="$input_to_shortpath"
18852  # Check if we need to convert this using DOS-style short mode. If the path
18853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18854  # take no chances and rewrite it.
18855  # Note: m4 eats our [], so we need to use [ and ] instead.
18856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18857  if test "x$has_forbidden_chars" != x; then
18858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18862      # Going to short mode and back again did indeed matter. Since short mode is
18863      # case insensitive, let's make it lowercase to improve readability.
18864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18865      # Now convert it back to Unix-stile (cygpath)
18866      input_path=`$CYGPATH -u "$shortmode_path"`
18867      new_path="$input_path"
18868    fi
18869  fi
18870
18871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18872  if test "x$test_cygdrive_prefix" = x; then
18873    # As a simple fix, exclude /usr/bin since it's not a real path.
18874    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18876      # a path prefixed by /cygdrive for fixpath to work.
18877      new_path="$CYGWIN_ROOT_PATH$input_path"
18878    fi
18879  fi
18880
18881  # remove trailing .exe if any
18882  new_path="${new_path/%.exe/}"
18883
18884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18885
18886  # First separate the path from the arguments. This will split at the first
18887  # space.
18888  complete="$CC"
18889  path="${complete%% *}"
18890  tmp="$complete EOL"
18891  arguments="${tmp#* }"
18892
18893  # Input might be given as Windows format, start by converting to
18894  # unix format.
18895  new_path="$path"
18896
18897  windows_path="$new_path"
18898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18899    unix_path=`$CYGPATH -u "$windows_path"`
18900    new_path="$unix_path"
18901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18903    new_path="$unix_path"
18904  fi
18905
18906
18907  # Now try to locate executable using which
18908  new_path=`$WHICH "$new_path" 2> /dev/null`
18909
18910  if test "x$new_path" = x; then
18911    # Oops. Which didn't find the executable.
18912    # The splitting of arguments from the executable at a space might have been incorrect,
18913    # since paths with space are more likely in Windows. Give it another try with the whole
18914    # argument.
18915    path="$complete"
18916    arguments="EOL"
18917    new_path="$path"
18918
18919  windows_path="$new_path"
18920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18921    unix_path=`$CYGPATH -u "$windows_path"`
18922    new_path="$unix_path"
18923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18925    new_path="$unix_path"
18926  fi
18927
18928
18929    new_path=`$WHICH "$new_path" 2> /dev/null`
18930
18931    if test "x$new_path" = x; then
18932      # It's still not found. Now this is an unrecoverable error.
18933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18934$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18935      has_space=`$ECHO "$complete" | $GREP " "`
18936      if test "x$has_space" != x; then
18937        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18938$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18939      fi
18940      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18941    fi
18942  fi
18943
18944  # Now new_path has a complete unix path to the binary
18945  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18946    # Keep paths in /bin as-is, but remove trailing .exe if any
18947    new_path="${new_path/%.exe/}"
18948    # Do not save /bin paths to all_fixpath_prefixes!
18949  else
18950    # Not in mixed or Windows style, start by that.
18951    new_path=`cmd //c echo $new_path`
18952
18953  input_path="$new_path"
18954  # Check if we need to convert this using DOS-style short mode. If the path
18955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18956  # take no chances and rewrite it.
18957  # Note: m4 eats our [], so we need to use [ and ] instead.
18958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18959  if test "x$has_forbidden_chars" != x; then
18960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18962  fi
18963
18964    # Output is in $new_path
18965
18966  windows_path="$new_path"
18967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18968    unix_path=`$CYGPATH -u "$windows_path"`
18969    new_path="$unix_path"
18970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18972    new_path="$unix_path"
18973  fi
18974
18975    # remove trailing .exe if any
18976    new_path="${new_path/%.exe/}"
18977
18978    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18979    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18980  fi
18981
18982  else
18983    # We're on a posix platform. Hooray! :)
18984    # First separate the path from the arguments. This will split at the first
18985    # space.
18986    complete="$CC"
18987    path="${complete%% *}"
18988    tmp="$complete EOL"
18989    arguments="${tmp#* }"
18990
18991    # Cannot rely on the command "which" here since it doesn't always work.
18992    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18993    if test -z "$is_absolute_path"; then
18994      # Path to executable is not absolute. Find it.
18995      IFS_save="$IFS"
18996      IFS=:
18997      for p in $PATH; do
18998        if test -f "$p/$path" && test -x "$p/$path"; then
18999          new_path="$p/$path"
19000          break
19001        fi
19002      done
19003      IFS="$IFS_save"
19004    else
19005      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19006$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19007      new_path="$path"
19008    fi
19009
19010    if test "x$new_path" = x; then
19011        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19012$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19013        has_space=`$ECHO "$complete" | $GREP " "`
19014        if test "x$has_space" != x; then
19015          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19016$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19017        fi
19018        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19019      fi
19020  fi
19021
19022      # Now join together the path and the arguments once again
19023      if test "x$arguments" != xEOL; then
19024        new_complete="$new_path ${arguments% *}"
19025      else
19026        new_complete="$new_path"
19027      fi
19028
19029  if test "x$complete" != "x$new_complete"; then
19030      CC="$new_complete"
19031      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19032$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19033    fi
19034
19035  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19036$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19037  TEST_COMPILER="$CC"
19038
19039    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19040        # Follow a chain of symbolic links. Use readlink
19041        # where it exists, else fall back to horribly
19042        # complicated shell code.
19043        if test "x$READLINK_TESTED" != yes; then
19044            # On MacOSX there is a readlink tool with a different
19045            # purpose than the GNU readlink tool. Check the found readlink.
19046            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19047            if test "x$ISGNU" = x; then
19048                 # A readlink that we do not know how to use.
19049                 # Are there other non-GNU readlinks out there?
19050                 READLINK_TESTED=yes
19051                 READLINK=
19052            fi
19053        fi
19054
19055        if test "x$READLINK" != x; then
19056            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19057        else
19058            # Save the current directory for restoring afterwards
19059            STARTDIR=$PWD
19060            COUNTER=0
19061            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19062            sym_link_file=`$BASENAME $TEST_COMPILER`
19063            # Use the system pwd and not the shell builtin to resolve directory symlinks
19064            cd $sym_link_dir
19065            cd `$THEPWDCMD`
19066            sym_link_dir=`$THEPWDCMD`
19067            # Resolve file symlinks
19068            while test $COUNTER -lt 20; do
19069                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19070                if test "x$ISLINK" == x; then
19071                    # This is not a symbolic link! We are done!
19072                    break
19073                fi
19074                # Again resolve directory symlinks since the target of the just found
19075                # link could be in a different directory
19076                cd `$DIRNAME $ISLINK`
19077                sym_link_dir=`$THEPWDCMD`
19078                sym_link_file=`$BASENAME $ISLINK`
19079                let COUNTER=COUNTER+1
19080            done
19081            cd $STARTDIR
19082            TEST_COMPILER=$sym_link_dir/$sym_link_file
19083        fi
19084    fi
19085
19086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19087$as_echo "$TEST_COMPILER" >&6; }
19088  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19089$as_echo_n "checking if CC is disguised ccache... " >&6; }
19090
19091  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19092  if test "x$COMPILER_BASENAME" = "xccache"; then
19093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19094$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19095    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19096    # We want to control ccache invocation ourselves, so ignore this cc and try
19097    # searching again.
19098
19099    # Remove the path to the fake ccache cc from the PATH
19100    RETRY_COMPILER_SAVED_PATH="$PATH"
19101    COMPILER_DIRNAME=`$DIRNAME $CC`
19102    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19103
19104    # Try again looking for our compiler
19105    if test -n "$ac_tool_prefix"; then
19106  for ac_prog in $COMPILER_CHECK_LIST
19107  do
19108    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19109set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19111$as_echo_n "checking for $ac_word... " >&6; }
19112if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19113  $as_echo_n "(cached) " >&6
19114else
19115  if test -n "$PROPER_COMPILER_CC"; then
19116  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19117else
19118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19119for as_dir in $PATH
19120do
19121  IFS=$as_save_IFS
19122  test -z "$as_dir" && as_dir=.
19123    for ac_exec_ext in '' $ac_executable_extensions; do
19124  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19125    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19127    break 2
19128  fi
19129done
19130  done
19131IFS=$as_save_IFS
19132
19133fi
19134fi
19135PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19136if test -n "$PROPER_COMPILER_CC"; then
19137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19138$as_echo "$PROPER_COMPILER_CC" >&6; }
19139else
19140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19141$as_echo "no" >&6; }
19142fi
19143
19144
19145    test -n "$PROPER_COMPILER_CC" && break
19146  done
19147fi
19148if test -z "$PROPER_COMPILER_CC"; then
19149  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19150  for ac_prog in $COMPILER_CHECK_LIST
19151do
19152  # Extract the first word of "$ac_prog", so it can be a program name with args.
19153set dummy $ac_prog; ac_word=$2
19154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19155$as_echo_n "checking for $ac_word... " >&6; }
19156if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19157  $as_echo_n "(cached) " >&6
19158else
19159  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19160  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19161else
19162as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19163for as_dir in $PATH
19164do
19165  IFS=$as_save_IFS
19166  test -z "$as_dir" && as_dir=.
19167    for ac_exec_ext in '' $ac_executable_extensions; do
19168  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19169    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19171    break 2
19172  fi
19173done
19174  done
19175IFS=$as_save_IFS
19176
19177fi
19178fi
19179ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19180if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19182$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19183else
19184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19185$as_echo "no" >&6; }
19186fi
19187
19188
19189  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19190done
19191
19192  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19193    PROPER_COMPILER_CC=""
19194  else
19195    case $cross_compiling:$ac_tool_warned in
19196yes:)
19197{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19198$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19199ac_tool_warned=yes ;;
19200esac
19201    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19202  fi
19203fi
19204
19205
19206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19207
19208  # First separate the path from the arguments. This will split at the first
19209  # space.
19210  complete="$PROPER_COMPILER_CC"
19211  path="${complete%% *}"
19212  tmp="$complete EOL"
19213  arguments="${tmp#* }"
19214
19215  # Input might be given as Windows format, start by converting to
19216  # unix format.
19217  new_path=`$CYGPATH -u "$path"`
19218
19219  # Now try to locate executable using which
19220  new_path=`$WHICH "$new_path" 2> /dev/null`
19221  # bat and cmd files are not always considered executable in cygwin causing which
19222  # to not find them
19223  if test "x$new_path" = x \
19224           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19225           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19226    new_path=`$CYGPATH -u "$path"`
19227  fi
19228  if test "x$new_path" = x; then
19229    # Oops. Which didn't find the executable.
19230    # The splitting of arguments from the executable at a space might have been incorrect,
19231    # since paths with space are more likely in Windows. Give it another try with the whole
19232    # argument.
19233    path="$complete"
19234    arguments="EOL"
19235    new_path=`$CYGPATH -u "$path"`
19236    new_path=`$WHICH "$new_path" 2> /dev/null`
19237    # bat and cmd files are not always considered executable in cygwin causing which
19238    # to not find them
19239    if test "x$new_path" = x \
19240             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19241             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19242      new_path=`$CYGPATH -u "$path"`
19243    fi
19244    if test "x$new_path" = x; then
19245      # It's still not found. Now this is an unrecoverable error.
19246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19247$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19248      has_space=`$ECHO "$complete" | $GREP " "`
19249      if test "x$has_space" != x; then
19250        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19251$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19252      fi
19253      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19254    fi
19255  fi
19256
19257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19260  # "foo.exe" is OK but "foo" is an error.
19261  #
19262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19263  # It is also a way to make sure we got the proper file name for the real test later on.
19264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19265  if test "x$test_shortpath" = x; then
19266    # Short path failed, file does not exist as specified.
19267    # Try adding .exe or .cmd
19268    if test -f "${new_path}.exe"; then
19269       input_to_shortpath="${new_path}.exe"
19270    elif test -f "${new_path}.cmd"; then
19271       input_to_shortpath="${new_path}.cmd"
19272    else
19273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19274$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19275      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19276$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19277      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19278    fi
19279  else
19280    input_to_shortpath="$new_path"
19281  fi
19282
19283  # Call helper function which possibly converts this using DOS-style short mode.
19284  # If so, the updated path is stored in $new_path.
19285  new_path="$input_to_shortpath"
19286
19287  input_path="$input_to_shortpath"
19288  # Check if we need to convert this using DOS-style short mode. If the path
19289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19290  # take no chances and rewrite it.
19291  # Note: m4 eats our [], so we need to use [ and ] instead.
19292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19293  if test "x$has_forbidden_chars" != x; then
19294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19298      # Going to short mode and back again did indeed matter. Since short mode is
19299      # case insensitive, let's make it lowercase to improve readability.
19300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19301      # Now convert it back to Unix-stile (cygpath)
19302      input_path=`$CYGPATH -u "$shortmode_path"`
19303      new_path="$input_path"
19304    fi
19305  fi
19306
19307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19308  if test "x$test_cygdrive_prefix" = x; then
19309    # As a simple fix, exclude /usr/bin since it's not a real path.
19310    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19312      # a path prefixed by /cygdrive for fixpath to work.
19313      new_path="$CYGWIN_ROOT_PATH$input_path"
19314    fi
19315  fi
19316
19317  # remove trailing .exe if any
19318  new_path="${new_path/%.exe/}"
19319
19320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19321
19322  # First separate the path from the arguments. This will split at the first
19323  # space.
19324  complete="$PROPER_COMPILER_CC"
19325  path="${complete%% *}"
19326  tmp="$complete EOL"
19327  arguments="${tmp#* }"
19328
19329  # Input might be given as Windows format, start by converting to
19330  # unix format.
19331  new_path="$path"
19332
19333  windows_path="$new_path"
19334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19335    unix_path=`$CYGPATH -u "$windows_path"`
19336    new_path="$unix_path"
19337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19339    new_path="$unix_path"
19340  fi
19341
19342
19343  # Now try to locate executable using which
19344  new_path=`$WHICH "$new_path" 2> /dev/null`
19345
19346  if test "x$new_path" = x; then
19347    # Oops. Which didn't find the executable.
19348    # The splitting of arguments from the executable at a space might have been incorrect,
19349    # since paths with space are more likely in Windows. Give it another try with the whole
19350    # argument.
19351    path="$complete"
19352    arguments="EOL"
19353    new_path="$path"
19354
19355  windows_path="$new_path"
19356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19357    unix_path=`$CYGPATH -u "$windows_path"`
19358    new_path="$unix_path"
19359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19361    new_path="$unix_path"
19362  fi
19363
19364
19365    new_path=`$WHICH "$new_path" 2> /dev/null`
19366
19367    if test "x$new_path" = x; then
19368      # It's still not found. Now this is an unrecoverable error.
19369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19370$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19371      has_space=`$ECHO "$complete" | $GREP " "`
19372      if test "x$has_space" != x; then
19373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19375      fi
19376      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19377    fi
19378  fi
19379
19380  # Now new_path has a complete unix path to the binary
19381  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19382    # Keep paths in /bin as-is, but remove trailing .exe if any
19383    new_path="${new_path/%.exe/}"
19384    # Do not save /bin paths to all_fixpath_prefixes!
19385  else
19386    # Not in mixed or Windows style, start by that.
19387    new_path=`cmd //c echo $new_path`
19388
19389  input_path="$new_path"
19390  # Check if we need to convert this using DOS-style short mode. If the path
19391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19392  # take no chances and rewrite it.
19393  # Note: m4 eats our [], so we need to use [ and ] instead.
19394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19395  if test "x$has_forbidden_chars" != x; then
19396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19398  fi
19399
19400    # Output is in $new_path
19401
19402  windows_path="$new_path"
19403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19404    unix_path=`$CYGPATH -u "$windows_path"`
19405    new_path="$unix_path"
19406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19408    new_path="$unix_path"
19409  fi
19410
19411    # remove trailing .exe if any
19412    new_path="${new_path/%.exe/}"
19413
19414    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19415    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19416  fi
19417
19418  else
19419    # We're on a posix platform. Hooray! :)
19420    # First separate the path from the arguments. This will split at the first
19421    # space.
19422    complete="$PROPER_COMPILER_CC"
19423    path="${complete%% *}"
19424    tmp="$complete EOL"
19425    arguments="${tmp#* }"
19426
19427    # Cannot rely on the command "which" here since it doesn't always work.
19428    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19429    if test -z "$is_absolute_path"; then
19430      # Path to executable is not absolute. Find it.
19431      IFS_save="$IFS"
19432      IFS=:
19433      for p in $PATH; do
19434        if test -f "$p/$path" && test -x "$p/$path"; then
19435          new_path="$p/$path"
19436          break
19437        fi
19438      done
19439      IFS="$IFS_save"
19440    else
19441      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19442$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19443      new_path="$path"
19444    fi
19445
19446    if test "x$new_path" = x; then
19447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19448$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19449        has_space=`$ECHO "$complete" | $GREP " "`
19450        if test "x$has_space" != x; then
19451          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19452$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19453        fi
19454        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19455      fi
19456  fi
19457
19458      # Now join together the path and the arguments once again
19459      if test "x$arguments" != xEOL; then
19460        new_complete="$new_path ${arguments% *}"
19461      else
19462        new_complete="$new_path"
19463      fi
19464
19465  if test "x$complete" != "x$new_complete"; then
19466      PROPER_COMPILER_CC="$new_complete"
19467      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19468$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19469    fi
19470
19471    PATH="$RETRY_COMPILER_SAVED_PATH"
19472
19473    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19474$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19475
19476    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19477        # Follow a chain of symbolic links. Use readlink
19478        # where it exists, else fall back to horribly
19479        # complicated shell code.
19480        if test "x$READLINK_TESTED" != yes; then
19481            # On MacOSX there is a readlink tool with a different
19482            # purpose than the GNU readlink tool. Check the found readlink.
19483            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19484            if test "x$ISGNU" = x; then
19485                 # A readlink that we do not know how to use.
19486                 # Are there other non-GNU readlinks out there?
19487                 READLINK_TESTED=yes
19488                 READLINK=
19489            fi
19490        fi
19491
19492        if test "x$READLINK" != x; then
19493            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19494        else
19495            # Save the current directory for restoring afterwards
19496            STARTDIR=$PWD
19497            COUNTER=0
19498            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19499            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19500            # Use the system pwd and not the shell builtin to resolve directory symlinks
19501            cd $sym_link_dir
19502            cd `$THEPWDCMD`
19503            sym_link_dir=`$THEPWDCMD`
19504            # Resolve file symlinks
19505            while test $COUNTER -lt 20; do
19506                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19507                if test "x$ISLINK" == x; then
19508                    # This is not a symbolic link! We are done!
19509                    break
19510                fi
19511                # Again resolve directory symlinks since the target of the just found
19512                # link could be in a different directory
19513                cd `$DIRNAME $ISLINK`
19514                sym_link_dir=`$THEPWDCMD`
19515                sym_link_file=`$BASENAME $ISLINK`
19516                let COUNTER=COUNTER+1
19517            done
19518            cd $STARTDIR
19519            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19520        fi
19521    fi
19522
19523    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19524$as_echo "$PROPER_COMPILER_CC" >&6; }
19525    CC="$PROPER_COMPILER_CC"
19526  else
19527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19528$as_echo "no, keeping CC" >&6; }
19529    CC="$TEST_COMPILER"
19530  fi
19531
19532  COMPILER=$CC
19533  COMPILER_NAME=$COMPILER_NAME
19534
19535  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19536    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19537    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19538    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19539    if test $? -ne 0; then
19540      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19541
19542      { $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
19543$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19544      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19545$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19546      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19547    else
19548      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19549      COMPILER_VENDOR="Sun Studio"
19550    fi
19551  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19552    # First line typically looks something like:
19553    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19554    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19555    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19556    COMPILER_VENDOR="Microsoft CL.EXE"
19557    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19558    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19559      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19560        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19561      fi
19562    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19563      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19564        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19565      fi
19566    fi
19567  else
19568    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19569    # Check that this is likely to be GCC.
19570    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19571    if test $? -ne 0; then
19572      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19573$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19574      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19575$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19576      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19577    fi
19578
19579    # First line typically looks something like:
19580    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19581    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19582    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19583  fi
19584  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19585  CC_VERSION="$COMPILER_VERSION"
19586  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19587  CC_VENDOR="$COMPILER_VENDOR"
19588
19589  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19590$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19591
19592
19593# Now that we have resolved CC ourself, let autoconf have its go at it
19594ac_ext=c
19595ac_cpp='$CPP $CPPFLAGS'
19596ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19597ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19598ac_compiler_gnu=$ac_cv_c_compiler_gnu
19599if test -n "$ac_tool_prefix"; then
19600  for ac_prog in $CC
19601  do
19602    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19603set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19605$as_echo_n "checking for $ac_word... " >&6; }
19606if test "${ac_cv_prog_CC+set}" = set; then :
19607  $as_echo_n "(cached) " >&6
19608else
19609  if test -n "$CC"; then
19610  ac_cv_prog_CC="$CC" # Let the user override the test.
19611else
19612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19613for as_dir in $PATH
19614do
19615  IFS=$as_save_IFS
19616  test -z "$as_dir" && as_dir=.
19617    for ac_exec_ext in '' $ac_executable_extensions; do
19618  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19619    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19621    break 2
19622  fi
19623done
19624  done
19625IFS=$as_save_IFS
19626
19627fi
19628fi
19629CC=$ac_cv_prog_CC
19630if test -n "$CC"; then
19631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19632$as_echo "$CC" >&6; }
19633else
19634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19635$as_echo "no" >&6; }
19636fi
19637
19638
19639    test -n "$CC" && break
19640  done
19641fi
19642if test -z "$CC"; then
19643  ac_ct_CC=$CC
19644  for ac_prog in $CC
19645do
19646  # Extract the first word of "$ac_prog", so it can be a program name with args.
19647set dummy $ac_prog; ac_word=$2
19648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19649$as_echo_n "checking for $ac_word... " >&6; }
19650if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19651  $as_echo_n "(cached) " >&6
19652else
19653  if test -n "$ac_ct_CC"; then
19654  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19655else
19656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19657for as_dir in $PATH
19658do
19659  IFS=$as_save_IFS
19660  test -z "$as_dir" && as_dir=.
19661    for ac_exec_ext in '' $ac_executable_extensions; do
19662  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19663    ac_cv_prog_ac_ct_CC="$ac_prog"
19664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19665    break 2
19666  fi
19667done
19668  done
19669IFS=$as_save_IFS
19670
19671fi
19672fi
19673ac_ct_CC=$ac_cv_prog_ac_ct_CC
19674if test -n "$ac_ct_CC"; then
19675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19676$as_echo "$ac_ct_CC" >&6; }
19677else
19678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19679$as_echo "no" >&6; }
19680fi
19681
19682
19683  test -n "$ac_ct_CC" && break
19684done
19685
19686  if test "x$ac_ct_CC" = x; then
19687    CC=""
19688  else
19689    case $cross_compiling:$ac_tool_warned in
19690yes:)
19691{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19692$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19693ac_tool_warned=yes ;;
19694esac
19695    CC=$ac_ct_CC
19696  fi
19697fi
19698
19699
19700test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19702as_fn_error $? "no acceptable C compiler found in \$PATH
19703See \`config.log' for more details" "$LINENO" 5 ; }
19704
19705# Provide some information about the compiler.
19706$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19707set X $ac_compile
19708ac_compiler=$2
19709for ac_option in --version -v -V -qversion; do
19710  { { ac_try="$ac_compiler $ac_option >&5"
19711case "(($ac_try" in
19712  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19713  *) ac_try_echo=$ac_try;;
19714esac
19715eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19716$as_echo "$ac_try_echo"; } >&5
19717  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19718  ac_status=$?
19719  if test -s conftest.err; then
19720    sed '10a\
19721... rest of stderr output deleted ...
19722         10q' conftest.err >conftest.er1
19723    cat conftest.er1 >&5
19724  fi
19725  rm -f conftest.er1 conftest.err
19726  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19727  test $ac_status = 0; }
19728done
19729
19730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19731/* end confdefs.h.  */
19732
19733int
19734main ()
19735{
19736
19737  ;
19738  return 0;
19739}
19740_ACEOF
19741ac_clean_files_save=$ac_clean_files
19742ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19743# Try to create an executable without -o first, disregard a.out.
19744# It will help us diagnose broken compilers, and finding out an intuition
19745# of exeext.
19746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19747$as_echo_n "checking whether the C compiler works... " >&6; }
19748ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19749
19750# The possible output files:
19751ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19752
19753ac_rmfiles=
19754for ac_file in $ac_files
19755do
19756  case $ac_file in
19757    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19758    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19759  esac
19760done
19761rm -f $ac_rmfiles
19762
19763if { { ac_try="$ac_link_default"
19764case "(($ac_try" in
19765  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19766  *) ac_try_echo=$ac_try;;
19767esac
19768eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19769$as_echo "$ac_try_echo"; } >&5
19770  (eval "$ac_link_default") 2>&5
19771  ac_status=$?
19772  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19773  test $ac_status = 0; }; then :
19774  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19775# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19776# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19777# so that the user can short-circuit this test for compilers unknown to
19778# Autoconf.
19779for ac_file in $ac_files ''
19780do
19781  test -f "$ac_file" || continue
19782  case $ac_file in
19783    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19784	;;
19785    [ab].out )
19786	# We found the default executable, but exeext='' is most
19787	# certainly right.
19788	break;;
19789    *.* )
19790	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19791	then :; else
19792	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19793	fi
19794	# We set ac_cv_exeext here because the later test for it is not
19795	# safe: cross compilers may not add the suffix if given an `-o'
19796	# argument, so we may need to know it at that point already.
19797	# Even if this section looks crufty: it has the advantage of
19798	# actually working.
19799	break;;
19800    * )
19801	break;;
19802  esac
19803done
19804test "$ac_cv_exeext" = no && ac_cv_exeext=
19805
19806else
19807  ac_file=''
19808fi
19809if test -z "$ac_file"; then :
19810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19811$as_echo "no" >&6; }
19812$as_echo "$as_me: failed program was:" >&5
19813sed 's/^/| /' conftest.$ac_ext >&5
19814
19815{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19816$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19817as_fn_error 77 "C compiler cannot create executables
19818See \`config.log' for more details" "$LINENO" 5 ; }
19819else
19820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19821$as_echo "yes" >&6; }
19822fi
19823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19824$as_echo_n "checking for C compiler default output file name... " >&6; }
19825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19826$as_echo "$ac_file" >&6; }
19827ac_exeext=$ac_cv_exeext
19828
19829rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19830ac_clean_files=$ac_clean_files_save
19831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19832$as_echo_n "checking for suffix of executables... " >&6; }
19833if { { ac_try="$ac_link"
19834case "(($ac_try" in
19835  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19836  *) ac_try_echo=$ac_try;;
19837esac
19838eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19839$as_echo "$ac_try_echo"; } >&5
19840  (eval "$ac_link") 2>&5
19841  ac_status=$?
19842  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19843  test $ac_status = 0; }; then :
19844  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19845# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19846# work properly (i.e., refer to `conftest.exe'), while it won't with
19847# `rm'.
19848for ac_file in conftest.exe conftest conftest.*; do
19849  test -f "$ac_file" || continue
19850  case $ac_file in
19851    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19852    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19853	  break;;
19854    * ) break;;
19855  esac
19856done
19857else
19858  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19859$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19860as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19861See \`config.log' for more details" "$LINENO" 5 ; }
19862fi
19863rm -f conftest conftest$ac_cv_exeext
19864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19865$as_echo "$ac_cv_exeext" >&6; }
19866
19867rm -f conftest.$ac_ext
19868EXEEXT=$ac_cv_exeext
19869ac_exeext=$EXEEXT
19870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19871/* end confdefs.h.  */
19872#include <stdio.h>
19873int
19874main ()
19875{
19876FILE *f = fopen ("conftest.out", "w");
19877 return ferror (f) || fclose (f) != 0;
19878
19879  ;
19880  return 0;
19881}
19882_ACEOF
19883ac_clean_files="$ac_clean_files conftest.out"
19884# Check that the compiler produces executables we can run.  If not, either
19885# the compiler is broken, or we cross compile.
19886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19887$as_echo_n "checking whether we are cross compiling... " >&6; }
19888if test "$cross_compiling" != yes; then
19889  { { ac_try="$ac_link"
19890case "(($ac_try" in
19891  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19892  *) ac_try_echo=$ac_try;;
19893esac
19894eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19895$as_echo "$ac_try_echo"; } >&5
19896  (eval "$ac_link") 2>&5
19897  ac_status=$?
19898  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19899  test $ac_status = 0; }
19900  if { ac_try='./conftest$ac_cv_exeext'
19901  { { case "(($ac_try" in
19902  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19903  *) ac_try_echo=$ac_try;;
19904esac
19905eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19906$as_echo "$ac_try_echo"; } >&5
19907  (eval "$ac_try") 2>&5
19908  ac_status=$?
19909  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19910  test $ac_status = 0; }; }; then
19911    cross_compiling=no
19912  else
19913    if test "$cross_compiling" = maybe; then
19914	cross_compiling=yes
19915    else
19916	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19917$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19918as_fn_error $? "cannot run C compiled programs.
19919If you meant to cross compile, use \`--host'.
19920See \`config.log' for more details" "$LINENO" 5 ; }
19921    fi
19922  fi
19923fi
19924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19925$as_echo "$cross_compiling" >&6; }
19926
19927rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19928ac_clean_files=$ac_clean_files_save
19929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19930$as_echo_n "checking for suffix of object files... " >&6; }
19931if test "${ac_cv_objext+set}" = set; then :
19932  $as_echo_n "(cached) " >&6
19933else
19934  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19935/* end confdefs.h.  */
19936
19937int
19938main ()
19939{
19940
19941  ;
19942  return 0;
19943}
19944_ACEOF
19945rm -f conftest.o conftest.obj
19946if { { ac_try="$ac_compile"
19947case "(($ac_try" in
19948  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19949  *) ac_try_echo=$ac_try;;
19950esac
19951eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19952$as_echo "$ac_try_echo"; } >&5
19953  (eval "$ac_compile") 2>&5
19954  ac_status=$?
19955  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19956  test $ac_status = 0; }; then :
19957  for ac_file in conftest.o conftest.obj conftest.*; do
19958  test -f "$ac_file" || continue;
19959  case $ac_file in
19960    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19961    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19962       break;;
19963  esac
19964done
19965else
19966  $as_echo "$as_me: failed program was:" >&5
19967sed 's/^/| /' conftest.$ac_ext >&5
19968
19969{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19971as_fn_error $? "cannot compute suffix of object files: cannot compile
19972See \`config.log' for more details" "$LINENO" 5 ; }
19973fi
19974rm -f conftest.$ac_cv_objext conftest.$ac_ext
19975fi
19976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19977$as_echo "$ac_cv_objext" >&6; }
19978OBJEXT=$ac_cv_objext
19979ac_objext=$OBJEXT
19980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19981$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19982if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19983  $as_echo_n "(cached) " >&6
19984else
19985  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19986/* end confdefs.h.  */
19987
19988int
19989main ()
19990{
19991#ifndef __GNUC__
19992       choke me
19993#endif
19994
19995  ;
19996  return 0;
19997}
19998_ACEOF
19999if ac_fn_c_try_compile "$LINENO"; then :
20000  ac_compiler_gnu=yes
20001else
20002  ac_compiler_gnu=no
20003fi
20004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20005ac_cv_c_compiler_gnu=$ac_compiler_gnu
20006
20007fi
20008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20009$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20010if test $ac_compiler_gnu = yes; then
20011  GCC=yes
20012else
20013  GCC=
20014fi
20015ac_test_CFLAGS=${CFLAGS+set}
20016ac_save_CFLAGS=$CFLAGS
20017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20018$as_echo_n "checking whether $CC accepts -g... " >&6; }
20019if test "${ac_cv_prog_cc_g+set}" = set; then :
20020  $as_echo_n "(cached) " >&6
20021else
20022  ac_save_c_werror_flag=$ac_c_werror_flag
20023   ac_c_werror_flag=yes
20024   ac_cv_prog_cc_g=no
20025   CFLAGS="-g"
20026   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20027/* end confdefs.h.  */
20028
20029int
20030main ()
20031{
20032
20033  ;
20034  return 0;
20035}
20036_ACEOF
20037if ac_fn_c_try_compile "$LINENO"; then :
20038  ac_cv_prog_cc_g=yes
20039else
20040  CFLAGS=""
20041      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20042/* end confdefs.h.  */
20043
20044int
20045main ()
20046{
20047
20048  ;
20049  return 0;
20050}
20051_ACEOF
20052if ac_fn_c_try_compile "$LINENO"; then :
20053
20054else
20055  ac_c_werror_flag=$ac_save_c_werror_flag
20056	 CFLAGS="-g"
20057	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20058/* end confdefs.h.  */
20059
20060int
20061main ()
20062{
20063
20064  ;
20065  return 0;
20066}
20067_ACEOF
20068if ac_fn_c_try_compile "$LINENO"; then :
20069  ac_cv_prog_cc_g=yes
20070fi
20071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20072fi
20073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20074fi
20075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20076   ac_c_werror_flag=$ac_save_c_werror_flag
20077fi
20078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20079$as_echo "$ac_cv_prog_cc_g" >&6; }
20080if test "$ac_test_CFLAGS" = set; then
20081  CFLAGS=$ac_save_CFLAGS
20082elif test $ac_cv_prog_cc_g = yes; then
20083  if test "$GCC" = yes; then
20084    CFLAGS="-g -O2"
20085  else
20086    CFLAGS="-g"
20087  fi
20088else
20089  if test "$GCC" = yes; then
20090    CFLAGS="-O2"
20091  else
20092    CFLAGS=
20093  fi
20094fi
20095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20096$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20097if test "${ac_cv_prog_cc_c89+set}" = set; then :
20098  $as_echo_n "(cached) " >&6
20099else
20100  ac_cv_prog_cc_c89=no
20101ac_save_CC=$CC
20102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20103/* end confdefs.h.  */
20104#include <stdarg.h>
20105#include <stdio.h>
20106#include <sys/types.h>
20107#include <sys/stat.h>
20108/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20109struct buf { int x; };
20110FILE * (*rcsopen) (struct buf *, struct stat *, int);
20111static char *e (p, i)
20112     char **p;
20113     int i;
20114{
20115  return p[i];
20116}
20117static char *f (char * (*g) (char **, int), char **p, ...)
20118{
20119  char *s;
20120  va_list v;
20121  va_start (v,p);
20122  s = g (p, va_arg (v,int));
20123  va_end (v);
20124  return s;
20125}
20126
20127/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20128   function prototypes and stuff, but not '\xHH' hex character constants.
20129   These don't provoke an error unfortunately, instead are silently treated
20130   as 'x'.  The following induces an error, until -std is added to get
20131   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20132   array size at least.  It's necessary to write '\x00'==0 to get something
20133   that's true only with -std.  */
20134int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20135
20136/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20137   inside strings and character constants.  */
20138#define FOO(x) 'x'
20139int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20140
20141int test (int i, double x);
20142struct s1 {int (*f) (int a);};
20143struct s2 {int (*f) (double a);};
20144int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20145int argc;
20146char **argv;
20147int
20148main ()
20149{
20150return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20151  ;
20152  return 0;
20153}
20154_ACEOF
20155for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20156	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20157do
20158  CC="$ac_save_CC $ac_arg"
20159  if ac_fn_c_try_compile "$LINENO"; then :
20160  ac_cv_prog_cc_c89=$ac_arg
20161fi
20162rm -f core conftest.err conftest.$ac_objext
20163  test "x$ac_cv_prog_cc_c89" != "xno" && break
20164done
20165rm -f conftest.$ac_ext
20166CC=$ac_save_CC
20167
20168fi
20169# AC_CACHE_VAL
20170case "x$ac_cv_prog_cc_c89" in
20171  x)
20172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20173$as_echo "none needed" >&6; } ;;
20174  xno)
20175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20176$as_echo "unsupported" >&6; } ;;
20177  *)
20178    CC="$CC $ac_cv_prog_cc_c89"
20179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20180$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20181esac
20182if test "x$ac_cv_prog_cc_c89" != xno; then :
20183
20184fi
20185
20186ac_ext=cpp
20187ac_cpp='$CXXCPP $CPPFLAGS'
20188ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20189ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20190ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20191
20192
20193### Locate C++ compiler (CXX)
20194
20195if test "x$CXX" != x; then
20196  COMPILER_CHECK_LIST="$CXX"
20197elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20198  COMPILER_CHECK_LIST="cl"
20199elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20200  COMPILER_CHECK_LIST="CC g++"
20201else
20202  COMPILER_CHECK_LIST="g++ CC"
20203fi
20204
20205
20206  COMPILER_NAME=C++
20207
20208  CXX=
20209  # If TOOLS_DIR is set, check for all compiler names in there first
20210  # before checking the rest of the PATH.
20211  if test -n "$TOOLS_DIR"; then
20212    PATH_save="$PATH"
20213    PATH="$TOOLS_DIR"
20214    for ac_prog in $COMPILER_CHECK_LIST
20215do
20216  # Extract the first word of "$ac_prog", so it can be a program name with args.
20217set dummy $ac_prog; ac_word=$2
20218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20219$as_echo_n "checking for $ac_word... " >&6; }
20220if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20221  $as_echo_n "(cached) " >&6
20222else
20223  case $TOOLS_DIR_CXX in
20224  [\\/]* | ?:[\\/]*)
20225  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20226  ;;
20227  *)
20228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20229for as_dir in $PATH
20230do
20231  IFS=$as_save_IFS
20232  test -z "$as_dir" && as_dir=.
20233    for ac_exec_ext in '' $ac_executable_extensions; do
20234  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20235    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20237    break 2
20238  fi
20239done
20240  done
20241IFS=$as_save_IFS
20242
20243  ;;
20244esac
20245fi
20246TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20247if test -n "$TOOLS_DIR_CXX"; then
20248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20249$as_echo "$TOOLS_DIR_CXX" >&6; }
20250else
20251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20252$as_echo "no" >&6; }
20253fi
20254
20255
20256  test -n "$TOOLS_DIR_CXX" && break
20257done
20258
20259    CXX=$TOOLS_DIR_CXX
20260    PATH="$PATH_save"
20261  fi
20262
20263  # AC_PATH_PROGS can't be run multiple times with the same variable,
20264  # so create a new name for this run.
20265  if test "x$CXX" = x; then
20266    for ac_prog in $COMPILER_CHECK_LIST
20267do
20268  # Extract the first word of "$ac_prog", so it can be a program name with args.
20269set dummy $ac_prog; ac_word=$2
20270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20271$as_echo_n "checking for $ac_word... " >&6; }
20272if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20273  $as_echo_n "(cached) " >&6
20274else
20275  case $POTENTIAL_CXX in
20276  [\\/]* | ?:[\\/]*)
20277  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20278  ;;
20279  *)
20280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20281for as_dir in $PATH
20282do
20283  IFS=$as_save_IFS
20284  test -z "$as_dir" && as_dir=.
20285    for ac_exec_ext in '' $ac_executable_extensions; do
20286  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20287    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20289    break 2
20290  fi
20291done
20292  done
20293IFS=$as_save_IFS
20294
20295  ;;
20296esac
20297fi
20298POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20299if test -n "$POTENTIAL_CXX"; then
20300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20301$as_echo "$POTENTIAL_CXX" >&6; }
20302else
20303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20304$as_echo "no" >&6; }
20305fi
20306
20307
20308  test -n "$POTENTIAL_CXX" && break
20309done
20310
20311    CXX=$POTENTIAL_CXX
20312  fi
20313
20314  if test "x$CXX" = x; then
20315
20316    # Print a helpful message on how to acquire the necessary build dependency.
20317    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20318    MISSING_DEPENDENCY=devkit
20319    PKGHANDLER_COMMAND=
20320
20321    case $PKGHANDLER in
20322	apt-get)
20323                apt_help     $MISSING_DEPENDENCY ;;
20324    yum)
20325                yum_help     $MISSING_DEPENDENCY ;;
20326	port)
20327                port_help    $MISSING_DEPENDENCY ;;
20328	pkgutil)
20329                pkgutil_help $MISSING_DEPENDENCY ;;
20330	pkgadd)
20331                pkgadd_help  $MISSING_DEPENDENCY ;;
20332    * )
20333      break ;;
20334    esac
20335
20336    if test "x$PKGHANDLER_COMMAND" != x; then
20337        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20338    fi
20339
20340      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20341  fi
20342
20343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20344
20345  # First separate the path from the arguments. This will split at the first
20346  # space.
20347  complete="$CXX"
20348  path="${complete%% *}"
20349  tmp="$complete EOL"
20350  arguments="${tmp#* }"
20351
20352  # Input might be given as Windows format, start by converting to
20353  # unix format.
20354  new_path=`$CYGPATH -u "$path"`
20355
20356  # Now try to locate executable using which
20357  new_path=`$WHICH "$new_path" 2> /dev/null`
20358  # bat and cmd files are not always considered executable in cygwin causing which
20359  # to not find them
20360  if test "x$new_path" = x \
20361           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20362           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20363    new_path=`$CYGPATH -u "$path"`
20364  fi
20365  if test "x$new_path" = x; then
20366    # Oops. Which didn't find the executable.
20367    # The splitting of arguments from the executable at a space might have been incorrect,
20368    # since paths with space are more likely in Windows. Give it another try with the whole
20369    # argument.
20370    path="$complete"
20371    arguments="EOL"
20372    new_path=`$CYGPATH -u "$path"`
20373    new_path=`$WHICH "$new_path" 2> /dev/null`
20374    # bat and cmd files are not always considered executable in cygwin causing which
20375    # to not find them
20376    if test "x$new_path" = x \
20377             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20378             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20379      new_path=`$CYGPATH -u "$path"`
20380    fi
20381    if test "x$new_path" = x; then
20382      # It's still not found. Now this is an unrecoverable error.
20383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20384$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20385      has_space=`$ECHO "$complete" | $GREP " "`
20386      if test "x$has_space" != x; then
20387        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20388$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20389      fi
20390      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20391    fi
20392  fi
20393
20394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20397  # "foo.exe" is OK but "foo" is an error.
20398  #
20399  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20400  # It is also a way to make sure we got the proper file name for the real test later on.
20401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20402  if test "x$test_shortpath" = x; then
20403    # Short path failed, file does not exist as specified.
20404    # Try adding .exe or .cmd
20405    if test -f "${new_path}.exe"; then
20406       input_to_shortpath="${new_path}.exe"
20407    elif test -f "${new_path}.cmd"; then
20408       input_to_shortpath="${new_path}.cmd"
20409    else
20410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20411$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20412      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20413$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20414      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20415    fi
20416  else
20417    input_to_shortpath="$new_path"
20418  fi
20419
20420  # Call helper function which possibly converts this using DOS-style short mode.
20421  # If so, the updated path is stored in $new_path.
20422  new_path="$input_to_shortpath"
20423
20424  input_path="$input_to_shortpath"
20425  # Check if we need to convert this using DOS-style short mode. If the path
20426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20427  # take no chances and rewrite it.
20428  # Note: m4 eats our [], so we need to use [ and ] instead.
20429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20430  if test "x$has_forbidden_chars" != x; then
20431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20435      # Going to short mode and back again did indeed matter. Since short mode is
20436      # case insensitive, let's make it lowercase to improve readability.
20437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20438      # Now convert it back to Unix-stile (cygpath)
20439      input_path=`$CYGPATH -u "$shortmode_path"`
20440      new_path="$input_path"
20441    fi
20442  fi
20443
20444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20445  if test "x$test_cygdrive_prefix" = x; then
20446    # As a simple fix, exclude /usr/bin since it's not a real path.
20447    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20449      # a path prefixed by /cygdrive for fixpath to work.
20450      new_path="$CYGWIN_ROOT_PATH$input_path"
20451    fi
20452  fi
20453
20454  # remove trailing .exe if any
20455  new_path="${new_path/%.exe/}"
20456
20457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20458
20459  # First separate the path from the arguments. This will split at the first
20460  # space.
20461  complete="$CXX"
20462  path="${complete%% *}"
20463  tmp="$complete EOL"
20464  arguments="${tmp#* }"
20465
20466  # Input might be given as Windows format, start by converting to
20467  # unix format.
20468  new_path="$path"
20469
20470  windows_path="$new_path"
20471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20472    unix_path=`$CYGPATH -u "$windows_path"`
20473    new_path="$unix_path"
20474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20476    new_path="$unix_path"
20477  fi
20478
20479
20480  # Now try to locate executable using which
20481  new_path=`$WHICH "$new_path" 2> /dev/null`
20482
20483  if test "x$new_path" = x; then
20484    # Oops. Which didn't find the executable.
20485    # The splitting of arguments from the executable at a space might have been incorrect,
20486    # since paths with space are more likely in Windows. Give it another try with the whole
20487    # argument.
20488    path="$complete"
20489    arguments="EOL"
20490    new_path="$path"
20491
20492  windows_path="$new_path"
20493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20494    unix_path=`$CYGPATH -u "$windows_path"`
20495    new_path="$unix_path"
20496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20498    new_path="$unix_path"
20499  fi
20500
20501
20502    new_path=`$WHICH "$new_path" 2> /dev/null`
20503
20504    if test "x$new_path" = x; then
20505      # It's still not found. Now this is an unrecoverable error.
20506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20507$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20508      has_space=`$ECHO "$complete" | $GREP " "`
20509      if test "x$has_space" != x; then
20510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20512      fi
20513      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20514    fi
20515  fi
20516
20517  # Now new_path has a complete unix path to the binary
20518  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20519    # Keep paths in /bin as-is, but remove trailing .exe if any
20520    new_path="${new_path/%.exe/}"
20521    # Do not save /bin paths to all_fixpath_prefixes!
20522  else
20523    # Not in mixed or Windows style, start by that.
20524    new_path=`cmd //c echo $new_path`
20525
20526  input_path="$new_path"
20527  # Check if we need to convert this using DOS-style short mode. If the path
20528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20529  # take no chances and rewrite it.
20530  # Note: m4 eats our [], so we need to use [ and ] instead.
20531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20532  if test "x$has_forbidden_chars" != x; then
20533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20535  fi
20536
20537    # Output is in $new_path
20538
20539  windows_path="$new_path"
20540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20541    unix_path=`$CYGPATH -u "$windows_path"`
20542    new_path="$unix_path"
20543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20545    new_path="$unix_path"
20546  fi
20547
20548    # remove trailing .exe if any
20549    new_path="${new_path/%.exe/}"
20550
20551    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20552    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20553  fi
20554
20555  else
20556    # We're on a posix platform. Hooray! :)
20557    # First separate the path from the arguments. This will split at the first
20558    # space.
20559    complete="$CXX"
20560    path="${complete%% *}"
20561    tmp="$complete EOL"
20562    arguments="${tmp#* }"
20563
20564    # Cannot rely on the command "which" here since it doesn't always work.
20565    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20566    if test -z "$is_absolute_path"; then
20567      # Path to executable is not absolute. Find it.
20568      IFS_save="$IFS"
20569      IFS=:
20570      for p in $PATH; do
20571        if test -f "$p/$path" && test -x "$p/$path"; then
20572          new_path="$p/$path"
20573          break
20574        fi
20575      done
20576      IFS="$IFS_save"
20577    else
20578      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20579$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20580      new_path="$path"
20581    fi
20582
20583    if test "x$new_path" = x; then
20584        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20585$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20586        has_space=`$ECHO "$complete" | $GREP " "`
20587        if test "x$has_space" != x; then
20588          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20589$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20590        fi
20591        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20592      fi
20593  fi
20594
20595      # Now join together the path and the arguments once again
20596      if test "x$arguments" != xEOL; then
20597        new_complete="$new_path ${arguments% *}"
20598      else
20599        new_complete="$new_path"
20600      fi
20601
20602  if test "x$complete" != "x$new_complete"; then
20603      CXX="$new_complete"
20604      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20605$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20606    fi
20607
20608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20609$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20610  TEST_COMPILER="$CXX"
20611
20612    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20613        # Follow a chain of symbolic links. Use readlink
20614        # where it exists, else fall back to horribly
20615        # complicated shell code.
20616        if test "x$READLINK_TESTED" != yes; then
20617            # On MacOSX there is a readlink tool with a different
20618            # purpose than the GNU readlink tool. Check the found readlink.
20619            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20620            if test "x$ISGNU" = x; then
20621                 # A readlink that we do not know how to use.
20622                 # Are there other non-GNU readlinks out there?
20623                 READLINK_TESTED=yes
20624                 READLINK=
20625            fi
20626        fi
20627
20628        if test "x$READLINK" != x; then
20629            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20630        else
20631            # Save the current directory for restoring afterwards
20632            STARTDIR=$PWD
20633            COUNTER=0
20634            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20635            sym_link_file=`$BASENAME $TEST_COMPILER`
20636            # Use the system pwd and not the shell builtin to resolve directory symlinks
20637            cd $sym_link_dir
20638            cd `$THEPWDCMD`
20639            sym_link_dir=`$THEPWDCMD`
20640            # Resolve file symlinks
20641            while test $COUNTER -lt 20; do
20642                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20643                if test "x$ISLINK" == x; then
20644                    # This is not a symbolic link! We are done!
20645                    break
20646                fi
20647                # Again resolve directory symlinks since the target of the just found
20648                # link could be in a different directory
20649                cd `$DIRNAME $ISLINK`
20650                sym_link_dir=`$THEPWDCMD`
20651                sym_link_file=`$BASENAME $ISLINK`
20652                let COUNTER=COUNTER+1
20653            done
20654            cd $STARTDIR
20655            TEST_COMPILER=$sym_link_dir/$sym_link_file
20656        fi
20657    fi
20658
20659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20660$as_echo "$TEST_COMPILER" >&6; }
20661  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20662$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20663
20664  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20665  if test "x$COMPILER_BASENAME" = "xccache"; then
20666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20667$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20668    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20669    # We want to control ccache invocation ourselves, so ignore this cc and try
20670    # searching again.
20671
20672    # Remove the path to the fake ccache cc from the PATH
20673    RETRY_COMPILER_SAVED_PATH="$PATH"
20674    COMPILER_DIRNAME=`$DIRNAME $CXX`
20675    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20676
20677    # Try again looking for our compiler
20678    if test -n "$ac_tool_prefix"; then
20679  for ac_prog in $COMPILER_CHECK_LIST
20680  do
20681    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20682set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20684$as_echo_n "checking for $ac_word... " >&6; }
20685if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20686  $as_echo_n "(cached) " >&6
20687else
20688  if test -n "$PROPER_COMPILER_CXX"; then
20689  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20690else
20691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20692for as_dir in $PATH
20693do
20694  IFS=$as_save_IFS
20695  test -z "$as_dir" && as_dir=.
20696    for ac_exec_ext in '' $ac_executable_extensions; do
20697  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20698    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20700    break 2
20701  fi
20702done
20703  done
20704IFS=$as_save_IFS
20705
20706fi
20707fi
20708PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20709if test -n "$PROPER_COMPILER_CXX"; then
20710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20711$as_echo "$PROPER_COMPILER_CXX" >&6; }
20712else
20713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20714$as_echo "no" >&6; }
20715fi
20716
20717
20718    test -n "$PROPER_COMPILER_CXX" && break
20719  done
20720fi
20721if test -z "$PROPER_COMPILER_CXX"; then
20722  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20723  for ac_prog in $COMPILER_CHECK_LIST
20724do
20725  # Extract the first word of "$ac_prog", so it can be a program name with args.
20726set dummy $ac_prog; ac_word=$2
20727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20728$as_echo_n "checking for $ac_word... " >&6; }
20729if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20730  $as_echo_n "(cached) " >&6
20731else
20732  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20733  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20734else
20735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20736for as_dir in $PATH
20737do
20738  IFS=$as_save_IFS
20739  test -z "$as_dir" && as_dir=.
20740    for ac_exec_ext in '' $ac_executable_extensions; do
20741  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20742    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20744    break 2
20745  fi
20746done
20747  done
20748IFS=$as_save_IFS
20749
20750fi
20751fi
20752ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20753if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20755$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20756else
20757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20758$as_echo "no" >&6; }
20759fi
20760
20761
20762  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20763done
20764
20765  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20766    PROPER_COMPILER_CXX=""
20767  else
20768    case $cross_compiling:$ac_tool_warned in
20769yes:)
20770{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20771$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20772ac_tool_warned=yes ;;
20773esac
20774    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20775  fi
20776fi
20777
20778
20779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20780
20781  # First separate the path from the arguments. This will split at the first
20782  # space.
20783  complete="$PROPER_COMPILER_CXX"
20784  path="${complete%% *}"
20785  tmp="$complete EOL"
20786  arguments="${tmp#* }"
20787
20788  # Input might be given as Windows format, start by converting to
20789  # unix format.
20790  new_path=`$CYGPATH -u "$path"`
20791
20792  # Now try to locate executable using which
20793  new_path=`$WHICH "$new_path" 2> /dev/null`
20794  # bat and cmd files are not always considered executable in cygwin causing which
20795  # to not find them
20796  if test "x$new_path" = x \
20797           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20798           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20799    new_path=`$CYGPATH -u "$path"`
20800  fi
20801  if test "x$new_path" = x; then
20802    # Oops. Which didn't find the executable.
20803    # The splitting of arguments from the executable at a space might have been incorrect,
20804    # since paths with space are more likely in Windows. Give it another try with the whole
20805    # argument.
20806    path="$complete"
20807    arguments="EOL"
20808    new_path=`$CYGPATH -u "$path"`
20809    new_path=`$WHICH "$new_path" 2> /dev/null`
20810    # bat and cmd files are not always considered executable in cygwin causing which
20811    # to not find them
20812    if test "x$new_path" = x \
20813             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20814             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20815      new_path=`$CYGPATH -u "$path"`
20816    fi
20817    if test "x$new_path" = x; then
20818      # It's still not found. Now this is an unrecoverable error.
20819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20820$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20821      has_space=`$ECHO "$complete" | $GREP " "`
20822      if test "x$has_space" != x; then
20823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20825      fi
20826      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20827    fi
20828  fi
20829
20830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20833  # "foo.exe" is OK but "foo" is an error.
20834  #
20835  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20836  # It is also a way to make sure we got the proper file name for the real test later on.
20837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20838  if test "x$test_shortpath" = x; then
20839    # Short path failed, file does not exist as specified.
20840    # Try adding .exe or .cmd
20841    if test -f "${new_path}.exe"; then
20842       input_to_shortpath="${new_path}.exe"
20843    elif test -f "${new_path}.cmd"; then
20844       input_to_shortpath="${new_path}.cmd"
20845    else
20846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20847$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20848      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20849$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20850      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20851    fi
20852  else
20853    input_to_shortpath="$new_path"
20854  fi
20855
20856  # Call helper function which possibly converts this using DOS-style short mode.
20857  # If so, the updated path is stored in $new_path.
20858  new_path="$input_to_shortpath"
20859
20860  input_path="$input_to_shortpath"
20861  # Check if we need to convert this using DOS-style short mode. If the path
20862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20863  # take no chances and rewrite it.
20864  # Note: m4 eats our [], so we need to use [ and ] instead.
20865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20866  if test "x$has_forbidden_chars" != x; then
20867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20871      # Going to short mode and back again did indeed matter. Since short mode is
20872      # case insensitive, let's make it lowercase to improve readability.
20873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20874      # Now convert it back to Unix-stile (cygpath)
20875      input_path=`$CYGPATH -u "$shortmode_path"`
20876      new_path="$input_path"
20877    fi
20878  fi
20879
20880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20881  if test "x$test_cygdrive_prefix" = x; then
20882    # As a simple fix, exclude /usr/bin since it's not a real path.
20883    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20885      # a path prefixed by /cygdrive for fixpath to work.
20886      new_path="$CYGWIN_ROOT_PATH$input_path"
20887    fi
20888  fi
20889
20890  # remove trailing .exe if any
20891  new_path="${new_path/%.exe/}"
20892
20893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20894
20895  # First separate the path from the arguments. This will split at the first
20896  # space.
20897  complete="$PROPER_COMPILER_CXX"
20898  path="${complete%% *}"
20899  tmp="$complete EOL"
20900  arguments="${tmp#* }"
20901
20902  # Input might be given as Windows format, start by converting to
20903  # unix format.
20904  new_path="$path"
20905
20906  windows_path="$new_path"
20907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20908    unix_path=`$CYGPATH -u "$windows_path"`
20909    new_path="$unix_path"
20910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20912    new_path="$unix_path"
20913  fi
20914
20915
20916  # Now try to locate executable using which
20917  new_path=`$WHICH "$new_path" 2> /dev/null`
20918
20919  if test "x$new_path" = x; then
20920    # Oops. Which didn't find the executable.
20921    # The splitting of arguments from the executable at a space might have been incorrect,
20922    # since paths with space are more likely in Windows. Give it another try with the whole
20923    # argument.
20924    path="$complete"
20925    arguments="EOL"
20926    new_path="$path"
20927
20928  windows_path="$new_path"
20929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20930    unix_path=`$CYGPATH -u "$windows_path"`
20931    new_path="$unix_path"
20932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20934    new_path="$unix_path"
20935  fi
20936
20937
20938    new_path=`$WHICH "$new_path" 2> /dev/null`
20939
20940    if test "x$new_path" = x; then
20941      # It's still not found. Now this is an unrecoverable error.
20942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20943$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20944      has_space=`$ECHO "$complete" | $GREP " "`
20945      if test "x$has_space" != x; then
20946        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20947$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20948      fi
20949      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20950    fi
20951  fi
20952
20953  # Now new_path has a complete unix path to the binary
20954  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20955    # Keep paths in /bin as-is, but remove trailing .exe if any
20956    new_path="${new_path/%.exe/}"
20957    # Do not save /bin paths to all_fixpath_prefixes!
20958  else
20959    # Not in mixed or Windows style, start by that.
20960    new_path=`cmd //c echo $new_path`
20961
20962  input_path="$new_path"
20963  # Check if we need to convert this using DOS-style short mode. If the path
20964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20965  # take no chances and rewrite it.
20966  # Note: m4 eats our [], so we need to use [ and ] instead.
20967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20968  if test "x$has_forbidden_chars" != x; then
20969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20970    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20971  fi
20972
20973    # Output is in $new_path
20974
20975  windows_path="$new_path"
20976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20977    unix_path=`$CYGPATH -u "$windows_path"`
20978    new_path="$unix_path"
20979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20981    new_path="$unix_path"
20982  fi
20983
20984    # remove trailing .exe if any
20985    new_path="${new_path/%.exe/}"
20986
20987    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20988    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20989  fi
20990
20991  else
20992    # We're on a posix platform. Hooray! :)
20993    # First separate the path from the arguments. This will split at the first
20994    # space.
20995    complete="$PROPER_COMPILER_CXX"
20996    path="${complete%% *}"
20997    tmp="$complete EOL"
20998    arguments="${tmp#* }"
20999
21000    # Cannot rely on the command "which" here since it doesn't always work.
21001    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21002    if test -z "$is_absolute_path"; then
21003      # Path to executable is not absolute. Find it.
21004      IFS_save="$IFS"
21005      IFS=:
21006      for p in $PATH; do
21007        if test -f "$p/$path" && test -x "$p/$path"; then
21008          new_path="$p/$path"
21009          break
21010        fi
21011      done
21012      IFS="$IFS_save"
21013    else
21014      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21015$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21016      new_path="$path"
21017    fi
21018
21019    if test "x$new_path" = x; then
21020        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21021$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21022        has_space=`$ECHO "$complete" | $GREP " "`
21023        if test "x$has_space" != x; then
21024          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21025$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21026        fi
21027        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21028      fi
21029  fi
21030
21031      # Now join together the path and the arguments once again
21032      if test "x$arguments" != xEOL; then
21033        new_complete="$new_path ${arguments% *}"
21034      else
21035        new_complete="$new_path"
21036      fi
21037
21038  if test "x$complete" != "x$new_complete"; then
21039      PROPER_COMPILER_CXX="$new_complete"
21040      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21041$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21042    fi
21043
21044    PATH="$RETRY_COMPILER_SAVED_PATH"
21045
21046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21047$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21048
21049    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21050        # Follow a chain of symbolic links. Use readlink
21051        # where it exists, else fall back to horribly
21052        # complicated shell code.
21053        if test "x$READLINK_TESTED" != yes; then
21054            # On MacOSX there is a readlink tool with a different
21055            # purpose than the GNU readlink tool. Check the found readlink.
21056            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21057            if test "x$ISGNU" = x; then
21058                 # A readlink that we do not know how to use.
21059                 # Are there other non-GNU readlinks out there?
21060                 READLINK_TESTED=yes
21061                 READLINK=
21062            fi
21063        fi
21064
21065        if test "x$READLINK" != x; then
21066            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21067        else
21068            # Save the current directory for restoring afterwards
21069            STARTDIR=$PWD
21070            COUNTER=0
21071            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21072            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21073            # Use the system pwd and not the shell builtin to resolve directory symlinks
21074            cd $sym_link_dir
21075            cd `$THEPWDCMD`
21076            sym_link_dir=`$THEPWDCMD`
21077            # Resolve file symlinks
21078            while test $COUNTER -lt 20; do
21079                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21080                if test "x$ISLINK" == x; then
21081                    # This is not a symbolic link! We are done!
21082                    break
21083                fi
21084                # Again resolve directory symlinks since the target of the just found
21085                # link could be in a different directory
21086                cd `$DIRNAME $ISLINK`
21087                sym_link_dir=`$THEPWDCMD`
21088                sym_link_file=`$BASENAME $ISLINK`
21089                let COUNTER=COUNTER+1
21090            done
21091            cd $STARTDIR
21092            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21093        fi
21094    fi
21095
21096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21097$as_echo "$PROPER_COMPILER_CXX" >&6; }
21098    CXX="$PROPER_COMPILER_CXX"
21099  else
21100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21101$as_echo "no, keeping CXX" >&6; }
21102    CXX="$TEST_COMPILER"
21103  fi
21104
21105  COMPILER=$CXX
21106  COMPILER_NAME=$COMPILER_NAME
21107
21108  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21109    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21110    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21111    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21112    if test $? -ne 0; then
21113      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21114
21115      { $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
21116$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21117      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21118$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21119      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21120    else
21121      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21122      COMPILER_VENDOR="Sun Studio"
21123    fi
21124  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21125    # First line typically looks something like:
21126    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21127    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21128    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21129    COMPILER_VENDOR="Microsoft CL.EXE"
21130    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21131    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21132      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21133        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21134      fi
21135    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21136      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21137        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21138      fi
21139    fi
21140  else
21141    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21142    # Check that this is likely to be GCC.
21143    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21144    if test $? -ne 0; then
21145      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21146$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21147      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21148$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21149      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21150    fi
21151
21152    # First line typically looks something like:
21153    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21154    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21155    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21156  fi
21157  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21158  CXX_VERSION="$COMPILER_VERSION"
21159  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21160  CXX_VENDOR="$COMPILER_VENDOR"
21161
21162  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21163$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21164
21165
21166# Now that we have resolved CXX ourself, let autoconf have its go at it
21167ac_ext=cpp
21168ac_cpp='$CXXCPP $CPPFLAGS'
21169ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21170ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21171ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21172if test -z "$CXX"; then
21173  if test -n "$CCC"; then
21174    CXX=$CCC
21175  else
21176    if test -n "$ac_tool_prefix"; then
21177  for ac_prog in $CXX
21178  do
21179    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21180set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21182$as_echo_n "checking for $ac_word... " >&6; }
21183if test "${ac_cv_prog_CXX+set}" = set; then :
21184  $as_echo_n "(cached) " >&6
21185else
21186  if test -n "$CXX"; then
21187  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21188else
21189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21190for as_dir in $PATH
21191do
21192  IFS=$as_save_IFS
21193  test -z "$as_dir" && as_dir=.
21194    for ac_exec_ext in '' $ac_executable_extensions; do
21195  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21196    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21198    break 2
21199  fi
21200done
21201  done
21202IFS=$as_save_IFS
21203
21204fi
21205fi
21206CXX=$ac_cv_prog_CXX
21207if test -n "$CXX"; then
21208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21209$as_echo "$CXX" >&6; }
21210else
21211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21212$as_echo "no" >&6; }
21213fi
21214
21215
21216    test -n "$CXX" && break
21217  done
21218fi
21219if test -z "$CXX"; then
21220  ac_ct_CXX=$CXX
21221  for ac_prog in $CXX
21222do
21223  # Extract the first word of "$ac_prog", so it can be a program name with args.
21224set dummy $ac_prog; ac_word=$2
21225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21226$as_echo_n "checking for $ac_word... " >&6; }
21227if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21228  $as_echo_n "(cached) " >&6
21229else
21230  if test -n "$ac_ct_CXX"; then
21231  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21232else
21233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21234for as_dir in $PATH
21235do
21236  IFS=$as_save_IFS
21237  test -z "$as_dir" && as_dir=.
21238    for ac_exec_ext in '' $ac_executable_extensions; do
21239  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21240    ac_cv_prog_ac_ct_CXX="$ac_prog"
21241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21242    break 2
21243  fi
21244done
21245  done
21246IFS=$as_save_IFS
21247
21248fi
21249fi
21250ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21251if test -n "$ac_ct_CXX"; then
21252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21253$as_echo "$ac_ct_CXX" >&6; }
21254else
21255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21256$as_echo "no" >&6; }
21257fi
21258
21259
21260  test -n "$ac_ct_CXX" && break
21261done
21262
21263  if test "x$ac_ct_CXX" = x; then
21264    CXX="g++"
21265  else
21266    case $cross_compiling:$ac_tool_warned in
21267yes:)
21268{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21269$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21270ac_tool_warned=yes ;;
21271esac
21272    CXX=$ac_ct_CXX
21273  fi
21274fi
21275
21276  fi
21277fi
21278# Provide some information about the compiler.
21279$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21280set X $ac_compile
21281ac_compiler=$2
21282for ac_option in --version -v -V -qversion; do
21283  { { ac_try="$ac_compiler $ac_option >&5"
21284case "(($ac_try" in
21285  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21286  *) ac_try_echo=$ac_try;;
21287esac
21288eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21289$as_echo "$ac_try_echo"; } >&5
21290  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21291  ac_status=$?
21292  if test -s conftest.err; then
21293    sed '10a\
21294... rest of stderr output deleted ...
21295         10q' conftest.err >conftest.er1
21296    cat conftest.er1 >&5
21297  fi
21298  rm -f conftest.er1 conftest.err
21299  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21300  test $ac_status = 0; }
21301done
21302
21303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21304$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21305if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21306  $as_echo_n "(cached) " >&6
21307else
21308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21309/* end confdefs.h.  */
21310
21311int
21312main ()
21313{
21314#ifndef __GNUC__
21315       choke me
21316#endif
21317
21318  ;
21319  return 0;
21320}
21321_ACEOF
21322if ac_fn_cxx_try_compile "$LINENO"; then :
21323  ac_compiler_gnu=yes
21324else
21325  ac_compiler_gnu=no
21326fi
21327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21328ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21329
21330fi
21331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21332$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21333if test $ac_compiler_gnu = yes; then
21334  GXX=yes
21335else
21336  GXX=
21337fi
21338ac_test_CXXFLAGS=${CXXFLAGS+set}
21339ac_save_CXXFLAGS=$CXXFLAGS
21340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21341$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21342if test "${ac_cv_prog_cxx_g+set}" = set; then :
21343  $as_echo_n "(cached) " >&6
21344else
21345  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21346   ac_cxx_werror_flag=yes
21347   ac_cv_prog_cxx_g=no
21348   CXXFLAGS="-g"
21349   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21350/* end confdefs.h.  */
21351
21352int
21353main ()
21354{
21355
21356  ;
21357  return 0;
21358}
21359_ACEOF
21360if ac_fn_cxx_try_compile "$LINENO"; then :
21361  ac_cv_prog_cxx_g=yes
21362else
21363  CXXFLAGS=""
21364      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21365/* end confdefs.h.  */
21366
21367int
21368main ()
21369{
21370
21371  ;
21372  return 0;
21373}
21374_ACEOF
21375if ac_fn_cxx_try_compile "$LINENO"; then :
21376
21377else
21378  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21379	 CXXFLAGS="-g"
21380	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21381/* end confdefs.h.  */
21382
21383int
21384main ()
21385{
21386
21387  ;
21388  return 0;
21389}
21390_ACEOF
21391if ac_fn_cxx_try_compile "$LINENO"; then :
21392  ac_cv_prog_cxx_g=yes
21393fi
21394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21395fi
21396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21397fi
21398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21399   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21400fi
21401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21402$as_echo "$ac_cv_prog_cxx_g" >&6; }
21403if test "$ac_test_CXXFLAGS" = set; then
21404  CXXFLAGS=$ac_save_CXXFLAGS
21405elif test $ac_cv_prog_cxx_g = yes; then
21406  if test "$GXX" = yes; then
21407    CXXFLAGS="-g -O2"
21408  else
21409    CXXFLAGS="-g"
21410  fi
21411else
21412  if test "$GXX" = yes; then
21413    CXXFLAGS="-O2"
21414  else
21415    CXXFLAGS=
21416  fi
21417fi
21418ac_ext=cpp
21419ac_cpp='$CXXCPP $CPPFLAGS'
21420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21423
21424
21425### Locate other tools
21426
21427if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21428    ac_ext=m
21429ac_cpp='$OBJCPP $CPPFLAGS'
21430ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21431ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21432ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21433if test -n "$ac_tool_prefix"; then
21434  for ac_prog in gcc objcc objc cc CC
21435  do
21436    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21437set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21439$as_echo_n "checking for $ac_word... " >&6; }
21440if test "${ac_cv_prog_OBJC+set}" = set; then :
21441  $as_echo_n "(cached) " >&6
21442else
21443  if test -n "$OBJC"; then
21444  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21445else
21446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21447for as_dir in $PATH
21448do
21449  IFS=$as_save_IFS
21450  test -z "$as_dir" && as_dir=.
21451    for ac_exec_ext in '' $ac_executable_extensions; do
21452  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21453    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21455    break 2
21456  fi
21457done
21458  done
21459IFS=$as_save_IFS
21460
21461fi
21462fi
21463OBJC=$ac_cv_prog_OBJC
21464if test -n "$OBJC"; then
21465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21466$as_echo "$OBJC" >&6; }
21467else
21468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21469$as_echo "no" >&6; }
21470fi
21471
21472
21473    test -n "$OBJC" && break
21474  done
21475fi
21476if test -z "$OBJC"; then
21477  ac_ct_OBJC=$OBJC
21478  for ac_prog in gcc objcc objc cc CC
21479do
21480  # Extract the first word of "$ac_prog", so it can be a program name with args.
21481set dummy $ac_prog; ac_word=$2
21482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21483$as_echo_n "checking for $ac_word... " >&6; }
21484if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21485  $as_echo_n "(cached) " >&6
21486else
21487  if test -n "$ac_ct_OBJC"; then
21488  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21489else
21490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21491for as_dir in $PATH
21492do
21493  IFS=$as_save_IFS
21494  test -z "$as_dir" && as_dir=.
21495    for ac_exec_ext in '' $ac_executable_extensions; do
21496  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21497    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21499    break 2
21500  fi
21501done
21502  done
21503IFS=$as_save_IFS
21504
21505fi
21506fi
21507ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21508if test -n "$ac_ct_OBJC"; then
21509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21510$as_echo "$ac_ct_OBJC" >&6; }
21511else
21512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21513$as_echo "no" >&6; }
21514fi
21515
21516
21517  test -n "$ac_ct_OBJC" && break
21518done
21519
21520  if test "x$ac_ct_OBJC" = x; then
21521    OBJC="gcc"
21522  else
21523    case $cross_compiling:$ac_tool_warned in
21524yes:)
21525{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21526$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21527ac_tool_warned=yes ;;
21528esac
21529    OBJC=$ac_ct_OBJC
21530  fi
21531fi
21532
21533# Provide some information about the compiler.
21534$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21535set X $ac_compile
21536ac_compiler=$2
21537for ac_option in --version -v -V -qversion; do
21538  { { ac_try="$ac_compiler $ac_option >&5"
21539case "(($ac_try" in
21540  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21541  *) ac_try_echo=$ac_try;;
21542esac
21543eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21544$as_echo "$ac_try_echo"; } >&5
21545  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21546  ac_status=$?
21547  if test -s conftest.err; then
21548    sed '10a\
21549... rest of stderr output deleted ...
21550         10q' conftest.err >conftest.er1
21551    cat conftest.er1 >&5
21552  fi
21553  rm -f conftest.er1 conftest.err
21554  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21555  test $ac_status = 0; }
21556done
21557
21558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21559$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21560if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21561  $as_echo_n "(cached) " >&6
21562else
21563  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21564/* end confdefs.h.  */
21565
21566int
21567main ()
21568{
21569#ifndef __GNUC__
21570       choke me
21571#endif
21572
21573  ;
21574  return 0;
21575}
21576_ACEOF
21577if ac_fn_objc_try_compile "$LINENO"; then :
21578  ac_compiler_gnu=yes
21579else
21580  ac_compiler_gnu=no
21581fi
21582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21583ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21584
21585fi
21586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21587$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21588if test $ac_compiler_gnu = yes; then
21589  GOBJC=yes
21590else
21591  GOBJC=
21592fi
21593ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21594ac_save_OBJCFLAGS=$OBJCFLAGS
21595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21596$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21597if test "${ac_cv_prog_objc_g+set}" = set; then :
21598  $as_echo_n "(cached) " >&6
21599else
21600  ac_save_objc_werror_flag=$ac_objc_werror_flag
21601   ac_objc_werror_flag=yes
21602   ac_cv_prog_objc_g=no
21603   OBJCFLAGS="-g"
21604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21605/* end confdefs.h.  */
21606
21607int
21608main ()
21609{
21610
21611  ;
21612  return 0;
21613}
21614_ACEOF
21615if ac_fn_objc_try_compile "$LINENO"; then :
21616  ac_cv_prog_objc_g=yes
21617else
21618  OBJCFLAGS=""
21619      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21620/* end confdefs.h.  */
21621
21622int
21623main ()
21624{
21625
21626  ;
21627  return 0;
21628}
21629_ACEOF
21630if ac_fn_objc_try_compile "$LINENO"; then :
21631
21632else
21633  ac_objc_werror_flag=$ac_save_objc_werror_flag
21634	 OBJCFLAGS="-g"
21635	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21636/* end confdefs.h.  */
21637
21638int
21639main ()
21640{
21641
21642  ;
21643  return 0;
21644}
21645_ACEOF
21646if ac_fn_objc_try_compile "$LINENO"; then :
21647  ac_cv_prog_objc_g=yes
21648fi
21649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21650fi
21651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21652fi
21653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21654   ac_objc_werror_flag=$ac_save_objc_werror_flag
21655fi
21656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21657$as_echo "$ac_cv_prog_objc_g" >&6; }
21658if test "$ac_test_OBJCFLAGS" = set; then
21659  OBJCFLAGS=$ac_save_OBJCFLAGS
21660elif test $ac_cv_prog_objc_g = yes; then
21661  if test "$GOBJC" = yes; then
21662    OBJCFLAGS="-g -O2"
21663  else
21664    OBJCFLAGS="-g"
21665  fi
21666else
21667  if test "$GOBJC" = yes; then
21668    OBJCFLAGS="-O2"
21669  else
21670    OBJCFLAGS=
21671  fi
21672fi
21673ac_ext=cpp
21674ac_cpp='$CXXCPP $CPPFLAGS'
21675ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21676ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21677ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21678
21679
21680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21681
21682  # First separate the path from the arguments. This will split at the first
21683  # space.
21684  complete="$OBJC"
21685  path="${complete%% *}"
21686  tmp="$complete EOL"
21687  arguments="${tmp#* }"
21688
21689  # Input might be given as Windows format, start by converting to
21690  # unix format.
21691  new_path=`$CYGPATH -u "$path"`
21692
21693  # Now try to locate executable using which
21694  new_path=`$WHICH "$new_path" 2> /dev/null`
21695  # bat and cmd files are not always considered executable in cygwin causing which
21696  # to not find them
21697  if test "x$new_path" = x \
21698           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21699           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21700    new_path=`$CYGPATH -u "$path"`
21701  fi
21702  if test "x$new_path" = x; then
21703    # Oops. Which didn't find the executable.
21704    # The splitting of arguments from the executable at a space might have been incorrect,
21705    # since paths with space are more likely in Windows. Give it another try with the whole
21706    # argument.
21707    path="$complete"
21708    arguments="EOL"
21709    new_path=`$CYGPATH -u "$path"`
21710    new_path=`$WHICH "$new_path" 2> /dev/null`
21711    # bat and cmd files are not always considered executable in cygwin causing which
21712    # to not find them
21713    if test "x$new_path" = x \
21714             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21715             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21716      new_path=`$CYGPATH -u "$path"`
21717    fi
21718    if test "x$new_path" = x; then
21719      # It's still not found. Now this is an unrecoverable error.
21720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21721$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21722      has_space=`$ECHO "$complete" | $GREP " "`
21723      if test "x$has_space" != x; then
21724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21726      fi
21727      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21728    fi
21729  fi
21730
21731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21734  # "foo.exe" is OK but "foo" is an error.
21735  #
21736  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21737  # It is also a way to make sure we got the proper file name for the real test later on.
21738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21739  if test "x$test_shortpath" = x; then
21740    # Short path failed, file does not exist as specified.
21741    # Try adding .exe or .cmd
21742    if test -f "${new_path}.exe"; then
21743       input_to_shortpath="${new_path}.exe"
21744    elif test -f "${new_path}.cmd"; then
21745       input_to_shortpath="${new_path}.cmd"
21746    else
21747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21748$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21749      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21750$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21751      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21752    fi
21753  else
21754    input_to_shortpath="$new_path"
21755  fi
21756
21757  # Call helper function which possibly converts this using DOS-style short mode.
21758  # If so, the updated path is stored in $new_path.
21759  new_path="$input_to_shortpath"
21760
21761  input_path="$input_to_shortpath"
21762  # Check if we need to convert this using DOS-style short mode. If the path
21763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21764  # take no chances and rewrite it.
21765  # Note: m4 eats our [], so we need to use [ and ] instead.
21766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21767  if test "x$has_forbidden_chars" != x; then
21768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21772      # Going to short mode and back again did indeed matter. Since short mode is
21773      # case insensitive, let's make it lowercase to improve readability.
21774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21775      # Now convert it back to Unix-stile (cygpath)
21776      input_path=`$CYGPATH -u "$shortmode_path"`
21777      new_path="$input_path"
21778    fi
21779  fi
21780
21781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21782  if test "x$test_cygdrive_prefix" = x; then
21783    # As a simple fix, exclude /usr/bin since it's not a real path.
21784    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21786      # a path prefixed by /cygdrive for fixpath to work.
21787      new_path="$CYGWIN_ROOT_PATH$input_path"
21788    fi
21789  fi
21790
21791  # remove trailing .exe if any
21792  new_path="${new_path/%.exe/}"
21793
21794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21795
21796  # First separate the path from the arguments. This will split at the first
21797  # space.
21798  complete="$OBJC"
21799  path="${complete%% *}"
21800  tmp="$complete EOL"
21801  arguments="${tmp#* }"
21802
21803  # Input might be given as Windows format, start by converting to
21804  # unix format.
21805  new_path="$path"
21806
21807  windows_path="$new_path"
21808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21809    unix_path=`$CYGPATH -u "$windows_path"`
21810    new_path="$unix_path"
21811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21813    new_path="$unix_path"
21814  fi
21815
21816
21817  # Now try to locate executable using which
21818  new_path=`$WHICH "$new_path" 2> /dev/null`
21819
21820  if test "x$new_path" = x; then
21821    # Oops. Which didn't find the executable.
21822    # The splitting of arguments from the executable at a space might have been incorrect,
21823    # since paths with space are more likely in Windows. Give it another try with the whole
21824    # argument.
21825    path="$complete"
21826    arguments="EOL"
21827    new_path="$path"
21828
21829  windows_path="$new_path"
21830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21831    unix_path=`$CYGPATH -u "$windows_path"`
21832    new_path="$unix_path"
21833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21835    new_path="$unix_path"
21836  fi
21837
21838
21839    new_path=`$WHICH "$new_path" 2> /dev/null`
21840
21841    if test "x$new_path" = x; then
21842      # It's still not found. Now this is an unrecoverable error.
21843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21844$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21845      has_space=`$ECHO "$complete" | $GREP " "`
21846      if test "x$has_space" != x; then
21847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21849      fi
21850      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21851    fi
21852  fi
21853
21854  # Now new_path has a complete unix path to the binary
21855  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21856    # Keep paths in /bin as-is, but remove trailing .exe if any
21857    new_path="${new_path/%.exe/}"
21858    # Do not save /bin paths to all_fixpath_prefixes!
21859  else
21860    # Not in mixed or Windows style, start by that.
21861    new_path=`cmd //c echo $new_path`
21862
21863  input_path="$new_path"
21864  # Check if we need to convert this using DOS-style short mode. If the path
21865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21866  # take no chances and rewrite it.
21867  # Note: m4 eats our [], so we need to use [ and ] instead.
21868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21869  if test "x$has_forbidden_chars" != x; then
21870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21872  fi
21873
21874    # Output is in $new_path
21875
21876  windows_path="$new_path"
21877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21878    unix_path=`$CYGPATH -u "$windows_path"`
21879    new_path="$unix_path"
21880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21882    new_path="$unix_path"
21883  fi
21884
21885    # remove trailing .exe if any
21886    new_path="${new_path/%.exe/}"
21887
21888    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21889    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21890  fi
21891
21892  else
21893    # We're on a posix platform. Hooray! :)
21894    # First separate the path from the arguments. This will split at the first
21895    # space.
21896    complete="$OBJC"
21897    path="${complete%% *}"
21898    tmp="$complete EOL"
21899    arguments="${tmp#* }"
21900
21901    # Cannot rely on the command "which" here since it doesn't always work.
21902    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21903    if test -z "$is_absolute_path"; then
21904      # Path to executable is not absolute. Find it.
21905      IFS_save="$IFS"
21906      IFS=:
21907      for p in $PATH; do
21908        if test -f "$p/$path" && test -x "$p/$path"; then
21909          new_path="$p/$path"
21910          break
21911        fi
21912      done
21913      IFS="$IFS_save"
21914    else
21915      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21916$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21917      new_path="$path"
21918    fi
21919
21920    if test "x$new_path" = x; then
21921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21922$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21923        has_space=`$ECHO "$complete" | $GREP " "`
21924        if test "x$has_space" != x; then
21925          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21926$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21927        fi
21928        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21929      fi
21930  fi
21931
21932      # Now join together the path and the arguments once again
21933      if test "x$arguments" != xEOL; then
21934        new_complete="$new_path ${arguments% *}"
21935      else
21936        new_complete="$new_path"
21937      fi
21938
21939  if test "x$complete" != "x$new_complete"; then
21940      OBJC="$new_complete"
21941      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21942$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21943    fi
21944
21945else
21946    OBJC=
21947fi
21948
21949# Restore the flags to the user specified values.
21950# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21951CFLAGS="$ORG_CFLAGS"
21952CXXFLAGS="$ORG_CXXFLAGS"
21953OBJCFLAGS="$ORG_OBJCFLAGS"
21954
21955LD="$CC"
21956LDEXE="$CC"
21957LDCXX="$CXX"
21958LDEXECXX="$CXX"
21959
21960# LDEXE is the linker to use, when creating executables.
21961
21962# Linking C++ libraries.
21963
21964# Linking C++ executables.
21965
21966
21967if test "x$OPENJDK_TARGET_OS" != xwindows; then
21968    if test -n "$ac_tool_prefix"; then
21969  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21970set dummy ${ac_tool_prefix}ar; ac_word=$2
21971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21972$as_echo_n "checking for $ac_word... " >&6; }
21973if test "${ac_cv_prog_AR+set}" = set; then :
21974  $as_echo_n "(cached) " >&6
21975else
21976  if test -n "$AR"; then
21977  ac_cv_prog_AR="$AR" # Let the user override the test.
21978else
21979as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21980for as_dir in $PATH
21981do
21982  IFS=$as_save_IFS
21983  test -z "$as_dir" && as_dir=.
21984    for ac_exec_ext in '' $ac_executable_extensions; do
21985  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21986    ac_cv_prog_AR="${ac_tool_prefix}ar"
21987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21988    break 2
21989  fi
21990done
21991  done
21992IFS=$as_save_IFS
21993
21994fi
21995fi
21996AR=$ac_cv_prog_AR
21997if test -n "$AR"; then
21998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21999$as_echo "$AR" >&6; }
22000else
22001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22002$as_echo "no" >&6; }
22003fi
22004
22005
22006fi
22007if test -z "$ac_cv_prog_AR"; then
22008  ac_ct_AR=$AR
22009  # Extract the first word of "ar", so it can be a program name with args.
22010set dummy ar; ac_word=$2
22011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22012$as_echo_n "checking for $ac_word... " >&6; }
22013if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22014  $as_echo_n "(cached) " >&6
22015else
22016  if test -n "$ac_ct_AR"; then
22017  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22018else
22019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22020for as_dir in $PATH
22021do
22022  IFS=$as_save_IFS
22023  test -z "$as_dir" && as_dir=.
22024    for ac_exec_ext in '' $ac_executable_extensions; do
22025  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22026    ac_cv_prog_ac_ct_AR="ar"
22027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22028    break 2
22029  fi
22030done
22031  done
22032IFS=$as_save_IFS
22033
22034fi
22035fi
22036ac_ct_AR=$ac_cv_prog_ac_ct_AR
22037if test -n "$ac_ct_AR"; then
22038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22039$as_echo "$ac_ct_AR" >&6; }
22040else
22041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22042$as_echo "no" >&6; }
22043fi
22044
22045  if test "x$ac_ct_AR" = x; then
22046    AR=""
22047  else
22048    case $cross_compiling:$ac_tool_warned in
22049yes:)
22050{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22051$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22052ac_tool_warned=yes ;;
22053esac
22054    AR=$ac_ct_AR
22055  fi
22056else
22057  AR="$ac_cv_prog_AR"
22058fi
22059
22060
22061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22062
22063  # First separate the path from the arguments. This will split at the first
22064  # space.
22065  complete="$AR"
22066  path="${complete%% *}"
22067  tmp="$complete EOL"
22068  arguments="${tmp#* }"
22069
22070  # Input might be given as Windows format, start by converting to
22071  # unix format.
22072  new_path=`$CYGPATH -u "$path"`
22073
22074  # Now try to locate executable using which
22075  new_path=`$WHICH "$new_path" 2> /dev/null`
22076  # bat and cmd files are not always considered executable in cygwin causing which
22077  # to not find them
22078  if test "x$new_path" = x \
22079           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22080           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22081    new_path=`$CYGPATH -u "$path"`
22082  fi
22083  if test "x$new_path" = x; then
22084    # Oops. Which didn't find the executable.
22085    # The splitting of arguments from the executable at a space might have been incorrect,
22086    # since paths with space are more likely in Windows. Give it another try with the whole
22087    # argument.
22088    path="$complete"
22089    arguments="EOL"
22090    new_path=`$CYGPATH -u "$path"`
22091    new_path=`$WHICH "$new_path" 2> /dev/null`
22092    # bat and cmd files are not always considered executable in cygwin causing which
22093    # to not find them
22094    if test "x$new_path" = x \
22095             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22096             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22097      new_path=`$CYGPATH -u "$path"`
22098    fi
22099    if test "x$new_path" = x; then
22100      # It's still not found. Now this is an unrecoverable error.
22101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22102$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22103      has_space=`$ECHO "$complete" | $GREP " "`
22104      if test "x$has_space" != x; then
22105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22107      fi
22108      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22109    fi
22110  fi
22111
22112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22115  # "foo.exe" is OK but "foo" is an error.
22116  #
22117  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22118  # It is also a way to make sure we got the proper file name for the real test later on.
22119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22120  if test "x$test_shortpath" = x; then
22121    # Short path failed, file does not exist as specified.
22122    # Try adding .exe or .cmd
22123    if test -f "${new_path}.exe"; then
22124       input_to_shortpath="${new_path}.exe"
22125    elif test -f "${new_path}.cmd"; then
22126       input_to_shortpath="${new_path}.cmd"
22127    else
22128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22129$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22130      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22131$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22132      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22133    fi
22134  else
22135    input_to_shortpath="$new_path"
22136  fi
22137
22138  # Call helper function which possibly converts this using DOS-style short mode.
22139  # If so, the updated path is stored in $new_path.
22140  new_path="$input_to_shortpath"
22141
22142  input_path="$input_to_shortpath"
22143  # Check if we need to convert this using DOS-style short mode. If the path
22144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22145  # take no chances and rewrite it.
22146  # Note: m4 eats our [], so we need to use [ and ] instead.
22147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22148  if test "x$has_forbidden_chars" != x; then
22149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22153      # Going to short mode and back again did indeed matter. Since short mode is
22154      # case insensitive, let's make it lowercase to improve readability.
22155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22156      # Now convert it back to Unix-stile (cygpath)
22157      input_path=`$CYGPATH -u "$shortmode_path"`
22158      new_path="$input_path"
22159    fi
22160  fi
22161
22162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22163  if test "x$test_cygdrive_prefix" = x; then
22164    # As a simple fix, exclude /usr/bin since it's not a real path.
22165    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22167      # a path prefixed by /cygdrive for fixpath to work.
22168      new_path="$CYGWIN_ROOT_PATH$input_path"
22169    fi
22170  fi
22171
22172  # remove trailing .exe if any
22173  new_path="${new_path/%.exe/}"
22174
22175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22176
22177  # First separate the path from the arguments. This will split at the first
22178  # space.
22179  complete="$AR"
22180  path="${complete%% *}"
22181  tmp="$complete EOL"
22182  arguments="${tmp#* }"
22183
22184  # Input might be given as Windows format, start by converting to
22185  # unix format.
22186  new_path="$path"
22187
22188  windows_path="$new_path"
22189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22190    unix_path=`$CYGPATH -u "$windows_path"`
22191    new_path="$unix_path"
22192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22194    new_path="$unix_path"
22195  fi
22196
22197
22198  # Now try to locate executable using which
22199  new_path=`$WHICH "$new_path" 2> /dev/null`
22200
22201  if test "x$new_path" = x; then
22202    # Oops. Which didn't find the executable.
22203    # The splitting of arguments from the executable at a space might have been incorrect,
22204    # since paths with space are more likely in Windows. Give it another try with the whole
22205    # argument.
22206    path="$complete"
22207    arguments="EOL"
22208    new_path="$path"
22209
22210  windows_path="$new_path"
22211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22212    unix_path=`$CYGPATH -u "$windows_path"`
22213    new_path="$unix_path"
22214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22216    new_path="$unix_path"
22217  fi
22218
22219
22220    new_path=`$WHICH "$new_path" 2> /dev/null`
22221
22222    if test "x$new_path" = x; then
22223      # It's still not found. Now this is an unrecoverable error.
22224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22225$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22226      has_space=`$ECHO "$complete" | $GREP " "`
22227      if test "x$has_space" != x; then
22228        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22229$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22230      fi
22231      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22232    fi
22233  fi
22234
22235  # Now new_path has a complete unix path to the binary
22236  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22237    # Keep paths in /bin as-is, but remove trailing .exe if any
22238    new_path="${new_path/%.exe/}"
22239    # Do not save /bin paths to all_fixpath_prefixes!
22240  else
22241    # Not in mixed or Windows style, start by that.
22242    new_path=`cmd //c echo $new_path`
22243
22244  input_path="$new_path"
22245  # Check if we need to convert this using DOS-style short mode. If the path
22246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22247  # take no chances and rewrite it.
22248  # Note: m4 eats our [], so we need to use [ and ] instead.
22249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22250  if test "x$has_forbidden_chars" != x; then
22251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22253  fi
22254
22255    # Output is in $new_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    # remove trailing .exe if any
22267    new_path="${new_path/%.exe/}"
22268
22269    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22270    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22271  fi
22272
22273  else
22274    # We're on a posix platform. Hooray! :)
22275    # First separate the path from the arguments. This will split at the first
22276    # space.
22277    complete="$AR"
22278    path="${complete%% *}"
22279    tmp="$complete EOL"
22280    arguments="${tmp#* }"
22281
22282    # Cannot rely on the command "which" here since it doesn't always work.
22283    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22284    if test -z "$is_absolute_path"; then
22285      # Path to executable is not absolute. Find it.
22286      IFS_save="$IFS"
22287      IFS=:
22288      for p in $PATH; do
22289        if test -f "$p/$path" && test -x "$p/$path"; then
22290          new_path="$p/$path"
22291          break
22292        fi
22293      done
22294      IFS="$IFS_save"
22295    else
22296      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22297$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22298      new_path="$path"
22299    fi
22300
22301    if test "x$new_path" = x; then
22302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22303$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22304        has_space=`$ECHO "$complete" | $GREP " "`
22305        if test "x$has_space" != x; then
22306          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22307$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22308        fi
22309        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22310      fi
22311  fi
22312
22313      # Now join together the path and the arguments once again
22314      if test "x$arguments" != xEOL; then
22315        new_complete="$new_path ${arguments% *}"
22316      else
22317        new_complete="$new_path"
22318      fi
22319
22320  if test "x$complete" != "x$new_complete"; then
22321      AR="$new_complete"
22322      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22323$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22324    fi
22325
22326fi
22327if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22328    ARFLAGS="-r"
22329else
22330    ARFLAGS=""
22331fi
22332
22333
22334# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22335HOTSPOT_CXX="$CXX"
22336HOTSPOT_LD="$LD"
22337
22338
22339
22340COMPILER_NAME=gcc
22341COMPILER_TYPE=CC
22342if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22343
22344    # For now, assume that we are always compiling using cl.exe.
22345    CC_OUT_OPTION=-Fo
22346    EXE_OUT_OPTION=-out:
22347    LD_OUT_OPTION=-out:
22348    AR_OUT_OPTION=-out:
22349    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22350    # program for something completely different.
22351    # Extract the first word of "link", so it can be a program name with args.
22352set dummy link; ac_word=$2
22353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22354$as_echo_n "checking for $ac_word... " >&6; }
22355if test "${ac_cv_prog_WINLD+set}" = set; then :
22356  $as_echo_n "(cached) " >&6
22357else
22358  if test -n "$WINLD"; then
22359  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22360else
22361  ac_prog_rejected=no
22362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22363for as_dir in $PATH
22364do
22365  IFS=$as_save_IFS
22366  test -z "$as_dir" && as_dir=.
22367    for ac_exec_ext in '' $ac_executable_extensions; do
22368  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22369    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22370       ac_prog_rejected=yes
22371       continue
22372     fi
22373    ac_cv_prog_WINLD="link"
22374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22375    break 2
22376  fi
22377done
22378  done
22379IFS=$as_save_IFS
22380
22381if test $ac_prog_rejected = yes; then
22382  # We found a bogon in the path, so make sure we never use it.
22383  set dummy $ac_cv_prog_WINLD
22384  shift
22385  if test $# != 0; then
22386    # We chose a different compiler from the bogus one.
22387    # However, it has the same basename, so the bogon will be chosen
22388    # first if we set WINLD to just the basename; use the full file name.
22389    shift
22390    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22391  fi
22392fi
22393fi
22394fi
22395WINLD=$ac_cv_prog_WINLD
22396if test -n "$WINLD"; then
22397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22398$as_echo "$WINLD" >&6; }
22399else
22400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22401$as_echo "no" >&6; }
22402fi
22403
22404
22405    # Since we must ignore the first found link, WINLD will contain
22406    # the full path to the link.exe program.
22407
22408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22409
22410  # First separate the path from the arguments. This will split at the first
22411  # space.
22412  complete="$WINLD"
22413  path="${complete%% *}"
22414  tmp="$complete EOL"
22415  arguments="${tmp#* }"
22416
22417  # Input might be given as Windows format, start by converting to
22418  # unix format.
22419  new_path=`$CYGPATH -u "$path"`
22420
22421  # Now try to locate executable using which
22422  new_path=`$WHICH "$new_path" 2> /dev/null`
22423  # bat and cmd files are not always considered executable in cygwin causing which
22424  # to not find them
22425  if test "x$new_path" = x \
22426           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22427           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22428    new_path=`$CYGPATH -u "$path"`
22429  fi
22430  if test "x$new_path" = x; then
22431    # Oops. Which didn't find the executable.
22432    # The splitting of arguments from the executable at a space might have been incorrect,
22433    # since paths with space are more likely in Windows. Give it another try with the whole
22434    # argument.
22435    path="$complete"
22436    arguments="EOL"
22437    new_path=`$CYGPATH -u "$path"`
22438    new_path=`$WHICH "$new_path" 2> /dev/null`
22439    # bat and cmd files are not always considered executable in cygwin causing which
22440    # to not find them
22441    if test "x$new_path" = x \
22442             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22443             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22444      new_path=`$CYGPATH -u "$path"`
22445    fi
22446    if test "x$new_path" = x; then
22447      # It's still not found. Now this is an unrecoverable error.
22448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22449$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22450      has_space=`$ECHO "$complete" | $GREP " "`
22451      if test "x$has_space" != x; then
22452        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22453$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22454      fi
22455      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22456    fi
22457  fi
22458
22459  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22460  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22461  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22462  # "foo.exe" is OK but "foo" is an error.
22463  #
22464  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22465  # It is also a way to make sure we got the proper file name for the real test later on.
22466  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22467  if test "x$test_shortpath" = x; then
22468    # Short path failed, file does not exist as specified.
22469    # Try adding .exe or .cmd
22470    if test -f "${new_path}.exe"; then
22471       input_to_shortpath="${new_path}.exe"
22472    elif test -f "${new_path}.cmd"; then
22473       input_to_shortpath="${new_path}.cmd"
22474    else
22475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22476$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22477      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22478$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22479      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22480    fi
22481  else
22482    input_to_shortpath="$new_path"
22483  fi
22484
22485  # Call helper function which possibly converts this using DOS-style short mode.
22486  # If so, the updated path is stored in $new_path.
22487  new_path="$input_to_shortpath"
22488
22489  input_path="$input_to_shortpath"
22490  # Check if we need to convert this using DOS-style short mode. If the path
22491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22492  # take no chances and rewrite it.
22493  # Note: m4 eats our [], so we need to use [ and ] instead.
22494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22495  if test "x$has_forbidden_chars" != x; then
22496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22497    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22498    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22499    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22500      # Going to short mode and back again did indeed matter. Since short mode is
22501      # case insensitive, let's make it lowercase to improve readability.
22502      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22503      # Now convert it back to Unix-stile (cygpath)
22504      input_path=`$CYGPATH -u "$shortmode_path"`
22505      new_path="$input_path"
22506    fi
22507  fi
22508
22509  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22510  if test "x$test_cygdrive_prefix" = x; then
22511    # As a simple fix, exclude /usr/bin since it's not a real path.
22512    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22513      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22514      # a path prefixed by /cygdrive for fixpath to work.
22515      new_path="$CYGWIN_ROOT_PATH$input_path"
22516    fi
22517  fi
22518
22519  # remove trailing .exe if any
22520  new_path="${new_path/%.exe/}"
22521
22522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22523
22524  # First separate the path from the arguments. This will split at the first
22525  # space.
22526  complete="$WINLD"
22527  path="${complete%% *}"
22528  tmp="$complete EOL"
22529  arguments="${tmp#* }"
22530
22531  # Input might be given as Windows format, start by converting to
22532  # unix format.
22533  new_path="$path"
22534
22535  windows_path="$new_path"
22536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22537    unix_path=`$CYGPATH -u "$windows_path"`
22538    new_path="$unix_path"
22539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22541    new_path="$unix_path"
22542  fi
22543
22544
22545  # Now try to locate executable using which
22546  new_path=`$WHICH "$new_path" 2> /dev/null`
22547
22548  if test "x$new_path" = x; then
22549    # Oops. Which didn't find the executable.
22550    # The splitting of arguments from the executable at a space might have been incorrect,
22551    # since paths with space are more likely in Windows. Give it another try with the whole
22552    # argument.
22553    path="$complete"
22554    arguments="EOL"
22555    new_path="$path"
22556
22557  windows_path="$new_path"
22558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22559    unix_path=`$CYGPATH -u "$windows_path"`
22560    new_path="$unix_path"
22561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22563    new_path="$unix_path"
22564  fi
22565
22566
22567    new_path=`$WHICH "$new_path" 2> /dev/null`
22568
22569    if test "x$new_path" = x; then
22570      # It's still not found. Now this is an unrecoverable error.
22571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22572$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22573      has_space=`$ECHO "$complete" | $GREP " "`
22574      if test "x$has_space" != x; then
22575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22577      fi
22578      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22579    fi
22580  fi
22581
22582  # Now new_path has a complete unix path to the binary
22583  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22584    # Keep paths in /bin as-is, but remove trailing .exe if any
22585    new_path="${new_path/%.exe/}"
22586    # Do not save /bin paths to all_fixpath_prefixes!
22587  else
22588    # Not in mixed or Windows style, start by that.
22589    new_path=`cmd //c echo $new_path`
22590
22591  input_path="$new_path"
22592  # Check if we need to convert this using DOS-style short mode. If the path
22593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22594  # take no chances and rewrite it.
22595  # Note: m4 eats our [], so we need to use [ and ] instead.
22596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22597  if test "x$has_forbidden_chars" != x; then
22598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22600  fi
22601
22602    # Output is in $new_path
22603
22604  windows_path="$new_path"
22605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22606    unix_path=`$CYGPATH -u "$windows_path"`
22607    new_path="$unix_path"
22608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22610    new_path="$unix_path"
22611  fi
22612
22613    # remove trailing .exe if any
22614    new_path="${new_path/%.exe/}"
22615
22616    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22617    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22618  fi
22619
22620  else
22621    # We're on a posix platform. Hooray! :)
22622    # First separate the path from the arguments. This will split at the first
22623    # space.
22624    complete="$WINLD"
22625    path="${complete%% *}"
22626    tmp="$complete EOL"
22627    arguments="${tmp#* }"
22628
22629    # Cannot rely on the command "which" here since it doesn't always work.
22630    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22631    if test -z "$is_absolute_path"; then
22632      # Path to executable is not absolute. Find it.
22633      IFS_save="$IFS"
22634      IFS=:
22635      for p in $PATH; do
22636        if test -f "$p/$path" && test -x "$p/$path"; then
22637          new_path="$p/$path"
22638          break
22639        fi
22640      done
22641      IFS="$IFS_save"
22642    else
22643      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22644$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22645      new_path="$path"
22646    fi
22647
22648    if test "x$new_path" = x; then
22649        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22650$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22651        has_space=`$ECHO "$complete" | $GREP " "`
22652        if test "x$has_space" != x; then
22653          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22654$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22655        fi
22656        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22657      fi
22658  fi
22659
22660      # Now join together the path and the arguments once again
22661      if test "x$arguments" != xEOL; then
22662        new_complete="$new_path ${arguments% *}"
22663      else
22664        new_complete="$new_path"
22665      fi
22666
22667  if test "x$complete" != "x$new_complete"; then
22668      WINLD="$new_complete"
22669      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22670$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22671    fi
22672
22673    printf "Windows linker was found at $WINLD\n"
22674    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22675$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22676    "$WINLD" --version > /dev/null
22677    if test $? -eq 0 ; then
22678      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22679$as_echo "no" >&6; }
22680      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22681    else
22682      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22683$as_echo "yes" >&6; }
22684    fi
22685    LD="$WINLD"
22686    LDEXE="$WINLD"
22687    LDCXX="$WINLD"
22688    LDEXECXX="$WINLD"
22689
22690    # Extract the first word of "mt", so it can be a program name with args.
22691set dummy mt; ac_word=$2
22692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22693$as_echo_n "checking for $ac_word... " >&6; }
22694if test "${ac_cv_prog_MT+set}" = set; then :
22695  $as_echo_n "(cached) " >&6
22696else
22697  if test -n "$MT"; then
22698  ac_cv_prog_MT="$MT" # Let the user override the test.
22699else
22700  ac_prog_rejected=no
22701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22702for as_dir in $PATH
22703do
22704  IFS=$as_save_IFS
22705  test -z "$as_dir" && as_dir=.
22706    for ac_exec_ext in '' $ac_executable_extensions; do
22707  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22708    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22709       ac_prog_rejected=yes
22710       continue
22711     fi
22712    ac_cv_prog_MT="mt"
22713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22714    break 2
22715  fi
22716done
22717  done
22718IFS=$as_save_IFS
22719
22720if test $ac_prog_rejected = yes; then
22721  # We found a bogon in the path, so make sure we never use it.
22722  set dummy $ac_cv_prog_MT
22723  shift
22724  if test $# != 0; then
22725    # We chose a different compiler from the bogus one.
22726    # However, it has the same basename, so the bogon will be chosen
22727    # first if we set MT to just the basename; use the full file name.
22728    shift
22729    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22730  fi
22731fi
22732fi
22733fi
22734MT=$ac_cv_prog_MT
22735if test -n "$MT"; then
22736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22737$as_echo "$MT" >&6; }
22738else
22739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22740$as_echo "no" >&6; }
22741fi
22742
22743
22744
22745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22746
22747  # First separate the path from the arguments. This will split at the first
22748  # space.
22749  complete="$MT"
22750  path="${complete%% *}"
22751  tmp="$complete EOL"
22752  arguments="${tmp#* }"
22753
22754  # Input might be given as Windows format, start by converting to
22755  # unix format.
22756  new_path=`$CYGPATH -u "$path"`
22757
22758  # Now try to locate executable using which
22759  new_path=`$WHICH "$new_path" 2> /dev/null`
22760  # bat and cmd files are not always considered executable in cygwin causing which
22761  # to not find them
22762  if test "x$new_path" = x \
22763           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22764           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22765    new_path=`$CYGPATH -u "$path"`
22766  fi
22767  if test "x$new_path" = x; then
22768    # Oops. Which didn't find the executable.
22769    # The splitting of arguments from the executable at a space might have been incorrect,
22770    # since paths with space are more likely in Windows. Give it another try with the whole
22771    # argument.
22772    path="$complete"
22773    arguments="EOL"
22774    new_path=`$CYGPATH -u "$path"`
22775    new_path=`$WHICH "$new_path" 2> /dev/null`
22776    # bat and cmd files are not always considered executable in cygwin causing which
22777    # to not find them
22778    if test "x$new_path" = x \
22779             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22780             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22781      new_path=`$CYGPATH -u "$path"`
22782    fi
22783    if test "x$new_path" = x; then
22784      # It's still not found. Now this is an unrecoverable error.
22785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22786$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22787      has_space=`$ECHO "$complete" | $GREP " "`
22788      if test "x$has_space" != x; then
22789        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22790$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22791      fi
22792      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22793    fi
22794  fi
22795
22796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22799  # "foo.exe" is OK but "foo" is an error.
22800  #
22801  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22802  # It is also a way to make sure we got the proper file name for the real test later on.
22803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22804  if test "x$test_shortpath" = x; then
22805    # Short path failed, file does not exist as specified.
22806    # Try adding .exe or .cmd
22807    if test -f "${new_path}.exe"; then
22808       input_to_shortpath="${new_path}.exe"
22809    elif test -f "${new_path}.cmd"; then
22810       input_to_shortpath="${new_path}.cmd"
22811    else
22812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22813$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22814      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22815$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22816      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22817    fi
22818  else
22819    input_to_shortpath="$new_path"
22820  fi
22821
22822  # Call helper function which possibly converts this using DOS-style short mode.
22823  # If so, the updated path is stored in $new_path.
22824  new_path="$input_to_shortpath"
22825
22826  input_path="$input_to_shortpath"
22827  # Check if we need to convert this using DOS-style short mode. If the path
22828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22829  # take no chances and rewrite it.
22830  # Note: m4 eats our [], so we need to use [ and ] instead.
22831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22832  if test "x$has_forbidden_chars" != x; then
22833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22837      # Going to short mode and back again did indeed matter. Since short mode is
22838      # case insensitive, let's make it lowercase to improve readability.
22839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22840      # Now convert it back to Unix-stile (cygpath)
22841      input_path=`$CYGPATH -u "$shortmode_path"`
22842      new_path="$input_path"
22843    fi
22844  fi
22845
22846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22847  if test "x$test_cygdrive_prefix" = x; then
22848    # As a simple fix, exclude /usr/bin since it's not a real path.
22849    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22851      # a path prefixed by /cygdrive for fixpath to work.
22852      new_path="$CYGWIN_ROOT_PATH$input_path"
22853    fi
22854  fi
22855
22856  # remove trailing .exe if any
22857  new_path="${new_path/%.exe/}"
22858
22859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22860
22861  # First separate the path from the arguments. This will split at the first
22862  # space.
22863  complete="$MT"
22864  path="${complete%% *}"
22865  tmp="$complete EOL"
22866  arguments="${tmp#* }"
22867
22868  # Input might be given as Windows format, start by converting to
22869  # unix format.
22870  new_path="$path"
22871
22872  windows_path="$new_path"
22873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22874    unix_path=`$CYGPATH -u "$windows_path"`
22875    new_path="$unix_path"
22876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22878    new_path="$unix_path"
22879  fi
22880
22881
22882  # Now try to locate executable using which
22883  new_path=`$WHICH "$new_path" 2> /dev/null`
22884
22885  if test "x$new_path" = x; then
22886    # Oops. Which didn't find the executable.
22887    # The splitting of arguments from the executable at a space might have been incorrect,
22888    # since paths with space are more likely in Windows. Give it another try with the whole
22889    # argument.
22890    path="$complete"
22891    arguments="EOL"
22892    new_path="$path"
22893
22894  windows_path="$new_path"
22895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22896    unix_path=`$CYGPATH -u "$windows_path"`
22897    new_path="$unix_path"
22898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22900    new_path="$unix_path"
22901  fi
22902
22903
22904    new_path=`$WHICH "$new_path" 2> /dev/null`
22905
22906    if test "x$new_path" = x; then
22907      # It's still not found. Now this is an unrecoverable error.
22908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22909$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22910      has_space=`$ECHO "$complete" | $GREP " "`
22911      if test "x$has_space" != x; then
22912        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22913$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22914      fi
22915      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22916    fi
22917  fi
22918
22919  # Now new_path has a complete unix path to the binary
22920  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22921    # Keep paths in /bin as-is, but remove trailing .exe if any
22922    new_path="${new_path/%.exe/}"
22923    # Do not save /bin paths to all_fixpath_prefixes!
22924  else
22925    # Not in mixed or Windows style, start by that.
22926    new_path=`cmd //c echo $new_path`
22927
22928  input_path="$new_path"
22929  # Check if we need to convert this using DOS-style short mode. If the path
22930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22931  # take no chances and rewrite it.
22932  # Note: m4 eats our [], so we need to use [ and ] instead.
22933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22934  if test "x$has_forbidden_chars" != x; then
22935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22937  fi
22938
22939    # Output is in $new_path
22940
22941  windows_path="$new_path"
22942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22943    unix_path=`$CYGPATH -u "$windows_path"`
22944    new_path="$unix_path"
22945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22947    new_path="$unix_path"
22948  fi
22949
22950    # remove trailing .exe if any
22951    new_path="${new_path/%.exe/}"
22952
22953    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22954    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22955  fi
22956
22957  else
22958    # We're on a posix platform. Hooray! :)
22959    # First separate the path from the arguments. This will split at the first
22960    # space.
22961    complete="$MT"
22962    path="${complete%% *}"
22963    tmp="$complete EOL"
22964    arguments="${tmp#* }"
22965
22966    # Cannot rely on the command "which" here since it doesn't always work.
22967    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22968    if test -z "$is_absolute_path"; then
22969      # Path to executable is not absolute. Find it.
22970      IFS_save="$IFS"
22971      IFS=:
22972      for p in $PATH; do
22973        if test -f "$p/$path" && test -x "$p/$path"; then
22974          new_path="$p/$path"
22975          break
22976        fi
22977      done
22978      IFS="$IFS_save"
22979    else
22980      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22981$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22982      new_path="$path"
22983    fi
22984
22985    if test "x$new_path" = x; then
22986        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22987$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22988        has_space=`$ECHO "$complete" | $GREP " "`
22989        if test "x$has_space" != x; then
22990          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22991$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22992        fi
22993        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22994      fi
22995  fi
22996
22997      # Now join together the path and the arguments once again
22998      if test "x$arguments" != xEOL; then
22999        new_complete="$new_path ${arguments% *}"
23000      else
23001        new_complete="$new_path"
23002      fi
23003
23004  if test "x$complete" != "x$new_complete"; then
23005      MT="$new_complete"
23006      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23007$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23008    fi
23009
23010    # The resource compiler
23011    # Extract the first word of "rc", so it can be a program name with args.
23012set dummy rc; ac_word=$2
23013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23014$as_echo_n "checking for $ac_word... " >&6; }
23015if test "${ac_cv_prog_RC+set}" = set; then :
23016  $as_echo_n "(cached) " >&6
23017else
23018  if test -n "$RC"; then
23019  ac_cv_prog_RC="$RC" # Let the user override the test.
23020else
23021  ac_prog_rejected=no
23022as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23023for as_dir in $PATH
23024do
23025  IFS=$as_save_IFS
23026  test -z "$as_dir" && as_dir=.
23027    for ac_exec_ext in '' $ac_executable_extensions; do
23028  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23029    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23030       ac_prog_rejected=yes
23031       continue
23032     fi
23033    ac_cv_prog_RC="rc"
23034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23035    break 2
23036  fi
23037done
23038  done
23039IFS=$as_save_IFS
23040
23041if test $ac_prog_rejected = yes; then
23042  # We found a bogon in the path, so make sure we never use it.
23043  set dummy $ac_cv_prog_RC
23044  shift
23045  if test $# != 0; then
23046    # We chose a different compiler from the bogus one.
23047    # However, it has the same basename, so the bogon will be chosen
23048    # first if we set RC to just the basename; use the full file name.
23049    shift
23050    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23051  fi
23052fi
23053fi
23054fi
23055RC=$ac_cv_prog_RC
23056if test -n "$RC"; then
23057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23058$as_echo "$RC" >&6; }
23059else
23060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23061$as_echo "no" >&6; }
23062fi
23063
23064
23065
23066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23067
23068  # First separate the path from the arguments. This will split at the first
23069  # space.
23070  complete="$RC"
23071  path="${complete%% *}"
23072  tmp="$complete EOL"
23073  arguments="${tmp#* }"
23074
23075  # Input might be given as Windows format, start by converting to
23076  # unix format.
23077  new_path=`$CYGPATH -u "$path"`
23078
23079  # Now try to locate executable using which
23080  new_path=`$WHICH "$new_path" 2> /dev/null`
23081  # bat and cmd files are not always considered executable in cygwin causing which
23082  # to not find them
23083  if test "x$new_path" = x \
23084           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23085           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23086    new_path=`$CYGPATH -u "$path"`
23087  fi
23088  if test "x$new_path" = x; then
23089    # Oops. Which didn't find the executable.
23090    # The splitting of arguments from the executable at a space might have been incorrect,
23091    # since paths with space are more likely in Windows. Give it another try with the whole
23092    # argument.
23093    path="$complete"
23094    arguments="EOL"
23095    new_path=`$CYGPATH -u "$path"`
23096    new_path=`$WHICH "$new_path" 2> /dev/null`
23097    # bat and cmd files are not always considered executable in cygwin causing which
23098    # to not find them
23099    if test "x$new_path" = x \
23100             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23101             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23102      new_path=`$CYGPATH -u "$path"`
23103    fi
23104    if test "x$new_path" = x; then
23105      # It's still not found. Now this is an unrecoverable error.
23106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23107$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23108      has_space=`$ECHO "$complete" | $GREP " "`
23109      if test "x$has_space" != x; then
23110        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23111$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23112      fi
23113      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23114    fi
23115  fi
23116
23117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23120  # "foo.exe" is OK but "foo" is an error.
23121  #
23122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23123  # It is also a way to make sure we got the proper file name for the real test later on.
23124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23125  if test "x$test_shortpath" = x; then
23126    # Short path failed, file does not exist as specified.
23127    # Try adding .exe or .cmd
23128    if test -f "${new_path}.exe"; then
23129       input_to_shortpath="${new_path}.exe"
23130    elif test -f "${new_path}.cmd"; then
23131       input_to_shortpath="${new_path}.cmd"
23132    else
23133      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23134$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23135      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23136$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23137      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23138    fi
23139  else
23140    input_to_shortpath="$new_path"
23141  fi
23142
23143  # Call helper function which possibly converts this using DOS-style short mode.
23144  # If so, the updated path is stored in $new_path.
23145  new_path="$input_to_shortpath"
23146
23147  input_path="$input_to_shortpath"
23148  # Check if we need to convert this using DOS-style short mode. If the path
23149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23150  # take no chances and rewrite it.
23151  # Note: m4 eats our [], so we need to use [ and ] instead.
23152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23153  if test "x$has_forbidden_chars" != x; then
23154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23158      # Going to short mode and back again did indeed matter. Since short mode is
23159      # case insensitive, let's make it lowercase to improve readability.
23160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23161      # Now convert it back to Unix-stile (cygpath)
23162      input_path=`$CYGPATH -u "$shortmode_path"`
23163      new_path="$input_path"
23164    fi
23165  fi
23166
23167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23168  if test "x$test_cygdrive_prefix" = x; then
23169    # As a simple fix, exclude /usr/bin since it's not a real path.
23170    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23172      # a path prefixed by /cygdrive for fixpath to work.
23173      new_path="$CYGWIN_ROOT_PATH$input_path"
23174    fi
23175  fi
23176
23177  # remove trailing .exe if any
23178  new_path="${new_path/%.exe/}"
23179
23180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23181
23182  # First separate the path from the arguments. This will split at the first
23183  # space.
23184  complete="$RC"
23185  path="${complete%% *}"
23186  tmp="$complete EOL"
23187  arguments="${tmp#* }"
23188
23189  # Input might be given as Windows format, start by converting to
23190  # unix format.
23191  new_path="$path"
23192
23193  windows_path="$new_path"
23194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23195    unix_path=`$CYGPATH -u "$windows_path"`
23196    new_path="$unix_path"
23197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23199    new_path="$unix_path"
23200  fi
23201
23202
23203  # Now try to locate executable using which
23204  new_path=`$WHICH "$new_path" 2> /dev/null`
23205
23206  if test "x$new_path" = x; then
23207    # Oops. Which didn't find the executable.
23208    # The splitting of arguments from the executable at a space might have been incorrect,
23209    # since paths with space are more likely in Windows. Give it another try with the whole
23210    # argument.
23211    path="$complete"
23212    arguments="EOL"
23213    new_path="$path"
23214
23215  windows_path="$new_path"
23216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23217    unix_path=`$CYGPATH -u "$windows_path"`
23218    new_path="$unix_path"
23219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23221    new_path="$unix_path"
23222  fi
23223
23224
23225    new_path=`$WHICH "$new_path" 2> /dev/null`
23226
23227    if test "x$new_path" = x; then
23228      # It's still not found. Now this is an unrecoverable error.
23229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23230$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23231      has_space=`$ECHO "$complete" | $GREP " "`
23232      if test "x$has_space" != x; then
23233        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23234$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23235      fi
23236      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23237    fi
23238  fi
23239
23240  # Now new_path has a complete unix path to the binary
23241  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23242    # Keep paths in /bin as-is, but remove trailing .exe if any
23243    new_path="${new_path/%.exe/}"
23244    # Do not save /bin paths to all_fixpath_prefixes!
23245  else
23246    # Not in mixed or Windows style, start by that.
23247    new_path=`cmd //c echo $new_path`
23248
23249  input_path="$new_path"
23250  # Check if we need to convert this using DOS-style short mode. If the path
23251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23252  # take no chances and rewrite it.
23253  # Note: m4 eats our [], so we need to use [ and ] instead.
23254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23255  if test "x$has_forbidden_chars" != x; then
23256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23258  fi
23259
23260    # Output is in $new_path
23261
23262  windows_path="$new_path"
23263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23264    unix_path=`$CYGPATH -u "$windows_path"`
23265    new_path="$unix_path"
23266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23268    new_path="$unix_path"
23269  fi
23270
23271    # remove trailing .exe if any
23272    new_path="${new_path/%.exe/}"
23273
23274    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23275    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23276  fi
23277
23278  else
23279    # We're on a posix platform. Hooray! :)
23280    # First separate the path from the arguments. This will split at the first
23281    # space.
23282    complete="$RC"
23283    path="${complete%% *}"
23284    tmp="$complete EOL"
23285    arguments="${tmp#* }"
23286
23287    # Cannot rely on the command "which" here since it doesn't always work.
23288    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23289    if test -z "$is_absolute_path"; then
23290      # Path to executable is not absolute. Find it.
23291      IFS_save="$IFS"
23292      IFS=:
23293      for p in $PATH; do
23294        if test -f "$p/$path" && test -x "$p/$path"; then
23295          new_path="$p/$path"
23296          break
23297        fi
23298      done
23299      IFS="$IFS_save"
23300    else
23301      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23302$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23303      new_path="$path"
23304    fi
23305
23306    if test "x$new_path" = x; then
23307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23308$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23309        has_space=`$ECHO "$complete" | $GREP " "`
23310        if test "x$has_space" != x; then
23311          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23312$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23313        fi
23314        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23315      fi
23316  fi
23317
23318      # Now join together the path and the arguments once again
23319      if test "x$arguments" != xEOL; then
23320        new_complete="$new_path ${arguments% *}"
23321      else
23322        new_complete="$new_path"
23323      fi
23324
23325  if test "x$complete" != "x$new_complete"; then
23326      RC="$new_complete"
23327      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23328$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23329    fi
23330
23331
23332    # For hotspot, we need these in Windows mixed path,
23333    # so rewrite them all. Need added .exe suffix.
23334    HOTSPOT_CXX="$CXX.exe"
23335    HOTSPOT_LD="$LD.exe"
23336    HOTSPOT_MT="$MT.exe"
23337    HOTSPOT_RC="$RC.exe"
23338
23339  unix_path="$HOTSPOT_CXX"
23340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23341    windows_path=`$CYGPATH -m "$unix_path"`
23342    HOTSPOT_CXX="$windows_path"
23343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23344    windows_path=`cmd //c echo $unix_path`
23345    HOTSPOT_CXX="$windows_path"
23346  fi
23347
23348
23349  unix_path="$HOTSPOT_LD"
23350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23351    windows_path=`$CYGPATH -m "$unix_path"`
23352    HOTSPOT_LD="$windows_path"
23353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23354    windows_path=`cmd //c echo $unix_path`
23355    HOTSPOT_LD="$windows_path"
23356  fi
23357
23358
23359  unix_path="$HOTSPOT_MT"
23360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23361    windows_path=`$CYGPATH -m "$unix_path"`
23362    HOTSPOT_MT="$windows_path"
23363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23364    windows_path=`cmd //c echo $unix_path`
23365    HOTSPOT_MT="$windows_path"
23366  fi
23367
23368
23369  unix_path="$HOTSPOT_RC"
23370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23371    windows_path=`$CYGPATH -m "$unix_path"`
23372    HOTSPOT_RC="$windows_path"
23373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23374    windows_path=`cmd //c echo $unix_path`
23375    HOTSPOT_RC="$windows_path"
23376  fi
23377
23378
23379
23380
23381    RC_FLAGS="-nologo -l 0x409 -r"
23382    if test "x$VARIANT" = xOPT; then :
23383
23384        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23385
23386fi
23387    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23388    if test "x$JDK_UPDATE_VERSION" = x; then :
23389
23390        JDK_UPDATE_VERSION_NOTNULL=0
23391
23392fi
23393    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23394    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23395    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23396    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23397    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23398    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23399    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23400
23401    # lib.exe is used to create static libraries.
23402    # Extract the first word of "lib", so it can be a program name with args.
23403set dummy lib; ac_word=$2
23404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23405$as_echo_n "checking for $ac_word... " >&6; }
23406if test "${ac_cv_prog_WINAR+set}" = set; then :
23407  $as_echo_n "(cached) " >&6
23408else
23409  if test -n "$WINAR"; then
23410  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23411else
23412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23413for as_dir in $PATH
23414do
23415  IFS=$as_save_IFS
23416  test -z "$as_dir" && as_dir=.
23417    for ac_exec_ext in '' $ac_executable_extensions; do
23418  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23419    ac_cv_prog_WINAR="lib"
23420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23421    break 2
23422  fi
23423done
23424  done
23425IFS=$as_save_IFS
23426
23427fi
23428fi
23429WINAR=$ac_cv_prog_WINAR
23430if test -n "$WINAR"; then
23431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23432$as_echo "$WINAR" >&6; }
23433else
23434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23435$as_echo "no" >&6; }
23436fi
23437
23438
23439
23440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23441
23442  # First separate the path from the arguments. This will split at the first
23443  # space.
23444  complete="$WINAR"
23445  path="${complete%% *}"
23446  tmp="$complete EOL"
23447  arguments="${tmp#* }"
23448
23449  # Input might be given as Windows format, start by converting to
23450  # unix format.
23451  new_path=`$CYGPATH -u "$path"`
23452
23453  # Now try to locate executable using which
23454  new_path=`$WHICH "$new_path" 2> /dev/null`
23455  # bat and cmd files are not always considered executable in cygwin causing which
23456  # to not find them
23457  if test "x$new_path" = x \
23458           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23459           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23460    new_path=`$CYGPATH -u "$path"`
23461  fi
23462  if test "x$new_path" = x; then
23463    # Oops. Which didn't find the executable.
23464    # The splitting of arguments from the executable at a space might have been incorrect,
23465    # since paths with space are more likely in Windows. Give it another try with the whole
23466    # argument.
23467    path="$complete"
23468    arguments="EOL"
23469    new_path=`$CYGPATH -u "$path"`
23470    new_path=`$WHICH "$new_path" 2> /dev/null`
23471    # bat and cmd files are not always considered executable in cygwin causing which
23472    # to not find them
23473    if test "x$new_path" = x \
23474             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23475             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23476      new_path=`$CYGPATH -u "$path"`
23477    fi
23478    if test "x$new_path" = x; then
23479      # It's still not found. Now this is an unrecoverable error.
23480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23481$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23482      has_space=`$ECHO "$complete" | $GREP " "`
23483      if test "x$has_space" != x; then
23484        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23485$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23486      fi
23487      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23488    fi
23489  fi
23490
23491  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23492  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23493  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23494  # "foo.exe" is OK but "foo" is an error.
23495  #
23496  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23497  # It is also a way to make sure we got the proper file name for the real test later on.
23498  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23499  if test "x$test_shortpath" = x; then
23500    # Short path failed, file does not exist as specified.
23501    # Try adding .exe or .cmd
23502    if test -f "${new_path}.exe"; then
23503       input_to_shortpath="${new_path}.exe"
23504    elif test -f "${new_path}.cmd"; then
23505       input_to_shortpath="${new_path}.cmd"
23506    else
23507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23508$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23509      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23510$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23511      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23512    fi
23513  else
23514    input_to_shortpath="$new_path"
23515  fi
23516
23517  # Call helper function which possibly converts this using DOS-style short mode.
23518  # If so, the updated path is stored in $new_path.
23519  new_path="$input_to_shortpath"
23520
23521  input_path="$input_to_shortpath"
23522  # Check if we need to convert this using DOS-style short mode. If the path
23523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23524  # take no chances and rewrite it.
23525  # Note: m4 eats our [], so we need to use [ and ] instead.
23526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23527  if test "x$has_forbidden_chars" != x; then
23528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23529    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23530    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23531    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23532      # Going to short mode and back again did indeed matter. Since short mode is
23533      # case insensitive, let's make it lowercase to improve readability.
23534      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23535      # Now convert it back to Unix-stile (cygpath)
23536      input_path=`$CYGPATH -u "$shortmode_path"`
23537      new_path="$input_path"
23538    fi
23539  fi
23540
23541  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23542  if test "x$test_cygdrive_prefix" = x; then
23543    # As a simple fix, exclude /usr/bin since it's not a real path.
23544    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23545      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23546      # a path prefixed by /cygdrive for fixpath to work.
23547      new_path="$CYGWIN_ROOT_PATH$input_path"
23548    fi
23549  fi
23550
23551  # remove trailing .exe if any
23552  new_path="${new_path/%.exe/}"
23553
23554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23555
23556  # First separate the path from the arguments. This will split at the first
23557  # space.
23558  complete="$WINAR"
23559  path="${complete%% *}"
23560  tmp="$complete EOL"
23561  arguments="${tmp#* }"
23562
23563  # Input might be given as Windows format, start by converting to
23564  # unix format.
23565  new_path="$path"
23566
23567  windows_path="$new_path"
23568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23569    unix_path=`$CYGPATH -u "$windows_path"`
23570    new_path="$unix_path"
23571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23573    new_path="$unix_path"
23574  fi
23575
23576
23577  # Now try to locate executable using which
23578  new_path=`$WHICH "$new_path" 2> /dev/null`
23579
23580  if test "x$new_path" = x; then
23581    # Oops. Which didn't find the executable.
23582    # The splitting of arguments from the executable at a space might have been incorrect,
23583    # since paths with space are more likely in Windows. Give it another try with the whole
23584    # argument.
23585    path="$complete"
23586    arguments="EOL"
23587    new_path="$path"
23588
23589  windows_path="$new_path"
23590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23591    unix_path=`$CYGPATH -u "$windows_path"`
23592    new_path="$unix_path"
23593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23595    new_path="$unix_path"
23596  fi
23597
23598
23599    new_path=`$WHICH "$new_path" 2> /dev/null`
23600
23601    if test "x$new_path" = x; then
23602      # It's still not found. Now this is an unrecoverable error.
23603      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23604$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23605      has_space=`$ECHO "$complete" | $GREP " "`
23606      if test "x$has_space" != x; then
23607        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23608$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23609      fi
23610      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23611    fi
23612  fi
23613
23614  # Now new_path has a complete unix path to the binary
23615  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23616    # Keep paths in /bin as-is, but remove trailing .exe if any
23617    new_path="${new_path/%.exe/}"
23618    # Do not save /bin paths to all_fixpath_prefixes!
23619  else
23620    # Not in mixed or Windows style, start by that.
23621    new_path=`cmd //c echo $new_path`
23622
23623  input_path="$new_path"
23624  # Check if we need to convert this using DOS-style short mode. If the path
23625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23626  # take no chances and rewrite it.
23627  # Note: m4 eats our [], so we need to use [ and ] instead.
23628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23629  if test "x$has_forbidden_chars" != x; then
23630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23632  fi
23633
23634    # Output is in $new_path
23635
23636  windows_path="$new_path"
23637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23638    unix_path=`$CYGPATH -u "$windows_path"`
23639    new_path="$unix_path"
23640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23642    new_path="$unix_path"
23643  fi
23644
23645    # remove trailing .exe if any
23646    new_path="${new_path/%.exe/}"
23647
23648    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23649    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23650  fi
23651
23652  else
23653    # We're on a posix platform. Hooray! :)
23654    # First separate the path from the arguments. This will split at the first
23655    # space.
23656    complete="$WINAR"
23657    path="${complete%% *}"
23658    tmp="$complete EOL"
23659    arguments="${tmp#* }"
23660
23661    # Cannot rely on the command "which" here since it doesn't always work.
23662    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23663    if test -z "$is_absolute_path"; then
23664      # Path to executable is not absolute. Find it.
23665      IFS_save="$IFS"
23666      IFS=:
23667      for p in $PATH; do
23668        if test -f "$p/$path" && test -x "$p/$path"; then
23669          new_path="$p/$path"
23670          break
23671        fi
23672      done
23673      IFS="$IFS_save"
23674    else
23675      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23676$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23677      new_path="$path"
23678    fi
23679
23680    if test "x$new_path" = x; then
23681        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23682$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23683        has_space=`$ECHO "$complete" | $GREP " "`
23684        if test "x$has_space" != x; then
23685          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23686$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23687        fi
23688        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23689      fi
23690  fi
23691
23692      # Now join together the path and the arguments once again
23693      if test "x$arguments" != xEOL; then
23694        new_complete="$new_path ${arguments% *}"
23695      else
23696        new_complete="$new_path"
23697      fi
23698
23699  if test "x$complete" != "x$new_complete"; then
23700      WINAR="$new_complete"
23701      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23702$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23703    fi
23704
23705    AR="$WINAR"
23706    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23707
23708    # Extract the first word of "dumpbin", so it can be a program name with args.
23709set dummy dumpbin; ac_word=$2
23710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23711$as_echo_n "checking for $ac_word... " >&6; }
23712if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23713  $as_echo_n "(cached) " >&6
23714else
23715  if test -n "$DUMPBIN"; then
23716  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23717else
23718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23719for as_dir in $PATH
23720do
23721  IFS=$as_save_IFS
23722  test -z "$as_dir" && as_dir=.
23723    for ac_exec_ext in '' $ac_executable_extensions; do
23724  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23725    ac_cv_prog_DUMPBIN="dumpbin"
23726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23727    break 2
23728  fi
23729done
23730  done
23731IFS=$as_save_IFS
23732
23733fi
23734fi
23735DUMPBIN=$ac_cv_prog_DUMPBIN
23736if test -n "$DUMPBIN"; then
23737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23738$as_echo "$DUMPBIN" >&6; }
23739else
23740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23741$as_echo "no" >&6; }
23742fi
23743
23744
23745
23746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23747
23748  # First separate the path from the arguments. This will split at the first
23749  # space.
23750  complete="$DUMPBIN"
23751  path="${complete%% *}"
23752  tmp="$complete EOL"
23753  arguments="${tmp#* }"
23754
23755  # Input might be given as Windows format, start by converting to
23756  # unix format.
23757  new_path=`$CYGPATH -u "$path"`
23758
23759  # Now try to locate executable using which
23760  new_path=`$WHICH "$new_path" 2> /dev/null`
23761  # bat and cmd files are not always considered executable in cygwin causing which
23762  # to not find them
23763  if test "x$new_path" = x \
23764           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23765           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23766    new_path=`$CYGPATH -u "$path"`
23767  fi
23768  if test "x$new_path" = x; then
23769    # Oops. Which didn't find the executable.
23770    # The splitting of arguments from the executable at a space might have been incorrect,
23771    # since paths with space are more likely in Windows. Give it another try with the whole
23772    # argument.
23773    path="$complete"
23774    arguments="EOL"
23775    new_path=`$CYGPATH -u "$path"`
23776    new_path=`$WHICH "$new_path" 2> /dev/null`
23777    # bat and cmd files are not always considered executable in cygwin causing which
23778    # to not find them
23779    if test "x$new_path" = x \
23780             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23781             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23782      new_path=`$CYGPATH -u "$path"`
23783    fi
23784    if test "x$new_path" = x; then
23785      # It's still not found. Now this is an unrecoverable error.
23786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23787$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23788      has_space=`$ECHO "$complete" | $GREP " "`
23789      if test "x$has_space" != x; then
23790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23792      fi
23793      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23794    fi
23795  fi
23796
23797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23800  # "foo.exe" is OK but "foo" is an error.
23801  #
23802  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23803  # It is also a way to make sure we got the proper file name for the real test later on.
23804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23805  if test "x$test_shortpath" = x; then
23806    # Short path failed, file does not exist as specified.
23807    # Try adding .exe or .cmd
23808    if test -f "${new_path}.exe"; then
23809       input_to_shortpath="${new_path}.exe"
23810    elif test -f "${new_path}.cmd"; then
23811       input_to_shortpath="${new_path}.cmd"
23812    else
23813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23814$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23815      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23816$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23817      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23818    fi
23819  else
23820    input_to_shortpath="$new_path"
23821  fi
23822
23823  # Call helper function which possibly converts this using DOS-style short mode.
23824  # If so, the updated path is stored in $new_path.
23825  new_path="$input_to_shortpath"
23826
23827  input_path="$input_to_shortpath"
23828  # Check if we need to convert this using DOS-style short mode. If the path
23829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23830  # take no chances and rewrite it.
23831  # Note: m4 eats our [], so we need to use [ and ] instead.
23832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23833  if test "x$has_forbidden_chars" != x; then
23834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23838      # Going to short mode and back again did indeed matter. Since short mode is
23839      # case insensitive, let's make it lowercase to improve readability.
23840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23841      # Now convert it back to Unix-stile (cygpath)
23842      input_path=`$CYGPATH -u "$shortmode_path"`
23843      new_path="$input_path"
23844    fi
23845  fi
23846
23847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23848  if test "x$test_cygdrive_prefix" = x; then
23849    # As a simple fix, exclude /usr/bin since it's not a real path.
23850    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23852      # a path prefixed by /cygdrive for fixpath to work.
23853      new_path="$CYGWIN_ROOT_PATH$input_path"
23854    fi
23855  fi
23856
23857  # remove trailing .exe if any
23858  new_path="${new_path/%.exe/}"
23859
23860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23861
23862  # First separate the path from the arguments. This will split at the first
23863  # space.
23864  complete="$DUMPBIN"
23865  path="${complete%% *}"
23866  tmp="$complete EOL"
23867  arguments="${tmp#* }"
23868
23869  # Input might be given as Windows format, start by converting to
23870  # unix format.
23871  new_path="$path"
23872
23873  windows_path="$new_path"
23874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23875    unix_path=`$CYGPATH -u "$windows_path"`
23876    new_path="$unix_path"
23877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23879    new_path="$unix_path"
23880  fi
23881
23882
23883  # Now try to locate executable using which
23884  new_path=`$WHICH "$new_path" 2> /dev/null`
23885
23886  if test "x$new_path" = x; then
23887    # Oops. Which didn't find the executable.
23888    # The splitting of arguments from the executable at a space might have been incorrect,
23889    # since paths with space are more likely in Windows. Give it another try with the whole
23890    # argument.
23891    path="$complete"
23892    arguments="EOL"
23893    new_path="$path"
23894
23895  windows_path="$new_path"
23896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23897    unix_path=`$CYGPATH -u "$windows_path"`
23898    new_path="$unix_path"
23899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23901    new_path="$unix_path"
23902  fi
23903
23904
23905    new_path=`$WHICH "$new_path" 2> /dev/null`
23906
23907    if test "x$new_path" = x; then
23908      # It's still not found. Now this is an unrecoverable error.
23909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23910$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23911      has_space=`$ECHO "$complete" | $GREP " "`
23912      if test "x$has_space" != x; then
23913        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23914$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23915      fi
23916      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23917    fi
23918  fi
23919
23920  # Now new_path has a complete unix path to the binary
23921  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23922    # Keep paths in /bin as-is, but remove trailing .exe if any
23923    new_path="${new_path/%.exe/}"
23924    # Do not save /bin paths to all_fixpath_prefixes!
23925  else
23926    # Not in mixed or Windows style, start by that.
23927    new_path=`cmd //c echo $new_path`
23928
23929  input_path="$new_path"
23930  # Check if we need to convert this using DOS-style short mode. If the path
23931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23932  # take no chances and rewrite it.
23933  # Note: m4 eats our [], so we need to use [ and ] instead.
23934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23935  if test "x$has_forbidden_chars" != x; then
23936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23937    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23938  fi
23939
23940    # Output is in $new_path
23941
23942  windows_path="$new_path"
23943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23944    unix_path=`$CYGPATH -u "$windows_path"`
23945    new_path="$unix_path"
23946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23948    new_path="$unix_path"
23949  fi
23950
23951    # remove trailing .exe if any
23952    new_path="${new_path/%.exe/}"
23953
23954    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23955    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23956  fi
23957
23958  else
23959    # We're on a posix platform. Hooray! :)
23960    # First separate the path from the arguments. This will split at the first
23961    # space.
23962    complete="$DUMPBIN"
23963    path="${complete%% *}"
23964    tmp="$complete EOL"
23965    arguments="${tmp#* }"
23966
23967    # Cannot rely on the command "which" here since it doesn't always work.
23968    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23969    if test -z "$is_absolute_path"; then
23970      # Path to executable is not absolute. Find it.
23971      IFS_save="$IFS"
23972      IFS=:
23973      for p in $PATH; do
23974        if test -f "$p/$path" && test -x "$p/$path"; then
23975          new_path="$p/$path"
23976          break
23977        fi
23978      done
23979      IFS="$IFS_save"
23980    else
23981      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23982$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23983      new_path="$path"
23984    fi
23985
23986    if test "x$new_path" = x; then
23987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23988$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23989        has_space=`$ECHO "$complete" | $GREP " "`
23990        if test "x$has_space" != x; then
23991          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23992$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23993        fi
23994        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23995      fi
23996  fi
23997
23998      # Now join together the path and the arguments once again
23999      if test "x$arguments" != xEOL; then
24000        new_complete="$new_path ${arguments% *}"
24001      else
24002        new_complete="$new_path"
24003      fi
24004
24005  if test "x$complete" != "x$new_complete"; then
24006      DUMPBIN="$new_complete"
24007      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24008$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24009    fi
24010
24011
24012    COMPILER_TYPE=CL
24013    CCXXFLAGS="$CCXXFLAGS -nologo"
24014
24015fi
24016
24017
24018
24019ac_ext=c
24020ac_cpp='$CPP $CPPFLAGS'
24021ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24022ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24023ac_compiler_gnu=$ac_cv_c_compiler_gnu
24024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24025$as_echo_n "checking how to run the C preprocessor... " >&6; }
24026# On Suns, sometimes $CPP names a directory.
24027if test -n "$CPP" && test -d "$CPP"; then
24028  CPP=
24029fi
24030if test -z "$CPP"; then
24031  if test "${ac_cv_prog_CPP+set}" = set; then :
24032  $as_echo_n "(cached) " >&6
24033else
24034      # Double quotes because CPP needs to be expanded
24035    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24036    do
24037      ac_preproc_ok=false
24038for ac_c_preproc_warn_flag in '' yes
24039do
24040  # Use a header file that comes with gcc, so configuring glibc
24041  # with a fresh cross-compiler works.
24042  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24043  # <limits.h> exists even on freestanding compilers.
24044  # On the NeXT, cc -E runs the code through the compiler's parser,
24045  # not just through cpp. "Syntax error" is here to catch this case.
24046  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24047/* end confdefs.h.  */
24048#ifdef __STDC__
24049# include <limits.h>
24050#else
24051# include <assert.h>
24052#endif
24053		     Syntax error
24054_ACEOF
24055if ac_fn_c_try_cpp "$LINENO"; then :
24056
24057else
24058  # Broken: fails on valid input.
24059continue
24060fi
24061rm -f conftest.err conftest.i conftest.$ac_ext
24062
24063  # OK, works on sane cases.  Now check whether nonexistent headers
24064  # can be detected and how.
24065  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24066/* end confdefs.h.  */
24067#include <ac_nonexistent.h>
24068_ACEOF
24069if ac_fn_c_try_cpp "$LINENO"; then :
24070  # Broken: success on invalid input.
24071continue
24072else
24073  # Passes both tests.
24074ac_preproc_ok=:
24075break
24076fi
24077rm -f conftest.err conftest.i conftest.$ac_ext
24078
24079done
24080# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24081rm -f conftest.i conftest.err conftest.$ac_ext
24082if $ac_preproc_ok; then :
24083  break
24084fi
24085
24086    done
24087    ac_cv_prog_CPP=$CPP
24088
24089fi
24090  CPP=$ac_cv_prog_CPP
24091else
24092  ac_cv_prog_CPP=$CPP
24093fi
24094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24095$as_echo "$CPP" >&6; }
24096ac_preproc_ok=false
24097for ac_c_preproc_warn_flag in '' yes
24098do
24099  # Use a header file that comes with gcc, so configuring glibc
24100  # with a fresh cross-compiler works.
24101  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24102  # <limits.h> exists even on freestanding compilers.
24103  # On the NeXT, cc -E runs the code through the compiler's parser,
24104  # not just through cpp. "Syntax error" is here to catch this case.
24105  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24106/* end confdefs.h.  */
24107#ifdef __STDC__
24108# include <limits.h>
24109#else
24110# include <assert.h>
24111#endif
24112		     Syntax error
24113_ACEOF
24114if ac_fn_c_try_cpp "$LINENO"; then :
24115
24116else
24117  # Broken: fails on valid input.
24118continue
24119fi
24120rm -f conftest.err conftest.i conftest.$ac_ext
24121
24122  # OK, works on sane cases.  Now check whether nonexistent headers
24123  # can be detected and how.
24124  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24125/* end confdefs.h.  */
24126#include <ac_nonexistent.h>
24127_ACEOF
24128if ac_fn_c_try_cpp "$LINENO"; then :
24129  # Broken: success on invalid input.
24130continue
24131else
24132  # Passes both tests.
24133ac_preproc_ok=:
24134break
24135fi
24136rm -f conftest.err conftest.i conftest.$ac_ext
24137
24138done
24139# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24140rm -f conftest.i conftest.err conftest.$ac_ext
24141if $ac_preproc_ok; then :
24142
24143else
24144  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24145$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24146as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24147See \`config.log' for more details" "$LINENO" 5 ; }
24148fi
24149
24150ac_ext=cpp
24151ac_cpp='$CXXCPP $CPPFLAGS'
24152ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24153ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24154ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24155
24156
24157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24158
24159  # First separate the path from the arguments. This will split at the first
24160  # space.
24161  complete="$CPP"
24162  path="${complete%% *}"
24163  tmp="$complete EOL"
24164  arguments="${tmp#* }"
24165
24166  # Input might be given as Windows format, start by converting to
24167  # unix format.
24168  new_path=`$CYGPATH -u "$path"`
24169
24170  # Now try to locate executable using which
24171  new_path=`$WHICH "$new_path" 2> /dev/null`
24172  # bat and cmd files are not always considered executable in cygwin causing which
24173  # to not find them
24174  if test "x$new_path" = x \
24175           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24176           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24177    new_path=`$CYGPATH -u "$path"`
24178  fi
24179  if test "x$new_path" = x; then
24180    # Oops. Which didn't find the executable.
24181    # The splitting of arguments from the executable at a space might have been incorrect,
24182    # since paths with space are more likely in Windows. Give it another try with the whole
24183    # argument.
24184    path="$complete"
24185    arguments="EOL"
24186    new_path=`$CYGPATH -u "$path"`
24187    new_path=`$WHICH "$new_path" 2> /dev/null`
24188    # bat and cmd files are not always considered executable in cygwin causing which
24189    # to not find them
24190    if test "x$new_path" = x \
24191             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24192             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24193      new_path=`$CYGPATH -u "$path"`
24194    fi
24195    if test "x$new_path" = x; then
24196      # It's still not found. Now this is an unrecoverable error.
24197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24198$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24199      has_space=`$ECHO "$complete" | $GREP " "`
24200      if test "x$has_space" != x; then
24201        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24202$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24203      fi
24204      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24205    fi
24206  fi
24207
24208  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24209  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24210  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24211  # "foo.exe" is OK but "foo" is an error.
24212  #
24213  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24214  # It is also a way to make sure we got the proper file name for the real test later on.
24215  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24216  if test "x$test_shortpath" = x; then
24217    # Short path failed, file does not exist as specified.
24218    # Try adding .exe or .cmd
24219    if test -f "${new_path}.exe"; then
24220       input_to_shortpath="${new_path}.exe"
24221    elif test -f "${new_path}.cmd"; then
24222       input_to_shortpath="${new_path}.cmd"
24223    else
24224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24225$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24226      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24227$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24228      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24229    fi
24230  else
24231    input_to_shortpath="$new_path"
24232  fi
24233
24234  # Call helper function which possibly converts this using DOS-style short mode.
24235  # If so, the updated path is stored in $new_path.
24236  new_path="$input_to_shortpath"
24237
24238  input_path="$input_to_shortpath"
24239  # Check if we need to convert this using DOS-style short mode. If the path
24240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24241  # take no chances and rewrite it.
24242  # Note: m4 eats our [], so we need to use [ and ] instead.
24243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24244  if test "x$has_forbidden_chars" != x; then
24245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24249      # Going to short mode and back again did indeed matter. Since short mode is
24250      # case insensitive, let's make it lowercase to improve readability.
24251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24252      # Now convert it back to Unix-stile (cygpath)
24253      input_path=`$CYGPATH -u "$shortmode_path"`
24254      new_path="$input_path"
24255    fi
24256  fi
24257
24258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24259  if test "x$test_cygdrive_prefix" = x; then
24260    # As a simple fix, exclude /usr/bin since it's not a real path.
24261    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24263      # a path prefixed by /cygdrive for fixpath to work.
24264      new_path="$CYGWIN_ROOT_PATH$input_path"
24265    fi
24266  fi
24267
24268  # remove trailing .exe if any
24269  new_path="${new_path/%.exe/}"
24270
24271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24272
24273  # First separate the path from the arguments. This will split at the first
24274  # space.
24275  complete="$CPP"
24276  path="${complete%% *}"
24277  tmp="$complete EOL"
24278  arguments="${tmp#* }"
24279
24280  # Input might be given as Windows format, start by converting to
24281  # unix format.
24282  new_path="$path"
24283
24284  windows_path="$new_path"
24285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24286    unix_path=`$CYGPATH -u "$windows_path"`
24287    new_path="$unix_path"
24288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24290    new_path="$unix_path"
24291  fi
24292
24293
24294  # Now try to locate executable using which
24295  new_path=`$WHICH "$new_path" 2> /dev/null`
24296
24297  if test "x$new_path" = x; then
24298    # Oops. Which didn't find the executable.
24299    # The splitting of arguments from the executable at a space might have been incorrect,
24300    # since paths with space are more likely in Windows. Give it another try with the whole
24301    # argument.
24302    path="$complete"
24303    arguments="EOL"
24304    new_path="$path"
24305
24306  windows_path="$new_path"
24307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24308    unix_path=`$CYGPATH -u "$windows_path"`
24309    new_path="$unix_path"
24310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24312    new_path="$unix_path"
24313  fi
24314
24315
24316    new_path=`$WHICH "$new_path" 2> /dev/null`
24317
24318    if test "x$new_path" = x; then
24319      # It's still not found. Now this is an unrecoverable error.
24320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24321$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24322      has_space=`$ECHO "$complete" | $GREP " "`
24323      if test "x$has_space" != x; then
24324        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24325$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24326      fi
24327      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24328    fi
24329  fi
24330
24331  # Now new_path has a complete unix path to the binary
24332  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24333    # Keep paths in /bin as-is, but remove trailing .exe if any
24334    new_path="${new_path/%.exe/}"
24335    # Do not save /bin paths to all_fixpath_prefixes!
24336  else
24337    # Not in mixed or Windows style, start by that.
24338    new_path=`cmd //c echo $new_path`
24339
24340  input_path="$new_path"
24341  # Check if we need to convert this using DOS-style short mode. If the path
24342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24343  # take no chances and rewrite it.
24344  # Note: m4 eats our [], so we need to use [ and ] instead.
24345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24346  if test "x$has_forbidden_chars" != x; then
24347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24349  fi
24350
24351    # Output is in $new_path
24352
24353  windows_path="$new_path"
24354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24355    unix_path=`$CYGPATH -u "$windows_path"`
24356    new_path="$unix_path"
24357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24359    new_path="$unix_path"
24360  fi
24361
24362    # remove trailing .exe if any
24363    new_path="${new_path/%.exe/}"
24364
24365    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24366    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24367  fi
24368
24369  else
24370    # We're on a posix platform. Hooray! :)
24371    # First separate the path from the arguments. This will split at the first
24372    # space.
24373    complete="$CPP"
24374    path="${complete%% *}"
24375    tmp="$complete EOL"
24376    arguments="${tmp#* }"
24377
24378    # Cannot rely on the command "which" here since it doesn't always work.
24379    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24380    if test -z "$is_absolute_path"; then
24381      # Path to executable is not absolute. Find it.
24382      IFS_save="$IFS"
24383      IFS=:
24384      for p in $PATH; do
24385        if test -f "$p/$path" && test -x "$p/$path"; then
24386          new_path="$p/$path"
24387          break
24388        fi
24389      done
24390      IFS="$IFS_save"
24391    else
24392      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24393$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24394      new_path="$path"
24395    fi
24396
24397    if test "x$new_path" = x; then
24398        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24399$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24400        has_space=`$ECHO "$complete" | $GREP " "`
24401        if test "x$has_space" != x; then
24402          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24403$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24404        fi
24405        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24406      fi
24407  fi
24408
24409      # Now join together the path and the arguments once again
24410      if test "x$arguments" != xEOL; then
24411        new_complete="$new_path ${arguments% *}"
24412      else
24413        new_complete="$new_path"
24414      fi
24415
24416  if test "x$complete" != "x$new_complete"; then
24417      CPP="$new_complete"
24418      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24419$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24420    fi
24421
24422
24423ac_ext=cpp
24424ac_cpp='$CXXCPP $CPPFLAGS'
24425ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24426ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24427ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24429$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24430if test -z "$CXXCPP"; then
24431  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24432  $as_echo_n "(cached) " >&6
24433else
24434      # Double quotes because CXXCPP needs to be expanded
24435    for CXXCPP in "$CXX -E" "/lib/cpp"
24436    do
24437      ac_preproc_ok=false
24438for ac_cxx_preproc_warn_flag in '' yes
24439do
24440  # Use a header file that comes with gcc, so configuring glibc
24441  # with a fresh cross-compiler works.
24442  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24443  # <limits.h> exists even on freestanding compilers.
24444  # On the NeXT, cc -E runs the code through the compiler's parser,
24445  # not just through cpp. "Syntax error" is here to catch this case.
24446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24447/* end confdefs.h.  */
24448#ifdef __STDC__
24449# include <limits.h>
24450#else
24451# include <assert.h>
24452#endif
24453		     Syntax error
24454_ACEOF
24455if ac_fn_cxx_try_cpp "$LINENO"; then :
24456
24457else
24458  # Broken: fails on valid input.
24459continue
24460fi
24461rm -f conftest.err conftest.i conftest.$ac_ext
24462
24463  # OK, works on sane cases.  Now check whether nonexistent headers
24464  # can be detected and how.
24465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24466/* end confdefs.h.  */
24467#include <ac_nonexistent.h>
24468_ACEOF
24469if ac_fn_cxx_try_cpp "$LINENO"; then :
24470  # Broken: success on invalid input.
24471continue
24472else
24473  # Passes both tests.
24474ac_preproc_ok=:
24475break
24476fi
24477rm -f conftest.err conftest.i conftest.$ac_ext
24478
24479done
24480# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24481rm -f conftest.i conftest.err conftest.$ac_ext
24482if $ac_preproc_ok; then :
24483  break
24484fi
24485
24486    done
24487    ac_cv_prog_CXXCPP=$CXXCPP
24488
24489fi
24490  CXXCPP=$ac_cv_prog_CXXCPP
24491else
24492  ac_cv_prog_CXXCPP=$CXXCPP
24493fi
24494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24495$as_echo "$CXXCPP" >&6; }
24496ac_preproc_ok=false
24497for ac_cxx_preproc_warn_flag in '' yes
24498do
24499  # Use a header file that comes with gcc, so configuring glibc
24500  # with a fresh cross-compiler works.
24501  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24502  # <limits.h> exists even on freestanding compilers.
24503  # On the NeXT, cc -E runs the code through the compiler's parser,
24504  # not just through cpp. "Syntax error" is here to catch this case.
24505  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24506/* end confdefs.h.  */
24507#ifdef __STDC__
24508# include <limits.h>
24509#else
24510# include <assert.h>
24511#endif
24512		     Syntax error
24513_ACEOF
24514if ac_fn_cxx_try_cpp "$LINENO"; then :
24515
24516else
24517  # Broken: fails on valid input.
24518continue
24519fi
24520rm -f conftest.err conftest.i conftest.$ac_ext
24521
24522  # OK, works on sane cases.  Now check whether nonexistent headers
24523  # can be detected and how.
24524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24525/* end confdefs.h.  */
24526#include <ac_nonexistent.h>
24527_ACEOF
24528if ac_fn_cxx_try_cpp "$LINENO"; then :
24529  # Broken: success on invalid input.
24530continue
24531else
24532  # Passes both tests.
24533ac_preproc_ok=:
24534break
24535fi
24536rm -f conftest.err conftest.i conftest.$ac_ext
24537
24538done
24539# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24540rm -f conftest.i conftest.err conftest.$ac_ext
24541if $ac_preproc_ok; then :
24542
24543else
24544  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24545$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24546as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24547See \`config.log' for more details" "$LINENO" 5 ; }
24548fi
24549
24550ac_ext=cpp
24551ac_cpp='$CXXCPP $CPPFLAGS'
24552ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24553ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24554ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24555
24556
24557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24558
24559  # First separate the path from the arguments. This will split at the first
24560  # space.
24561  complete="$CXXCPP"
24562  path="${complete%% *}"
24563  tmp="$complete EOL"
24564  arguments="${tmp#* }"
24565
24566  # Input might be given as Windows format, start by converting to
24567  # unix format.
24568  new_path=`$CYGPATH -u "$path"`
24569
24570  # Now try to locate executable using which
24571  new_path=`$WHICH "$new_path" 2> /dev/null`
24572  # bat and cmd files are not always considered executable in cygwin causing which
24573  # to not find them
24574  if test "x$new_path" = x \
24575           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24576           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24577    new_path=`$CYGPATH -u "$path"`
24578  fi
24579  if test "x$new_path" = x; then
24580    # Oops. Which didn't find the executable.
24581    # The splitting of arguments from the executable at a space might have been incorrect,
24582    # since paths with space are more likely in Windows. Give it another try with the whole
24583    # argument.
24584    path="$complete"
24585    arguments="EOL"
24586    new_path=`$CYGPATH -u "$path"`
24587    new_path=`$WHICH "$new_path" 2> /dev/null`
24588    # bat and cmd files are not always considered executable in cygwin causing which
24589    # to not find them
24590    if test "x$new_path" = x \
24591             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24592             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24593      new_path=`$CYGPATH -u "$path"`
24594    fi
24595    if test "x$new_path" = x; then
24596      # It's still not found. Now this is an unrecoverable error.
24597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24598$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24599      has_space=`$ECHO "$complete" | $GREP " "`
24600      if test "x$has_space" != x; then
24601        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24602$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24603      fi
24604      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24605    fi
24606  fi
24607
24608  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24609  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24610  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24611  # "foo.exe" is OK but "foo" is an error.
24612  #
24613  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24614  # It is also a way to make sure we got the proper file name for the real test later on.
24615  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24616  if test "x$test_shortpath" = x; then
24617    # Short path failed, file does not exist as specified.
24618    # Try adding .exe or .cmd
24619    if test -f "${new_path}.exe"; then
24620       input_to_shortpath="${new_path}.exe"
24621    elif test -f "${new_path}.cmd"; then
24622       input_to_shortpath="${new_path}.cmd"
24623    else
24624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24625$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24626      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24627$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24628      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24629    fi
24630  else
24631    input_to_shortpath="$new_path"
24632  fi
24633
24634  # Call helper function which possibly converts this using DOS-style short mode.
24635  # If so, the updated path is stored in $new_path.
24636  new_path="$input_to_shortpath"
24637
24638  input_path="$input_to_shortpath"
24639  # Check if we need to convert this using DOS-style short mode. If the path
24640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24641  # take no chances and rewrite it.
24642  # Note: m4 eats our [], so we need to use [ and ] instead.
24643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24644  if test "x$has_forbidden_chars" != x; then
24645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24649      # Going to short mode and back again did indeed matter. Since short mode is
24650      # case insensitive, let's make it lowercase to improve readability.
24651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24652      # Now convert it back to Unix-stile (cygpath)
24653      input_path=`$CYGPATH -u "$shortmode_path"`
24654      new_path="$input_path"
24655    fi
24656  fi
24657
24658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24659  if test "x$test_cygdrive_prefix" = x; then
24660    # As a simple fix, exclude /usr/bin since it's not a real path.
24661    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24663      # a path prefixed by /cygdrive for fixpath to work.
24664      new_path="$CYGWIN_ROOT_PATH$input_path"
24665    fi
24666  fi
24667
24668  # remove trailing .exe if any
24669  new_path="${new_path/%.exe/}"
24670
24671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24672
24673  # First separate the path from the arguments. This will split at the first
24674  # space.
24675  complete="$CXXCPP"
24676  path="${complete%% *}"
24677  tmp="$complete EOL"
24678  arguments="${tmp#* }"
24679
24680  # Input might be given as Windows format, start by converting to
24681  # unix format.
24682  new_path="$path"
24683
24684  windows_path="$new_path"
24685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24686    unix_path=`$CYGPATH -u "$windows_path"`
24687    new_path="$unix_path"
24688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24690    new_path="$unix_path"
24691  fi
24692
24693
24694  # Now try to locate executable using which
24695  new_path=`$WHICH "$new_path" 2> /dev/null`
24696
24697  if test "x$new_path" = x; then
24698    # Oops. Which didn't find the executable.
24699    # The splitting of arguments from the executable at a space might have been incorrect,
24700    # since paths with space are more likely in Windows. Give it another try with the whole
24701    # argument.
24702    path="$complete"
24703    arguments="EOL"
24704    new_path="$path"
24705
24706  windows_path="$new_path"
24707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24708    unix_path=`$CYGPATH -u "$windows_path"`
24709    new_path="$unix_path"
24710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24712    new_path="$unix_path"
24713  fi
24714
24715
24716    new_path=`$WHICH "$new_path" 2> /dev/null`
24717
24718    if test "x$new_path" = x; then
24719      # It's still not found. Now this is an unrecoverable error.
24720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24721$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24722      has_space=`$ECHO "$complete" | $GREP " "`
24723      if test "x$has_space" != x; then
24724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24726      fi
24727      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24728    fi
24729  fi
24730
24731  # Now new_path has a complete unix path to the binary
24732  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24733    # Keep paths in /bin as-is, but remove trailing .exe if any
24734    new_path="${new_path/%.exe/}"
24735    # Do not save /bin paths to all_fixpath_prefixes!
24736  else
24737    # Not in mixed or Windows style, start by that.
24738    new_path=`cmd //c echo $new_path`
24739
24740  input_path="$new_path"
24741  # Check if we need to convert this using DOS-style short mode. If the path
24742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24743  # take no chances and rewrite it.
24744  # Note: m4 eats our [], so we need to use [ and ] instead.
24745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24746  if test "x$has_forbidden_chars" != x; then
24747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24749  fi
24750
24751    # Output is in $new_path
24752
24753  windows_path="$new_path"
24754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24755    unix_path=`$CYGPATH -u "$windows_path"`
24756    new_path="$unix_path"
24757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24759    new_path="$unix_path"
24760  fi
24761
24762    # remove trailing .exe if any
24763    new_path="${new_path/%.exe/}"
24764
24765    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24766    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24767  fi
24768
24769  else
24770    # We're on a posix platform. Hooray! :)
24771    # First separate the path from the arguments. This will split at the first
24772    # space.
24773    complete="$CXXCPP"
24774    path="${complete%% *}"
24775    tmp="$complete EOL"
24776    arguments="${tmp#* }"
24777
24778    # Cannot rely on the command "which" here since it doesn't always work.
24779    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24780    if test -z "$is_absolute_path"; then
24781      # Path to executable is not absolute. Find it.
24782      IFS_save="$IFS"
24783      IFS=:
24784      for p in $PATH; do
24785        if test -f "$p/$path" && test -x "$p/$path"; then
24786          new_path="$p/$path"
24787          break
24788        fi
24789      done
24790      IFS="$IFS_save"
24791    else
24792      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24793$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24794      new_path="$path"
24795    fi
24796
24797    if test "x$new_path" = x; then
24798        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24799$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24800        has_space=`$ECHO "$complete" | $GREP " "`
24801        if test "x$has_space" != x; then
24802          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24803$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24804        fi
24805        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24806      fi
24807  fi
24808
24809      # Now join together the path and the arguments once again
24810      if test "x$arguments" != xEOL; then
24811        new_complete="$new_path ${arguments% *}"
24812      else
24813        new_complete="$new_path"
24814      fi
24815
24816  if test "x$complete" != "x$new_complete"; then
24817      CXXCPP="$new_complete"
24818      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24819$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24820    fi
24821
24822
24823if test "x$COMPILE_TYPE" != "xcross"; then
24824    # If we are not cross compiling, use the same compilers for
24825    # building the build platform executables. The cross-compilation
24826    # case needed to be done earlier, but this can only be done after
24827    # the native tools have been localized.
24828    BUILD_CC="$CC"
24829    BUILD_CXX="$CXX"
24830    BUILD_LD="$LD"
24831fi
24832
24833# for solaris we really need solaris tools, and not gnu equivalent
24834#   these seems to normally reside in /usr/ccs/bin so add that to path before
24835#   starting to probe
24836#
24837#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24838#         so that it can be overriden --with-tools-dir
24839if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24840    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24841fi
24842
24843# Find the right assembler.
24844if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24845    # Extract the first word of "as", so it can be a program name with args.
24846set dummy as; ac_word=$2
24847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24848$as_echo_n "checking for $ac_word... " >&6; }
24849if test "${ac_cv_path_AS+set}" = set; then :
24850  $as_echo_n "(cached) " >&6
24851else
24852  case $AS in
24853  [\\/]* | ?:[\\/]*)
24854  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24855  ;;
24856  *)
24857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24858for as_dir in $PATH
24859do
24860  IFS=$as_save_IFS
24861  test -z "$as_dir" && as_dir=.
24862    for ac_exec_ext in '' $ac_executable_extensions; do
24863  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24864    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24866    break 2
24867  fi
24868done
24869  done
24870IFS=$as_save_IFS
24871
24872  ;;
24873esac
24874fi
24875AS=$ac_cv_path_AS
24876if test -n "$AS"; then
24877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24878$as_echo "$AS" >&6; }
24879else
24880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24881$as_echo "no" >&6; }
24882fi
24883
24884
24885
24886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24887
24888  # First separate the path from the arguments. This will split at the first
24889  # space.
24890  complete="$AS"
24891  path="${complete%% *}"
24892  tmp="$complete EOL"
24893  arguments="${tmp#* }"
24894
24895  # Input might be given as Windows format, start by converting to
24896  # unix format.
24897  new_path=`$CYGPATH -u "$path"`
24898
24899  # Now try to locate executable using which
24900  new_path=`$WHICH "$new_path" 2> /dev/null`
24901  # bat and cmd files are not always considered executable in cygwin causing which
24902  # to not find them
24903  if test "x$new_path" = x \
24904           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24905           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24906    new_path=`$CYGPATH -u "$path"`
24907  fi
24908  if test "x$new_path" = x; then
24909    # Oops. Which didn't find the executable.
24910    # The splitting of arguments from the executable at a space might have been incorrect,
24911    # since paths with space are more likely in Windows. Give it another try with the whole
24912    # argument.
24913    path="$complete"
24914    arguments="EOL"
24915    new_path=`$CYGPATH -u "$path"`
24916    new_path=`$WHICH "$new_path" 2> /dev/null`
24917    # bat and cmd files are not always considered executable in cygwin causing which
24918    # to not find them
24919    if test "x$new_path" = x \
24920             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24921             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24922      new_path=`$CYGPATH -u "$path"`
24923    fi
24924    if test "x$new_path" = x; then
24925      # It's still not found. Now this is an unrecoverable error.
24926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24927$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24928      has_space=`$ECHO "$complete" | $GREP " "`
24929      if test "x$has_space" != x; then
24930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24932      fi
24933      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24934    fi
24935  fi
24936
24937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24940  # "foo.exe" is OK but "foo" is an error.
24941  #
24942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24943  # It is also a way to make sure we got the proper file name for the real test later on.
24944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24945  if test "x$test_shortpath" = x; then
24946    # Short path failed, file does not exist as specified.
24947    # Try adding .exe or .cmd
24948    if test -f "${new_path}.exe"; then
24949       input_to_shortpath="${new_path}.exe"
24950    elif test -f "${new_path}.cmd"; then
24951       input_to_shortpath="${new_path}.cmd"
24952    else
24953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24954$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24955      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24956$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24957      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24958    fi
24959  else
24960    input_to_shortpath="$new_path"
24961  fi
24962
24963  # Call helper function which possibly converts this using DOS-style short mode.
24964  # If so, the updated path is stored in $new_path.
24965  new_path="$input_to_shortpath"
24966
24967  input_path="$input_to_shortpath"
24968  # Check if we need to convert this using DOS-style short mode. If the path
24969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24970  # take no chances and rewrite it.
24971  # Note: m4 eats our [], so we need to use [ and ] instead.
24972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24973  if test "x$has_forbidden_chars" != x; then
24974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24978      # Going to short mode and back again did indeed matter. Since short mode is
24979      # case insensitive, let's make it lowercase to improve readability.
24980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24981      # Now convert it back to Unix-stile (cygpath)
24982      input_path=`$CYGPATH -u "$shortmode_path"`
24983      new_path="$input_path"
24984    fi
24985  fi
24986
24987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24988  if test "x$test_cygdrive_prefix" = x; then
24989    # As a simple fix, exclude /usr/bin since it's not a real path.
24990    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24992      # a path prefixed by /cygdrive for fixpath to work.
24993      new_path="$CYGWIN_ROOT_PATH$input_path"
24994    fi
24995  fi
24996
24997  # remove trailing .exe if any
24998  new_path="${new_path/%.exe/}"
24999
25000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25001
25002  # First separate the path from the arguments. This will split at the first
25003  # space.
25004  complete="$AS"
25005  path="${complete%% *}"
25006  tmp="$complete EOL"
25007  arguments="${tmp#* }"
25008
25009  # Input might be given as Windows format, start by converting to
25010  # unix format.
25011  new_path="$path"
25012
25013  windows_path="$new_path"
25014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25015    unix_path=`$CYGPATH -u "$windows_path"`
25016    new_path="$unix_path"
25017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25019    new_path="$unix_path"
25020  fi
25021
25022
25023  # Now try to locate executable using which
25024  new_path=`$WHICH "$new_path" 2> /dev/null`
25025
25026  if test "x$new_path" = x; then
25027    # Oops. Which didn't find the executable.
25028    # The splitting of arguments from the executable at a space might have been incorrect,
25029    # since paths with space are more likely in Windows. Give it another try with the whole
25030    # argument.
25031    path="$complete"
25032    arguments="EOL"
25033    new_path="$path"
25034
25035  windows_path="$new_path"
25036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25037    unix_path=`$CYGPATH -u "$windows_path"`
25038    new_path="$unix_path"
25039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25041    new_path="$unix_path"
25042  fi
25043
25044
25045    new_path=`$WHICH "$new_path" 2> /dev/null`
25046
25047    if test "x$new_path" = x; then
25048      # It's still not found. Now this is an unrecoverable error.
25049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25050$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25051      has_space=`$ECHO "$complete" | $GREP " "`
25052      if test "x$has_space" != x; then
25053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25055      fi
25056      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25057    fi
25058  fi
25059
25060  # Now new_path has a complete unix path to the binary
25061  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25062    # Keep paths in /bin as-is, but remove trailing .exe if any
25063    new_path="${new_path/%.exe/}"
25064    # Do not save /bin paths to all_fixpath_prefixes!
25065  else
25066    # Not in mixed or Windows style, start by that.
25067    new_path=`cmd //c echo $new_path`
25068
25069  input_path="$new_path"
25070  # Check if we need to convert this using DOS-style short mode. If the path
25071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25072  # take no chances and rewrite it.
25073  # Note: m4 eats our [], so we need to use [ and ] instead.
25074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25075  if test "x$has_forbidden_chars" != x; then
25076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25078  fi
25079
25080    # Output is in $new_path
25081
25082  windows_path="$new_path"
25083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25084    unix_path=`$CYGPATH -u "$windows_path"`
25085    new_path="$unix_path"
25086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25088    new_path="$unix_path"
25089  fi
25090
25091    # remove trailing .exe if any
25092    new_path="${new_path/%.exe/}"
25093
25094    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25095    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25096  fi
25097
25098  else
25099    # We're on a posix platform. Hooray! :)
25100    # First separate the path from the arguments. This will split at the first
25101    # space.
25102    complete="$AS"
25103    path="${complete%% *}"
25104    tmp="$complete EOL"
25105    arguments="${tmp#* }"
25106
25107    # Cannot rely on the command "which" here since it doesn't always work.
25108    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25109    if test -z "$is_absolute_path"; then
25110      # Path to executable is not absolute. Find it.
25111      IFS_save="$IFS"
25112      IFS=:
25113      for p in $PATH; do
25114        if test -f "$p/$path" && test -x "$p/$path"; then
25115          new_path="$p/$path"
25116          break
25117        fi
25118      done
25119      IFS="$IFS_save"
25120    else
25121      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25122$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25123      new_path="$path"
25124    fi
25125
25126    if test "x$new_path" = x; then
25127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25128$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25129        has_space=`$ECHO "$complete" | $GREP " "`
25130        if test "x$has_space" != x; then
25131          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25132$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25133        fi
25134        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25135      fi
25136  fi
25137
25138      # Now join together the path and the arguments once again
25139      if test "x$arguments" != xEOL; then
25140        new_complete="$new_path ${arguments% *}"
25141      else
25142        new_complete="$new_path"
25143      fi
25144
25145  if test "x$complete" != "x$new_complete"; then
25146      AS="$new_complete"
25147      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25148$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25149    fi
25150
25151else
25152    AS="$CC -c"
25153fi
25154
25155
25156if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25157    for ac_prog in gnm nm
25158do
25159  # Extract the first word of "$ac_prog", so it can be a program name with args.
25160set dummy $ac_prog; ac_word=$2
25161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25162$as_echo_n "checking for $ac_word... " >&6; }
25163if test "${ac_cv_path_NM+set}" = set; then :
25164  $as_echo_n "(cached) " >&6
25165else
25166  case $NM in
25167  [\\/]* | ?:[\\/]*)
25168  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25169  ;;
25170  *)
25171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25172for as_dir in $PATH
25173do
25174  IFS=$as_save_IFS
25175  test -z "$as_dir" && as_dir=.
25176    for ac_exec_ext in '' $ac_executable_extensions; do
25177  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25178    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25180    break 2
25181  fi
25182done
25183  done
25184IFS=$as_save_IFS
25185
25186  ;;
25187esac
25188fi
25189NM=$ac_cv_path_NM
25190if test -n "$NM"; then
25191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25192$as_echo "$NM" >&6; }
25193else
25194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25195$as_echo "no" >&6; }
25196fi
25197
25198
25199  test -n "$NM" && break
25200done
25201
25202
25203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25204
25205  # First separate the path from the arguments. This will split at the first
25206  # space.
25207  complete="$NM"
25208  path="${complete%% *}"
25209  tmp="$complete EOL"
25210  arguments="${tmp#* }"
25211
25212  # Input might be given as Windows format, start by converting to
25213  # unix format.
25214  new_path=`$CYGPATH -u "$path"`
25215
25216  # Now try to locate executable using which
25217  new_path=`$WHICH "$new_path" 2> /dev/null`
25218  # bat and cmd files are not always considered executable in cygwin causing which
25219  # to not find them
25220  if test "x$new_path" = x \
25221           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25222           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25223    new_path=`$CYGPATH -u "$path"`
25224  fi
25225  if test "x$new_path" = x; then
25226    # Oops. Which didn't find the executable.
25227    # The splitting of arguments from the executable at a space might have been incorrect,
25228    # since paths with space are more likely in Windows. Give it another try with the whole
25229    # argument.
25230    path="$complete"
25231    arguments="EOL"
25232    new_path=`$CYGPATH -u "$path"`
25233    new_path=`$WHICH "$new_path" 2> /dev/null`
25234    # bat and cmd files are not always considered executable in cygwin causing which
25235    # to not find them
25236    if test "x$new_path" = x \
25237             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25238             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25239      new_path=`$CYGPATH -u "$path"`
25240    fi
25241    if test "x$new_path" = x; then
25242      # It's still not found. Now this is an unrecoverable error.
25243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25244$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25245      has_space=`$ECHO "$complete" | $GREP " "`
25246      if test "x$has_space" != x; then
25247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25249      fi
25250      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25251    fi
25252  fi
25253
25254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25257  # "foo.exe" is OK but "foo" is an error.
25258  #
25259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25260  # It is also a way to make sure we got the proper file name for the real test later on.
25261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25262  if test "x$test_shortpath" = x; then
25263    # Short path failed, file does not exist as specified.
25264    # Try adding .exe or .cmd
25265    if test -f "${new_path}.exe"; then
25266       input_to_shortpath="${new_path}.exe"
25267    elif test -f "${new_path}.cmd"; then
25268       input_to_shortpath="${new_path}.cmd"
25269    else
25270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25271$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25272      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25273$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25274      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25275    fi
25276  else
25277    input_to_shortpath="$new_path"
25278  fi
25279
25280  # Call helper function which possibly converts this using DOS-style short mode.
25281  # If so, the updated path is stored in $new_path.
25282  new_path="$input_to_shortpath"
25283
25284  input_path="$input_to_shortpath"
25285  # Check if we need to convert this using DOS-style short mode. If the path
25286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25287  # take no chances and rewrite it.
25288  # Note: m4 eats our [], so we need to use [ and ] instead.
25289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25290  if test "x$has_forbidden_chars" != x; then
25291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25295      # Going to short mode and back again did indeed matter. Since short mode is
25296      # case insensitive, let's make it lowercase to improve readability.
25297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25298      # Now convert it back to Unix-stile (cygpath)
25299      input_path=`$CYGPATH -u "$shortmode_path"`
25300      new_path="$input_path"
25301    fi
25302  fi
25303
25304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25305  if test "x$test_cygdrive_prefix" = x; then
25306    # As a simple fix, exclude /usr/bin since it's not a real path.
25307    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25309      # a path prefixed by /cygdrive for fixpath to work.
25310      new_path="$CYGWIN_ROOT_PATH$input_path"
25311    fi
25312  fi
25313
25314  # remove trailing .exe if any
25315  new_path="${new_path/%.exe/}"
25316
25317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25318
25319  # First separate the path from the arguments. This will split at the first
25320  # space.
25321  complete="$NM"
25322  path="${complete%% *}"
25323  tmp="$complete EOL"
25324  arguments="${tmp#* }"
25325
25326  # Input might be given as Windows format, start by converting to
25327  # unix format.
25328  new_path="$path"
25329
25330  windows_path="$new_path"
25331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25332    unix_path=`$CYGPATH -u "$windows_path"`
25333    new_path="$unix_path"
25334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25336    new_path="$unix_path"
25337  fi
25338
25339
25340  # Now try to locate executable using which
25341  new_path=`$WHICH "$new_path" 2> /dev/null`
25342
25343  if test "x$new_path" = x; then
25344    # Oops. Which didn't find the executable.
25345    # The splitting of arguments from the executable at a space might have been incorrect,
25346    # since paths with space are more likely in Windows. Give it another try with the whole
25347    # argument.
25348    path="$complete"
25349    arguments="EOL"
25350    new_path="$path"
25351
25352  windows_path="$new_path"
25353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25354    unix_path=`$CYGPATH -u "$windows_path"`
25355    new_path="$unix_path"
25356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25358    new_path="$unix_path"
25359  fi
25360
25361
25362    new_path=`$WHICH "$new_path" 2> /dev/null`
25363
25364    if test "x$new_path" = x; then
25365      # It's still not found. Now this is an unrecoverable error.
25366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25367$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25368      has_space=`$ECHO "$complete" | $GREP " "`
25369      if test "x$has_space" != x; then
25370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25372      fi
25373      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25374    fi
25375  fi
25376
25377  # Now new_path has a complete unix path to the binary
25378  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25379    # Keep paths in /bin as-is, but remove trailing .exe if any
25380    new_path="${new_path/%.exe/}"
25381    # Do not save /bin paths to all_fixpath_prefixes!
25382  else
25383    # Not in mixed or Windows style, start by that.
25384    new_path=`cmd //c echo $new_path`
25385
25386  input_path="$new_path"
25387  # Check if we need to convert this using DOS-style short mode. If the path
25388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25389  # take no chances and rewrite it.
25390  # Note: m4 eats our [], so we need to use [ and ] instead.
25391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25392  if test "x$has_forbidden_chars" != x; then
25393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25395  fi
25396
25397    # Output is in $new_path
25398
25399  windows_path="$new_path"
25400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25401    unix_path=`$CYGPATH -u "$windows_path"`
25402    new_path="$unix_path"
25403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25405    new_path="$unix_path"
25406  fi
25407
25408    # remove trailing .exe if any
25409    new_path="${new_path/%.exe/}"
25410
25411    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25412    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25413  fi
25414
25415  else
25416    # We're on a posix platform. Hooray! :)
25417    # First separate the path from the arguments. This will split at the first
25418    # space.
25419    complete="$NM"
25420    path="${complete%% *}"
25421    tmp="$complete EOL"
25422    arguments="${tmp#* }"
25423
25424    # Cannot rely on the command "which" here since it doesn't always work.
25425    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25426    if test -z "$is_absolute_path"; then
25427      # Path to executable is not absolute. Find it.
25428      IFS_save="$IFS"
25429      IFS=:
25430      for p in $PATH; do
25431        if test -f "$p/$path" && test -x "$p/$path"; then
25432          new_path="$p/$path"
25433          break
25434        fi
25435      done
25436      IFS="$IFS_save"
25437    else
25438      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25439$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25440      new_path="$path"
25441    fi
25442
25443    if test "x$new_path" = x; then
25444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25445$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25446        has_space=`$ECHO "$complete" | $GREP " "`
25447        if test "x$has_space" != x; then
25448          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25450        fi
25451        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25452      fi
25453  fi
25454
25455      # Now join together the path and the arguments once again
25456      if test "x$arguments" != xEOL; then
25457        new_complete="$new_path ${arguments% *}"
25458      else
25459        new_complete="$new_path"
25460      fi
25461
25462  if test "x$complete" != "x$new_complete"; then
25463      NM="$new_complete"
25464      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25465$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25466    fi
25467
25468    # Extract the first word of "strip", so it can be a program name with args.
25469set dummy strip; ac_word=$2
25470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25471$as_echo_n "checking for $ac_word... " >&6; }
25472if test "${ac_cv_path_STRIP+set}" = set; then :
25473  $as_echo_n "(cached) " >&6
25474else
25475  case $STRIP in
25476  [\\/]* | ?:[\\/]*)
25477  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25478  ;;
25479  *)
25480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25481for as_dir in $PATH
25482do
25483  IFS=$as_save_IFS
25484  test -z "$as_dir" && as_dir=.
25485    for ac_exec_ext in '' $ac_executable_extensions; do
25486  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25487    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25489    break 2
25490  fi
25491done
25492  done
25493IFS=$as_save_IFS
25494
25495  ;;
25496esac
25497fi
25498STRIP=$ac_cv_path_STRIP
25499if test -n "$STRIP"; then
25500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25501$as_echo "$STRIP" >&6; }
25502else
25503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25504$as_echo "no" >&6; }
25505fi
25506
25507
25508
25509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25510
25511  # First separate the path from the arguments. This will split at the first
25512  # space.
25513  complete="$STRIP"
25514  path="${complete%% *}"
25515  tmp="$complete EOL"
25516  arguments="${tmp#* }"
25517
25518  # Input might be given as Windows format, start by converting to
25519  # unix format.
25520  new_path=`$CYGPATH -u "$path"`
25521
25522  # Now try to locate executable using which
25523  new_path=`$WHICH "$new_path" 2> /dev/null`
25524  # bat and cmd files are not always considered executable in cygwin causing which
25525  # to not find them
25526  if test "x$new_path" = x \
25527           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25528           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25529    new_path=`$CYGPATH -u "$path"`
25530  fi
25531  if test "x$new_path" = x; then
25532    # Oops. Which didn't find the executable.
25533    # The splitting of arguments from the executable at a space might have been incorrect,
25534    # since paths with space are more likely in Windows. Give it another try with the whole
25535    # argument.
25536    path="$complete"
25537    arguments="EOL"
25538    new_path=`$CYGPATH -u "$path"`
25539    new_path=`$WHICH "$new_path" 2> /dev/null`
25540    # bat and cmd files are not always considered executable in cygwin causing which
25541    # to not find them
25542    if test "x$new_path" = x \
25543             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25544             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25545      new_path=`$CYGPATH -u "$path"`
25546    fi
25547    if test "x$new_path" = x; then
25548      # It's still not found. Now this is an unrecoverable error.
25549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25550$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25551      has_space=`$ECHO "$complete" | $GREP " "`
25552      if test "x$has_space" != x; then
25553        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25554$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25555      fi
25556      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25557    fi
25558  fi
25559
25560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25563  # "foo.exe" is OK but "foo" is an error.
25564  #
25565  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25566  # It is also a way to make sure we got the proper file name for the real test later on.
25567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25568  if test "x$test_shortpath" = x; then
25569    # Short path failed, file does not exist as specified.
25570    # Try adding .exe or .cmd
25571    if test -f "${new_path}.exe"; then
25572       input_to_shortpath="${new_path}.exe"
25573    elif test -f "${new_path}.cmd"; then
25574       input_to_shortpath="${new_path}.cmd"
25575    else
25576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25577$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25578      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25579$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25580      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25581    fi
25582  else
25583    input_to_shortpath="$new_path"
25584  fi
25585
25586  # Call helper function which possibly converts this using DOS-style short mode.
25587  # If so, the updated path is stored in $new_path.
25588  new_path="$input_to_shortpath"
25589
25590  input_path="$input_to_shortpath"
25591  # Check if we need to convert this using DOS-style short mode. If the path
25592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25593  # take no chances and rewrite it.
25594  # Note: m4 eats our [], so we need to use [ and ] instead.
25595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25596  if test "x$has_forbidden_chars" != x; then
25597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25601      # Going to short mode and back again did indeed matter. Since short mode is
25602      # case insensitive, let's make it lowercase to improve readability.
25603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25604      # Now convert it back to Unix-stile (cygpath)
25605      input_path=`$CYGPATH -u "$shortmode_path"`
25606      new_path="$input_path"
25607    fi
25608  fi
25609
25610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25611  if test "x$test_cygdrive_prefix" = x; then
25612    # As a simple fix, exclude /usr/bin since it's not a real path.
25613    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25615      # a path prefixed by /cygdrive for fixpath to work.
25616      new_path="$CYGWIN_ROOT_PATH$input_path"
25617    fi
25618  fi
25619
25620  # remove trailing .exe if any
25621  new_path="${new_path/%.exe/}"
25622
25623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25624
25625  # First separate the path from the arguments. This will split at the first
25626  # space.
25627  complete="$STRIP"
25628  path="${complete%% *}"
25629  tmp="$complete EOL"
25630  arguments="${tmp#* }"
25631
25632  # Input might be given as Windows format, start by converting to
25633  # unix format.
25634  new_path="$path"
25635
25636  windows_path="$new_path"
25637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25638    unix_path=`$CYGPATH -u "$windows_path"`
25639    new_path="$unix_path"
25640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25642    new_path="$unix_path"
25643  fi
25644
25645
25646  # Now try to locate executable using which
25647  new_path=`$WHICH "$new_path" 2> /dev/null`
25648
25649  if test "x$new_path" = x; then
25650    # Oops. Which didn't find the executable.
25651    # The splitting of arguments from the executable at a space might have been incorrect,
25652    # since paths with space are more likely in Windows. Give it another try with the whole
25653    # argument.
25654    path="$complete"
25655    arguments="EOL"
25656    new_path="$path"
25657
25658  windows_path="$new_path"
25659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25660    unix_path=`$CYGPATH -u "$windows_path"`
25661    new_path="$unix_path"
25662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25664    new_path="$unix_path"
25665  fi
25666
25667
25668    new_path=`$WHICH "$new_path" 2> /dev/null`
25669
25670    if test "x$new_path" = x; then
25671      # It's still not found. Now this is an unrecoverable error.
25672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25673$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25674      has_space=`$ECHO "$complete" | $GREP " "`
25675      if test "x$has_space" != x; then
25676        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25677$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25678      fi
25679      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25680    fi
25681  fi
25682
25683  # Now new_path has a complete unix path to the binary
25684  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25685    # Keep paths in /bin as-is, but remove trailing .exe if any
25686    new_path="${new_path/%.exe/}"
25687    # Do not save /bin paths to all_fixpath_prefixes!
25688  else
25689    # Not in mixed or Windows style, start by that.
25690    new_path=`cmd //c echo $new_path`
25691
25692  input_path="$new_path"
25693  # Check if we need to convert this using DOS-style short mode. If the path
25694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25695  # take no chances and rewrite it.
25696  # Note: m4 eats our [], so we need to use [ and ] instead.
25697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25698  if test "x$has_forbidden_chars" != x; then
25699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25701  fi
25702
25703    # Output is in $new_path
25704
25705  windows_path="$new_path"
25706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25707    unix_path=`$CYGPATH -u "$windows_path"`
25708    new_path="$unix_path"
25709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25711    new_path="$unix_path"
25712  fi
25713
25714    # remove trailing .exe if any
25715    new_path="${new_path/%.exe/}"
25716
25717    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25718    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25719  fi
25720
25721  else
25722    # We're on a posix platform. Hooray! :)
25723    # First separate the path from the arguments. This will split at the first
25724    # space.
25725    complete="$STRIP"
25726    path="${complete%% *}"
25727    tmp="$complete EOL"
25728    arguments="${tmp#* }"
25729
25730    # Cannot rely on the command "which" here since it doesn't always work.
25731    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25732    if test -z "$is_absolute_path"; then
25733      # Path to executable is not absolute. Find it.
25734      IFS_save="$IFS"
25735      IFS=:
25736      for p in $PATH; do
25737        if test -f "$p/$path" && test -x "$p/$path"; then
25738          new_path="$p/$path"
25739          break
25740        fi
25741      done
25742      IFS="$IFS_save"
25743    else
25744      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25745$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25746      new_path="$path"
25747    fi
25748
25749    if test "x$new_path" = x; then
25750        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25751$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25752        has_space=`$ECHO "$complete" | $GREP " "`
25753        if test "x$has_space" != x; then
25754          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25755$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25756        fi
25757        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25758      fi
25759  fi
25760
25761      # Now join together the path and the arguments once again
25762      if test "x$arguments" != xEOL; then
25763        new_complete="$new_path ${arguments% *}"
25764      else
25765        new_complete="$new_path"
25766      fi
25767
25768  if test "x$complete" != "x$new_complete"; then
25769      STRIP="$new_complete"
25770      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25771$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25772    fi
25773
25774    # Extract the first word of "mcs", so it can be a program name with args.
25775set dummy mcs; ac_word=$2
25776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25777$as_echo_n "checking for $ac_word... " >&6; }
25778if test "${ac_cv_path_MCS+set}" = set; then :
25779  $as_echo_n "(cached) " >&6
25780else
25781  case $MCS in
25782  [\\/]* | ?:[\\/]*)
25783  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25784  ;;
25785  *)
25786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25787for as_dir in $PATH
25788do
25789  IFS=$as_save_IFS
25790  test -z "$as_dir" && as_dir=.
25791    for ac_exec_ext in '' $ac_executable_extensions; do
25792  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25793    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25795    break 2
25796  fi
25797done
25798  done
25799IFS=$as_save_IFS
25800
25801  ;;
25802esac
25803fi
25804MCS=$ac_cv_path_MCS
25805if test -n "$MCS"; then
25806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25807$as_echo "$MCS" >&6; }
25808else
25809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25810$as_echo "no" >&6; }
25811fi
25812
25813
25814
25815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25816
25817  # First separate the path from the arguments. This will split at the first
25818  # space.
25819  complete="$MCS"
25820  path="${complete%% *}"
25821  tmp="$complete EOL"
25822  arguments="${tmp#* }"
25823
25824  # Input might be given as Windows format, start by converting to
25825  # unix format.
25826  new_path=`$CYGPATH -u "$path"`
25827
25828  # Now try to locate executable using which
25829  new_path=`$WHICH "$new_path" 2> /dev/null`
25830  # bat and cmd files are not always considered executable in cygwin causing which
25831  # to not find them
25832  if test "x$new_path" = x \
25833           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25834           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25835    new_path=`$CYGPATH -u "$path"`
25836  fi
25837  if test "x$new_path" = x; then
25838    # Oops. Which didn't find the executable.
25839    # The splitting of arguments from the executable at a space might have been incorrect,
25840    # since paths with space are more likely in Windows. Give it another try with the whole
25841    # argument.
25842    path="$complete"
25843    arguments="EOL"
25844    new_path=`$CYGPATH -u "$path"`
25845    new_path=`$WHICH "$new_path" 2> /dev/null`
25846    # bat and cmd files are not always considered executable in cygwin causing which
25847    # to not find them
25848    if test "x$new_path" = x \
25849             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25850             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25851      new_path=`$CYGPATH -u "$path"`
25852    fi
25853    if test "x$new_path" = x; then
25854      # It's still not found. Now this is an unrecoverable error.
25855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25856$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25857      has_space=`$ECHO "$complete" | $GREP " "`
25858      if test "x$has_space" != x; then
25859        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25860$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25861      fi
25862      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25863    fi
25864  fi
25865
25866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25869  # "foo.exe" is OK but "foo" is an error.
25870  #
25871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25872  # It is also a way to make sure we got the proper file name for the real test later on.
25873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25874  if test "x$test_shortpath" = x; then
25875    # Short path failed, file does not exist as specified.
25876    # Try adding .exe or .cmd
25877    if test -f "${new_path}.exe"; then
25878       input_to_shortpath="${new_path}.exe"
25879    elif test -f "${new_path}.cmd"; then
25880       input_to_shortpath="${new_path}.cmd"
25881    else
25882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25883$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25884      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25885$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25886      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25887    fi
25888  else
25889    input_to_shortpath="$new_path"
25890  fi
25891
25892  # Call helper function which possibly converts this using DOS-style short mode.
25893  # If so, the updated path is stored in $new_path.
25894  new_path="$input_to_shortpath"
25895
25896  input_path="$input_to_shortpath"
25897  # Check if we need to convert this using DOS-style short mode. If the path
25898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25899  # take no chances and rewrite it.
25900  # Note: m4 eats our [], so we need to use [ and ] instead.
25901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25902  if test "x$has_forbidden_chars" != x; then
25903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25904    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25905    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25906    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25907      # Going to short mode and back again did indeed matter. Since short mode is
25908      # case insensitive, let's make it lowercase to improve readability.
25909      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25910      # Now convert it back to Unix-stile (cygpath)
25911      input_path=`$CYGPATH -u "$shortmode_path"`
25912      new_path="$input_path"
25913    fi
25914  fi
25915
25916  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25917  if test "x$test_cygdrive_prefix" = x; then
25918    # As a simple fix, exclude /usr/bin since it's not a real path.
25919    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25920      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25921      # a path prefixed by /cygdrive for fixpath to work.
25922      new_path="$CYGWIN_ROOT_PATH$input_path"
25923    fi
25924  fi
25925
25926  # remove trailing .exe if any
25927  new_path="${new_path/%.exe/}"
25928
25929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25930
25931  # First separate the path from the arguments. This will split at the first
25932  # space.
25933  complete="$MCS"
25934  path="${complete%% *}"
25935  tmp="$complete EOL"
25936  arguments="${tmp#* }"
25937
25938  # Input might be given as Windows format, start by converting to
25939  # unix format.
25940  new_path="$path"
25941
25942  windows_path="$new_path"
25943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25944    unix_path=`$CYGPATH -u "$windows_path"`
25945    new_path="$unix_path"
25946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25948    new_path="$unix_path"
25949  fi
25950
25951
25952  # Now try to locate executable using which
25953  new_path=`$WHICH "$new_path" 2> /dev/null`
25954
25955  if test "x$new_path" = x; then
25956    # Oops. Which didn't find the executable.
25957    # The splitting of arguments from the executable at a space might have been incorrect,
25958    # since paths with space are more likely in Windows. Give it another try with the whole
25959    # argument.
25960    path="$complete"
25961    arguments="EOL"
25962    new_path="$path"
25963
25964  windows_path="$new_path"
25965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25966    unix_path=`$CYGPATH -u "$windows_path"`
25967    new_path="$unix_path"
25968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25970    new_path="$unix_path"
25971  fi
25972
25973
25974    new_path=`$WHICH "$new_path" 2> /dev/null`
25975
25976    if test "x$new_path" = x; then
25977      # It's still not found. Now this is an unrecoverable error.
25978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25979$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25980      has_space=`$ECHO "$complete" | $GREP " "`
25981      if test "x$has_space" != x; then
25982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25984      fi
25985      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25986    fi
25987  fi
25988
25989  # Now new_path has a complete unix path to the binary
25990  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25991    # Keep paths in /bin as-is, but remove trailing .exe if any
25992    new_path="${new_path/%.exe/}"
25993    # Do not save /bin paths to all_fixpath_prefixes!
25994  else
25995    # Not in mixed or Windows style, start by that.
25996    new_path=`cmd //c echo $new_path`
25997
25998  input_path="$new_path"
25999  # Check if we need to convert this using DOS-style short mode. If the path
26000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26001  # take no chances and rewrite it.
26002  # Note: m4 eats our [], so we need to use [ and ] instead.
26003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26004  if test "x$has_forbidden_chars" != x; then
26005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26007  fi
26008
26009    # Output is in $new_path
26010
26011  windows_path="$new_path"
26012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26013    unix_path=`$CYGPATH -u "$windows_path"`
26014    new_path="$unix_path"
26015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26017    new_path="$unix_path"
26018  fi
26019
26020    # remove trailing .exe if any
26021    new_path="${new_path/%.exe/}"
26022
26023    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26024    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26025  fi
26026
26027  else
26028    # We're on a posix platform. Hooray! :)
26029    # First separate the path from the arguments. This will split at the first
26030    # space.
26031    complete="$MCS"
26032    path="${complete%% *}"
26033    tmp="$complete EOL"
26034    arguments="${tmp#* }"
26035
26036    # Cannot rely on the command "which" here since it doesn't always work.
26037    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26038    if test -z "$is_absolute_path"; then
26039      # Path to executable is not absolute. Find it.
26040      IFS_save="$IFS"
26041      IFS=:
26042      for p in $PATH; do
26043        if test -f "$p/$path" && test -x "$p/$path"; then
26044          new_path="$p/$path"
26045          break
26046        fi
26047      done
26048      IFS="$IFS_save"
26049    else
26050      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26051$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26052      new_path="$path"
26053    fi
26054
26055    if test "x$new_path" = x; then
26056        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26057$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26058        has_space=`$ECHO "$complete" | $GREP " "`
26059        if test "x$has_space" != x; then
26060          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26061$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26062        fi
26063        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26064      fi
26065  fi
26066
26067      # Now join together the path and the arguments once again
26068      if test "x$arguments" != xEOL; then
26069        new_complete="$new_path ${arguments% *}"
26070      else
26071        new_complete="$new_path"
26072      fi
26073
26074  if test "x$complete" != "x$new_complete"; then
26075      MCS="$new_complete"
26076      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26077$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26078    fi
26079
26080elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26081    if test -n "$ac_tool_prefix"; then
26082  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26083set dummy ${ac_tool_prefix}nm; ac_word=$2
26084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26085$as_echo_n "checking for $ac_word... " >&6; }
26086if test "${ac_cv_prog_NM+set}" = set; then :
26087  $as_echo_n "(cached) " >&6
26088else
26089  if test -n "$NM"; then
26090  ac_cv_prog_NM="$NM" # Let the user override the test.
26091else
26092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26093for as_dir in $PATH
26094do
26095  IFS=$as_save_IFS
26096  test -z "$as_dir" && as_dir=.
26097    for ac_exec_ext in '' $ac_executable_extensions; do
26098  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26099    ac_cv_prog_NM="${ac_tool_prefix}nm"
26100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26101    break 2
26102  fi
26103done
26104  done
26105IFS=$as_save_IFS
26106
26107fi
26108fi
26109NM=$ac_cv_prog_NM
26110if test -n "$NM"; then
26111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26112$as_echo "$NM" >&6; }
26113else
26114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26115$as_echo "no" >&6; }
26116fi
26117
26118
26119fi
26120if test -z "$ac_cv_prog_NM"; then
26121  ac_ct_NM=$NM
26122  # Extract the first word of "nm", so it can be a program name with args.
26123set dummy nm; ac_word=$2
26124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26125$as_echo_n "checking for $ac_word... " >&6; }
26126if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26127  $as_echo_n "(cached) " >&6
26128else
26129  if test -n "$ac_ct_NM"; then
26130  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26131else
26132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26133for as_dir in $PATH
26134do
26135  IFS=$as_save_IFS
26136  test -z "$as_dir" && as_dir=.
26137    for ac_exec_ext in '' $ac_executable_extensions; do
26138  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26139    ac_cv_prog_ac_ct_NM="nm"
26140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26141    break 2
26142  fi
26143done
26144  done
26145IFS=$as_save_IFS
26146
26147fi
26148fi
26149ac_ct_NM=$ac_cv_prog_ac_ct_NM
26150if test -n "$ac_ct_NM"; then
26151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26152$as_echo "$ac_ct_NM" >&6; }
26153else
26154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26155$as_echo "no" >&6; }
26156fi
26157
26158  if test "x$ac_ct_NM" = x; then
26159    NM=""
26160  else
26161    case $cross_compiling:$ac_tool_warned in
26162yes:)
26163{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26164$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26165ac_tool_warned=yes ;;
26166esac
26167    NM=$ac_ct_NM
26168  fi
26169else
26170  NM="$ac_cv_prog_NM"
26171fi
26172
26173
26174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26175
26176  # First separate the path from the arguments. This will split at the first
26177  # space.
26178  complete="$NM"
26179  path="${complete%% *}"
26180  tmp="$complete EOL"
26181  arguments="${tmp#* }"
26182
26183  # Input might be given as Windows format, start by converting to
26184  # unix format.
26185  new_path=`$CYGPATH -u "$path"`
26186
26187  # Now try to locate executable using which
26188  new_path=`$WHICH "$new_path" 2> /dev/null`
26189  # bat and cmd files are not always considered executable in cygwin causing which
26190  # to not find them
26191  if test "x$new_path" = x \
26192           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26193           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26194    new_path=`$CYGPATH -u "$path"`
26195  fi
26196  if test "x$new_path" = x; then
26197    # Oops. Which didn't find the executable.
26198    # The splitting of arguments from the executable at a space might have been incorrect,
26199    # since paths with space are more likely in Windows. Give it another try with the whole
26200    # argument.
26201    path="$complete"
26202    arguments="EOL"
26203    new_path=`$CYGPATH -u "$path"`
26204    new_path=`$WHICH "$new_path" 2> /dev/null`
26205    # bat and cmd files are not always considered executable in cygwin causing which
26206    # to not find them
26207    if test "x$new_path" = x \
26208             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26209             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26210      new_path=`$CYGPATH -u "$path"`
26211    fi
26212    if test "x$new_path" = x; then
26213      # It's still not found. Now this is an unrecoverable error.
26214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26215$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26216      has_space=`$ECHO "$complete" | $GREP " "`
26217      if test "x$has_space" != x; then
26218        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26219$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26220      fi
26221      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26222    fi
26223  fi
26224
26225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26228  # "foo.exe" is OK but "foo" is an error.
26229  #
26230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26231  # It is also a way to make sure we got the proper file name for the real test later on.
26232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26233  if test "x$test_shortpath" = x; then
26234    # Short path failed, file does not exist as specified.
26235    # Try adding .exe or .cmd
26236    if test -f "${new_path}.exe"; then
26237       input_to_shortpath="${new_path}.exe"
26238    elif test -f "${new_path}.cmd"; then
26239       input_to_shortpath="${new_path}.cmd"
26240    else
26241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26242$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26243      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26244$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26245      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26246    fi
26247  else
26248    input_to_shortpath="$new_path"
26249  fi
26250
26251  # Call helper function which possibly converts this using DOS-style short mode.
26252  # If so, the updated path is stored in $new_path.
26253  new_path="$input_to_shortpath"
26254
26255  input_path="$input_to_shortpath"
26256  # Check if we need to convert this using DOS-style short mode. If the path
26257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26258  # take no chances and rewrite it.
26259  # Note: m4 eats our [], so we need to use [ and ] instead.
26260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26261  if test "x$has_forbidden_chars" != x; then
26262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26266      # Going to short mode and back again did indeed matter. Since short mode is
26267      # case insensitive, let's make it lowercase to improve readability.
26268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26269      # Now convert it back to Unix-stile (cygpath)
26270      input_path=`$CYGPATH -u "$shortmode_path"`
26271      new_path="$input_path"
26272    fi
26273  fi
26274
26275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26276  if test "x$test_cygdrive_prefix" = x; then
26277    # As a simple fix, exclude /usr/bin since it's not a real path.
26278    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26280      # a path prefixed by /cygdrive for fixpath to work.
26281      new_path="$CYGWIN_ROOT_PATH$input_path"
26282    fi
26283  fi
26284
26285  # remove trailing .exe if any
26286  new_path="${new_path/%.exe/}"
26287
26288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26289
26290  # First separate the path from the arguments. This will split at the first
26291  # space.
26292  complete="$NM"
26293  path="${complete%% *}"
26294  tmp="$complete EOL"
26295  arguments="${tmp#* }"
26296
26297  # Input might be given as Windows format, start by converting to
26298  # unix format.
26299  new_path="$path"
26300
26301  windows_path="$new_path"
26302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26303    unix_path=`$CYGPATH -u "$windows_path"`
26304    new_path="$unix_path"
26305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26307    new_path="$unix_path"
26308  fi
26309
26310
26311  # Now try to locate executable using which
26312  new_path=`$WHICH "$new_path" 2> /dev/null`
26313
26314  if test "x$new_path" = x; then
26315    # Oops. Which didn't find the executable.
26316    # The splitting of arguments from the executable at a space might have been incorrect,
26317    # since paths with space are more likely in Windows. Give it another try with the whole
26318    # argument.
26319    path="$complete"
26320    arguments="EOL"
26321    new_path="$path"
26322
26323  windows_path="$new_path"
26324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26325    unix_path=`$CYGPATH -u "$windows_path"`
26326    new_path="$unix_path"
26327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26329    new_path="$unix_path"
26330  fi
26331
26332
26333    new_path=`$WHICH "$new_path" 2> /dev/null`
26334
26335    if test "x$new_path" = x; then
26336      # It's still not found. Now this is an unrecoverable error.
26337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26338$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26339      has_space=`$ECHO "$complete" | $GREP " "`
26340      if test "x$has_space" != x; then
26341        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26342$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26343      fi
26344      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26345    fi
26346  fi
26347
26348  # Now new_path has a complete unix path to the binary
26349  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26350    # Keep paths in /bin as-is, but remove trailing .exe if any
26351    new_path="${new_path/%.exe/}"
26352    # Do not save /bin paths to all_fixpath_prefixes!
26353  else
26354    # Not in mixed or Windows style, start by that.
26355    new_path=`cmd //c echo $new_path`
26356
26357  input_path="$new_path"
26358  # Check if we need to convert this using DOS-style short mode. If the path
26359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26360  # take no chances and rewrite it.
26361  # Note: m4 eats our [], so we need to use [ and ] instead.
26362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26363  if test "x$has_forbidden_chars" != x; then
26364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26365    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26366  fi
26367
26368    # Output is in $new_path
26369
26370  windows_path="$new_path"
26371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26372    unix_path=`$CYGPATH -u "$windows_path"`
26373    new_path="$unix_path"
26374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26376    new_path="$unix_path"
26377  fi
26378
26379    # remove trailing .exe if any
26380    new_path="${new_path/%.exe/}"
26381
26382    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26383    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26384  fi
26385
26386  else
26387    # We're on a posix platform. Hooray! :)
26388    # First separate the path from the arguments. This will split at the first
26389    # space.
26390    complete="$NM"
26391    path="${complete%% *}"
26392    tmp="$complete EOL"
26393    arguments="${tmp#* }"
26394
26395    # Cannot rely on the command "which" here since it doesn't always work.
26396    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26397    if test -z "$is_absolute_path"; then
26398      # Path to executable is not absolute. Find it.
26399      IFS_save="$IFS"
26400      IFS=:
26401      for p in $PATH; do
26402        if test -f "$p/$path" && test -x "$p/$path"; then
26403          new_path="$p/$path"
26404          break
26405        fi
26406      done
26407      IFS="$IFS_save"
26408    else
26409      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26410$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26411      new_path="$path"
26412    fi
26413
26414    if test "x$new_path" = x; then
26415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26416$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26417        has_space=`$ECHO "$complete" | $GREP " "`
26418        if test "x$has_space" != x; then
26419          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26420$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26421        fi
26422        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26423      fi
26424  fi
26425
26426      # Now join together the path and the arguments once again
26427      if test "x$arguments" != xEOL; then
26428        new_complete="$new_path ${arguments% *}"
26429      else
26430        new_complete="$new_path"
26431      fi
26432
26433  if test "x$complete" != "x$new_complete"; then
26434      NM="$new_complete"
26435      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26436$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26437    fi
26438
26439    if test -n "$ac_tool_prefix"; then
26440  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26441set dummy ${ac_tool_prefix}strip; ac_word=$2
26442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26443$as_echo_n "checking for $ac_word... " >&6; }
26444if test "${ac_cv_prog_STRIP+set}" = set; then :
26445  $as_echo_n "(cached) " >&6
26446else
26447  if test -n "$STRIP"; then
26448  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26449else
26450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26451for as_dir in $PATH
26452do
26453  IFS=$as_save_IFS
26454  test -z "$as_dir" && as_dir=.
26455    for ac_exec_ext in '' $ac_executable_extensions; do
26456  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26457    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26459    break 2
26460  fi
26461done
26462  done
26463IFS=$as_save_IFS
26464
26465fi
26466fi
26467STRIP=$ac_cv_prog_STRIP
26468if test -n "$STRIP"; then
26469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26470$as_echo "$STRIP" >&6; }
26471else
26472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26473$as_echo "no" >&6; }
26474fi
26475
26476
26477fi
26478if test -z "$ac_cv_prog_STRIP"; then
26479  ac_ct_STRIP=$STRIP
26480  # Extract the first word of "strip", so it can be a program name with args.
26481set dummy strip; ac_word=$2
26482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26483$as_echo_n "checking for $ac_word... " >&6; }
26484if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
26485  $as_echo_n "(cached) " >&6
26486else
26487  if test -n "$ac_ct_STRIP"; then
26488  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26489else
26490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26491for as_dir in $PATH
26492do
26493  IFS=$as_save_IFS
26494  test -z "$as_dir" && as_dir=.
26495    for ac_exec_ext in '' $ac_executable_extensions; do
26496  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26497    ac_cv_prog_ac_ct_STRIP="strip"
26498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26499    break 2
26500  fi
26501done
26502  done
26503IFS=$as_save_IFS
26504
26505fi
26506fi
26507ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26508if test -n "$ac_ct_STRIP"; then
26509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26510$as_echo "$ac_ct_STRIP" >&6; }
26511else
26512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26513$as_echo "no" >&6; }
26514fi
26515
26516  if test "x$ac_ct_STRIP" = x; then
26517    STRIP=""
26518  else
26519    case $cross_compiling:$ac_tool_warned in
26520yes:)
26521{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26522$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26523ac_tool_warned=yes ;;
26524esac
26525    STRIP=$ac_ct_STRIP
26526  fi
26527else
26528  STRIP="$ac_cv_prog_STRIP"
26529fi
26530
26531
26532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26533
26534  # First separate the path from the arguments. This will split at the first
26535  # space.
26536  complete="$STRIP"
26537  path="${complete%% *}"
26538  tmp="$complete EOL"
26539  arguments="${tmp#* }"
26540
26541  # Input might be given as Windows format, start by converting to
26542  # unix format.
26543  new_path=`$CYGPATH -u "$path"`
26544
26545  # Now try to locate executable using which
26546  new_path=`$WHICH "$new_path" 2> /dev/null`
26547  # bat and cmd files are not always considered executable in cygwin causing which
26548  # to not find them
26549  if test "x$new_path" = x \
26550           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26551           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26552    new_path=`$CYGPATH -u "$path"`
26553  fi
26554  if test "x$new_path" = x; then
26555    # Oops. Which didn't find the executable.
26556    # The splitting of arguments from the executable at a space might have been incorrect,
26557    # since paths with space are more likely in Windows. Give it another try with the whole
26558    # argument.
26559    path="$complete"
26560    arguments="EOL"
26561    new_path=`$CYGPATH -u "$path"`
26562    new_path=`$WHICH "$new_path" 2> /dev/null`
26563    # bat and cmd files are not always considered executable in cygwin causing which
26564    # to not find them
26565    if test "x$new_path" = x \
26566             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26567             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26568      new_path=`$CYGPATH -u "$path"`
26569    fi
26570    if test "x$new_path" = x; then
26571      # It's still not found. Now this is an unrecoverable error.
26572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26573$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26574      has_space=`$ECHO "$complete" | $GREP " "`
26575      if test "x$has_space" != x; then
26576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26578      fi
26579      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26580    fi
26581  fi
26582
26583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26586  # "foo.exe" is OK but "foo" is an error.
26587  #
26588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26589  # It is also a way to make sure we got the proper file name for the real test later on.
26590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26591  if test "x$test_shortpath" = x; then
26592    # Short path failed, file does not exist as specified.
26593    # Try adding .exe or .cmd
26594    if test -f "${new_path}.exe"; then
26595       input_to_shortpath="${new_path}.exe"
26596    elif test -f "${new_path}.cmd"; then
26597       input_to_shortpath="${new_path}.cmd"
26598    else
26599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26600$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26601      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26602$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26603      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26604    fi
26605  else
26606    input_to_shortpath="$new_path"
26607  fi
26608
26609  # Call helper function which possibly converts this using DOS-style short mode.
26610  # If so, the updated path is stored in $new_path.
26611  new_path="$input_to_shortpath"
26612
26613  input_path="$input_to_shortpath"
26614  # Check if we need to convert this using DOS-style short mode. If the path
26615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26616  # take no chances and rewrite it.
26617  # Note: m4 eats our [], so we need to use [ and ] instead.
26618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26619  if test "x$has_forbidden_chars" != x; then
26620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26624      # Going to short mode and back again did indeed matter. Since short mode is
26625      # case insensitive, let's make it lowercase to improve readability.
26626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26627      # Now convert it back to Unix-stile (cygpath)
26628      input_path=`$CYGPATH -u "$shortmode_path"`
26629      new_path="$input_path"
26630    fi
26631  fi
26632
26633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26634  if test "x$test_cygdrive_prefix" = x; then
26635    # As a simple fix, exclude /usr/bin since it's not a real path.
26636    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26638      # a path prefixed by /cygdrive for fixpath to work.
26639      new_path="$CYGWIN_ROOT_PATH$input_path"
26640    fi
26641  fi
26642
26643  # remove trailing .exe if any
26644  new_path="${new_path/%.exe/}"
26645
26646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26647
26648  # First separate the path from the arguments. This will split at the first
26649  # space.
26650  complete="$STRIP"
26651  path="${complete%% *}"
26652  tmp="$complete EOL"
26653  arguments="${tmp#* }"
26654
26655  # Input might be given as Windows format, start by converting to
26656  # unix format.
26657  new_path="$path"
26658
26659  windows_path="$new_path"
26660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26661    unix_path=`$CYGPATH -u "$windows_path"`
26662    new_path="$unix_path"
26663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26665    new_path="$unix_path"
26666  fi
26667
26668
26669  # Now try to locate executable using which
26670  new_path=`$WHICH "$new_path" 2> /dev/null`
26671
26672  if test "x$new_path" = x; then
26673    # Oops. Which didn't find the executable.
26674    # The splitting of arguments from the executable at a space might have been incorrect,
26675    # since paths with space are more likely in Windows. Give it another try with the whole
26676    # argument.
26677    path="$complete"
26678    arguments="EOL"
26679    new_path="$path"
26680
26681  windows_path="$new_path"
26682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26683    unix_path=`$CYGPATH -u "$windows_path"`
26684    new_path="$unix_path"
26685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26687    new_path="$unix_path"
26688  fi
26689
26690
26691    new_path=`$WHICH "$new_path" 2> /dev/null`
26692
26693    if test "x$new_path" = x; then
26694      # It's still not found. Now this is an unrecoverable error.
26695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26696$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26697      has_space=`$ECHO "$complete" | $GREP " "`
26698      if test "x$has_space" != x; then
26699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26701      fi
26702      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26703    fi
26704  fi
26705
26706  # Now new_path has a complete unix path to the binary
26707  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26708    # Keep paths in /bin as-is, but remove trailing .exe if any
26709    new_path="${new_path/%.exe/}"
26710    # Do not save /bin paths to all_fixpath_prefixes!
26711  else
26712    # Not in mixed or Windows style, start by that.
26713    new_path=`cmd //c echo $new_path`
26714
26715  input_path="$new_path"
26716  # Check if we need to convert this using DOS-style short mode. If the path
26717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26718  # take no chances and rewrite it.
26719  # Note: m4 eats our [], so we need to use [ and ] instead.
26720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26721  if test "x$has_forbidden_chars" != x; then
26722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26724  fi
26725
26726    # Output is in $new_path
26727
26728  windows_path="$new_path"
26729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26730    unix_path=`$CYGPATH -u "$windows_path"`
26731    new_path="$unix_path"
26732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26734    new_path="$unix_path"
26735  fi
26736
26737    # remove trailing .exe if any
26738    new_path="${new_path/%.exe/}"
26739
26740    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26741    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26742  fi
26743
26744  else
26745    # We're on a posix platform. Hooray! :)
26746    # First separate the path from the arguments. This will split at the first
26747    # space.
26748    complete="$STRIP"
26749    path="${complete%% *}"
26750    tmp="$complete EOL"
26751    arguments="${tmp#* }"
26752
26753    # Cannot rely on the command "which" here since it doesn't always work.
26754    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26755    if test -z "$is_absolute_path"; then
26756      # Path to executable is not absolute. Find it.
26757      IFS_save="$IFS"
26758      IFS=:
26759      for p in $PATH; do
26760        if test -f "$p/$path" && test -x "$p/$path"; then
26761          new_path="$p/$path"
26762          break
26763        fi
26764      done
26765      IFS="$IFS_save"
26766    else
26767      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26768$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26769      new_path="$path"
26770    fi
26771
26772    if test "x$new_path" = x; then
26773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26774$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26775        has_space=`$ECHO "$complete" | $GREP " "`
26776        if test "x$has_space" != x; then
26777          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26778$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26779        fi
26780        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26781      fi
26782  fi
26783
26784      # Now join together the path and the arguments once again
26785      if test "x$arguments" != xEOL; then
26786        new_complete="$new_path ${arguments% *}"
26787      else
26788        new_complete="$new_path"
26789      fi
26790
26791  if test "x$complete" != "x$new_complete"; then
26792      STRIP="$new_complete"
26793      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26794$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26795    fi
26796
26797fi
26798
26799# objcopy is used for moving debug symbols to separate files when
26800# full debug symbols are enabled.
26801if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26802    if test -n "$ac_tool_prefix"; then
26803  for ac_prog in gobjcopy objcopy
26804  do
26805    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26806set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26808$as_echo_n "checking for $ac_word... " >&6; }
26809if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26810  $as_echo_n "(cached) " >&6
26811else
26812  if test -n "$OBJCOPY"; then
26813  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26814else
26815as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26816for as_dir in $PATH
26817do
26818  IFS=$as_save_IFS
26819  test -z "$as_dir" && as_dir=.
26820    for ac_exec_ext in '' $ac_executable_extensions; do
26821  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26822    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26824    break 2
26825  fi
26826done
26827  done
26828IFS=$as_save_IFS
26829
26830fi
26831fi
26832OBJCOPY=$ac_cv_prog_OBJCOPY
26833if test -n "$OBJCOPY"; then
26834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26835$as_echo "$OBJCOPY" >&6; }
26836else
26837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26838$as_echo "no" >&6; }
26839fi
26840
26841
26842    test -n "$OBJCOPY" && break
26843  done
26844fi
26845if test -z "$OBJCOPY"; then
26846  ac_ct_OBJCOPY=$OBJCOPY
26847  for ac_prog in gobjcopy objcopy
26848do
26849  # Extract the first word of "$ac_prog", so it can be a program name with args.
26850set dummy $ac_prog; ac_word=$2
26851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26852$as_echo_n "checking for $ac_word... " >&6; }
26853if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26854  $as_echo_n "(cached) " >&6
26855else
26856  if test -n "$ac_ct_OBJCOPY"; then
26857  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26858else
26859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26860for as_dir in $PATH
26861do
26862  IFS=$as_save_IFS
26863  test -z "$as_dir" && as_dir=.
26864    for ac_exec_ext in '' $ac_executable_extensions; do
26865  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26866    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26868    break 2
26869  fi
26870done
26871  done
26872IFS=$as_save_IFS
26873
26874fi
26875fi
26876ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26877if test -n "$ac_ct_OBJCOPY"; then
26878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26879$as_echo "$ac_ct_OBJCOPY" >&6; }
26880else
26881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26882$as_echo "no" >&6; }
26883fi
26884
26885
26886  test -n "$ac_ct_OBJCOPY" && break
26887done
26888
26889  if test "x$ac_ct_OBJCOPY" = x; then
26890    OBJCOPY=""
26891  else
26892    case $cross_compiling:$ac_tool_warned in
26893yes:)
26894{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26895$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26896ac_tool_warned=yes ;;
26897esac
26898    OBJCOPY=$ac_ct_OBJCOPY
26899  fi
26900fi
26901
26902    # Only call fixup if objcopy was found.
26903    if test -n "$OBJCOPY"; then
26904
26905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26906
26907  # First separate the path from the arguments. This will split at the first
26908  # space.
26909  complete="$OBJCOPY"
26910  path="${complete%% *}"
26911  tmp="$complete EOL"
26912  arguments="${tmp#* }"
26913
26914  # Input might be given as Windows format, start by converting to
26915  # unix format.
26916  new_path=`$CYGPATH -u "$path"`
26917
26918  # Now try to locate executable using which
26919  new_path=`$WHICH "$new_path" 2> /dev/null`
26920  # bat and cmd files are not always considered executable in cygwin causing which
26921  # to not find them
26922  if test "x$new_path" = x \
26923           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26924           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26925    new_path=`$CYGPATH -u "$path"`
26926  fi
26927  if test "x$new_path" = x; then
26928    # Oops. Which didn't find the executable.
26929    # The splitting of arguments from the executable at a space might have been incorrect,
26930    # since paths with space are more likely in Windows. Give it another try with the whole
26931    # argument.
26932    path="$complete"
26933    arguments="EOL"
26934    new_path=`$CYGPATH -u "$path"`
26935    new_path=`$WHICH "$new_path" 2> /dev/null`
26936    # bat and cmd files are not always considered executable in cygwin causing which
26937    # to not find them
26938    if test "x$new_path" = x \
26939             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26940             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26941      new_path=`$CYGPATH -u "$path"`
26942    fi
26943    if test "x$new_path" = x; then
26944      # It's still not found. Now this is an unrecoverable error.
26945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26946$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26947      has_space=`$ECHO "$complete" | $GREP " "`
26948      if test "x$has_space" != x; then
26949        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26950$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26951      fi
26952      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26953    fi
26954  fi
26955
26956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26959  # "foo.exe" is OK but "foo" is an error.
26960  #
26961  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26962  # It is also a way to make sure we got the proper file name for the real test later on.
26963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26964  if test "x$test_shortpath" = x; then
26965    # Short path failed, file does not exist as specified.
26966    # Try adding .exe or .cmd
26967    if test -f "${new_path}.exe"; then
26968       input_to_shortpath="${new_path}.exe"
26969    elif test -f "${new_path}.cmd"; then
26970       input_to_shortpath="${new_path}.cmd"
26971    else
26972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26973$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26974      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26975$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26976      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26977    fi
26978  else
26979    input_to_shortpath="$new_path"
26980  fi
26981
26982  # Call helper function which possibly converts this using DOS-style short mode.
26983  # If so, the updated path is stored in $new_path.
26984  new_path="$input_to_shortpath"
26985
26986  input_path="$input_to_shortpath"
26987  # Check if we need to convert this using DOS-style short mode. If the path
26988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26989  # take no chances and rewrite it.
26990  # Note: m4 eats our [], so we need to use [ and ] instead.
26991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26992  if test "x$has_forbidden_chars" != x; then
26993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26997      # Going to short mode and back again did indeed matter. Since short mode is
26998      # case insensitive, let's make it lowercase to improve readability.
26999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27000      # Now convert it back to Unix-stile (cygpath)
27001      input_path=`$CYGPATH -u "$shortmode_path"`
27002      new_path="$input_path"
27003    fi
27004  fi
27005
27006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27007  if test "x$test_cygdrive_prefix" = x; then
27008    # As a simple fix, exclude /usr/bin since it's not a real path.
27009    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27011      # a path prefixed by /cygdrive for fixpath to work.
27012      new_path="$CYGWIN_ROOT_PATH$input_path"
27013    fi
27014  fi
27015
27016  # remove trailing .exe if any
27017  new_path="${new_path/%.exe/}"
27018
27019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27020
27021  # First separate the path from the arguments. This will split at the first
27022  # space.
27023  complete="$OBJCOPY"
27024  path="${complete%% *}"
27025  tmp="$complete EOL"
27026  arguments="${tmp#* }"
27027
27028  # Input might be given as Windows format, start by converting to
27029  # unix format.
27030  new_path="$path"
27031
27032  windows_path="$new_path"
27033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27034    unix_path=`$CYGPATH -u "$windows_path"`
27035    new_path="$unix_path"
27036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27038    new_path="$unix_path"
27039  fi
27040
27041
27042  # Now try to locate executable using which
27043  new_path=`$WHICH "$new_path" 2> /dev/null`
27044
27045  if test "x$new_path" = x; then
27046    # Oops. Which didn't find the executable.
27047    # The splitting of arguments from the executable at a space might have been incorrect,
27048    # since paths with space are more likely in Windows. Give it another try with the whole
27049    # argument.
27050    path="$complete"
27051    arguments="EOL"
27052    new_path="$path"
27053
27054  windows_path="$new_path"
27055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27056    unix_path=`$CYGPATH -u "$windows_path"`
27057    new_path="$unix_path"
27058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27060    new_path="$unix_path"
27061  fi
27062
27063
27064    new_path=`$WHICH "$new_path" 2> /dev/null`
27065
27066    if test "x$new_path" = x; then
27067      # It's still not found. Now this is an unrecoverable error.
27068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27069$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27070      has_space=`$ECHO "$complete" | $GREP " "`
27071      if test "x$has_space" != x; then
27072        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27073$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27074      fi
27075      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27076    fi
27077  fi
27078
27079  # Now new_path has a complete unix path to the binary
27080  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27081    # Keep paths in /bin as-is, but remove trailing .exe if any
27082    new_path="${new_path/%.exe/}"
27083    # Do not save /bin paths to all_fixpath_prefixes!
27084  else
27085    # Not in mixed or Windows style, start by that.
27086    new_path=`cmd //c echo $new_path`
27087
27088  input_path="$new_path"
27089  # Check if we need to convert this using DOS-style short mode. If the path
27090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27091  # take no chances and rewrite it.
27092  # Note: m4 eats our [], so we need to use [ and ] instead.
27093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27094  if test "x$has_forbidden_chars" != x; then
27095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27097  fi
27098
27099    # Output is in $new_path
27100
27101  windows_path="$new_path"
27102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27103    unix_path=`$CYGPATH -u "$windows_path"`
27104    new_path="$unix_path"
27105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27107    new_path="$unix_path"
27108  fi
27109
27110    # remove trailing .exe if any
27111    new_path="${new_path/%.exe/}"
27112
27113    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27114    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27115  fi
27116
27117  else
27118    # We're on a posix platform. Hooray! :)
27119    # First separate the path from the arguments. This will split at the first
27120    # space.
27121    complete="$OBJCOPY"
27122    path="${complete%% *}"
27123    tmp="$complete EOL"
27124    arguments="${tmp#* }"
27125
27126    # Cannot rely on the command "which" here since it doesn't always work.
27127    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27128    if test -z "$is_absolute_path"; then
27129      # Path to executable is not absolute. Find it.
27130      IFS_save="$IFS"
27131      IFS=:
27132      for p in $PATH; do
27133        if test -f "$p/$path" && test -x "$p/$path"; then
27134          new_path="$p/$path"
27135          break
27136        fi
27137      done
27138      IFS="$IFS_save"
27139    else
27140      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27141$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27142      new_path="$path"
27143    fi
27144
27145    if test "x$new_path" = x; then
27146        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27147$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27148        has_space=`$ECHO "$complete" | $GREP " "`
27149        if test "x$has_space" != x; then
27150          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27151$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27152        fi
27153        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27154      fi
27155  fi
27156
27157      # Now join together the path and the arguments once again
27158      if test "x$arguments" != xEOL; then
27159        new_complete="$new_path ${arguments% *}"
27160      else
27161        new_complete="$new_path"
27162      fi
27163
27164  if test "x$complete" != "x$new_complete"; then
27165      OBJCOPY="$new_complete"
27166      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27167$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27168    fi
27169
27170    fi
27171fi
27172
27173if test -n "$ac_tool_prefix"; then
27174  for ac_prog in gobjdump objdump
27175  do
27176    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27177set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27179$as_echo_n "checking for $ac_word... " >&6; }
27180if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
27181  $as_echo_n "(cached) " >&6
27182else
27183  if test -n "$OBJDUMP"; then
27184  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27185else
27186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27187for as_dir in $PATH
27188do
27189  IFS=$as_save_IFS
27190  test -z "$as_dir" && as_dir=.
27191    for ac_exec_ext in '' $ac_executable_extensions; do
27192  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27193    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27195    break 2
27196  fi
27197done
27198  done
27199IFS=$as_save_IFS
27200
27201fi
27202fi
27203OBJDUMP=$ac_cv_prog_OBJDUMP
27204if test -n "$OBJDUMP"; then
27205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27206$as_echo "$OBJDUMP" >&6; }
27207else
27208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27209$as_echo "no" >&6; }
27210fi
27211
27212
27213    test -n "$OBJDUMP" && break
27214  done
27215fi
27216if test -z "$OBJDUMP"; then
27217  ac_ct_OBJDUMP=$OBJDUMP
27218  for ac_prog in gobjdump objdump
27219do
27220  # Extract the first word of "$ac_prog", so it can be a program name with args.
27221set dummy $ac_prog; ac_word=$2
27222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27223$as_echo_n "checking for $ac_word... " >&6; }
27224if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
27225  $as_echo_n "(cached) " >&6
27226else
27227  if test -n "$ac_ct_OBJDUMP"; then
27228  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27229else
27230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27231for as_dir in $PATH
27232do
27233  IFS=$as_save_IFS
27234  test -z "$as_dir" && as_dir=.
27235    for ac_exec_ext in '' $ac_executable_extensions; do
27236  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27237    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27239    break 2
27240  fi
27241done
27242  done
27243IFS=$as_save_IFS
27244
27245fi
27246fi
27247ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27248if test -n "$ac_ct_OBJDUMP"; then
27249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27250$as_echo "$ac_ct_OBJDUMP" >&6; }
27251else
27252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27253$as_echo "no" >&6; }
27254fi
27255
27256
27257  test -n "$ac_ct_OBJDUMP" && break
27258done
27259
27260  if test "x$ac_ct_OBJDUMP" = x; then
27261    OBJDUMP=""
27262  else
27263    case $cross_compiling:$ac_tool_warned in
27264yes:)
27265{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27266$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27267ac_tool_warned=yes ;;
27268esac
27269    OBJDUMP=$ac_ct_OBJDUMP
27270  fi
27271fi
27272
27273if test "x$OBJDUMP" != x; then
27274  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27275
27276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27277
27278  # First separate the path from the arguments. This will split at the first
27279  # space.
27280  complete="$OBJDUMP"
27281  path="${complete%% *}"
27282  tmp="$complete EOL"
27283  arguments="${tmp#* }"
27284
27285  # Input might be given as Windows format, start by converting to
27286  # unix format.
27287  new_path=`$CYGPATH -u "$path"`
27288
27289  # Now try to locate executable using which
27290  new_path=`$WHICH "$new_path" 2> /dev/null`
27291  # bat and cmd files are not always considered executable in cygwin causing which
27292  # to not find them
27293  if test "x$new_path" = x \
27294           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27295           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27296    new_path=`$CYGPATH -u "$path"`
27297  fi
27298  if test "x$new_path" = x; then
27299    # Oops. Which didn't find the executable.
27300    # The splitting of arguments from the executable at a space might have been incorrect,
27301    # since paths with space are more likely in Windows. Give it another try with the whole
27302    # argument.
27303    path="$complete"
27304    arguments="EOL"
27305    new_path=`$CYGPATH -u "$path"`
27306    new_path=`$WHICH "$new_path" 2> /dev/null`
27307    # bat and cmd files are not always considered executable in cygwin causing which
27308    # to not find them
27309    if test "x$new_path" = x \
27310             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27311             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27312      new_path=`$CYGPATH -u "$path"`
27313    fi
27314    if test "x$new_path" = x; then
27315      # It's still not found. Now this is an unrecoverable error.
27316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27317$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27318      has_space=`$ECHO "$complete" | $GREP " "`
27319      if test "x$has_space" != x; then
27320        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27321$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27322      fi
27323      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27324    fi
27325  fi
27326
27327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27330  # "foo.exe" is OK but "foo" is an error.
27331  #
27332  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27333  # It is also a way to make sure we got the proper file name for the real test later on.
27334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27335  if test "x$test_shortpath" = x; then
27336    # Short path failed, file does not exist as specified.
27337    # Try adding .exe or .cmd
27338    if test -f "${new_path}.exe"; then
27339       input_to_shortpath="${new_path}.exe"
27340    elif test -f "${new_path}.cmd"; then
27341       input_to_shortpath="${new_path}.cmd"
27342    else
27343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27344$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27345      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27346$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27347      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27348    fi
27349  else
27350    input_to_shortpath="$new_path"
27351  fi
27352
27353  # Call helper function which possibly converts this using DOS-style short mode.
27354  # If so, the updated path is stored in $new_path.
27355  new_path="$input_to_shortpath"
27356
27357  input_path="$input_to_shortpath"
27358  # Check if we need to convert this using DOS-style short mode. If the path
27359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27360  # take no chances and rewrite it.
27361  # Note: m4 eats our [], so we need to use [ and ] instead.
27362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27363  if test "x$has_forbidden_chars" != x; then
27364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27368      # Going to short mode and back again did indeed matter. Since short mode is
27369      # case insensitive, let's make it lowercase to improve readability.
27370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27371      # Now convert it back to Unix-stile (cygpath)
27372      input_path=`$CYGPATH -u "$shortmode_path"`
27373      new_path="$input_path"
27374    fi
27375  fi
27376
27377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27378  if test "x$test_cygdrive_prefix" = x; then
27379    # As a simple fix, exclude /usr/bin since it's not a real path.
27380    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27382      # a path prefixed by /cygdrive for fixpath to work.
27383      new_path="$CYGWIN_ROOT_PATH$input_path"
27384    fi
27385  fi
27386
27387  # remove trailing .exe if any
27388  new_path="${new_path/%.exe/}"
27389
27390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27391
27392  # First separate the path from the arguments. This will split at the first
27393  # space.
27394  complete="$OBJDUMP"
27395  path="${complete%% *}"
27396  tmp="$complete EOL"
27397  arguments="${tmp#* }"
27398
27399  # Input might be given as Windows format, start by converting to
27400  # unix format.
27401  new_path="$path"
27402
27403  windows_path="$new_path"
27404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27405    unix_path=`$CYGPATH -u "$windows_path"`
27406    new_path="$unix_path"
27407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27409    new_path="$unix_path"
27410  fi
27411
27412
27413  # Now try to locate executable using which
27414  new_path=`$WHICH "$new_path" 2> /dev/null`
27415
27416  if test "x$new_path" = x; then
27417    # Oops. Which didn't find the executable.
27418    # The splitting of arguments from the executable at a space might have been incorrect,
27419    # since paths with space are more likely in Windows. Give it another try with the whole
27420    # argument.
27421    path="$complete"
27422    arguments="EOL"
27423    new_path="$path"
27424
27425  windows_path="$new_path"
27426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27427    unix_path=`$CYGPATH -u "$windows_path"`
27428    new_path="$unix_path"
27429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27431    new_path="$unix_path"
27432  fi
27433
27434
27435    new_path=`$WHICH "$new_path" 2> /dev/null`
27436
27437    if test "x$new_path" = x; then
27438      # It's still not found. Now this is an unrecoverable error.
27439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27440$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27441      has_space=`$ECHO "$complete" | $GREP " "`
27442      if test "x$has_space" != x; then
27443        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27444$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27445      fi
27446      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27447    fi
27448  fi
27449
27450  # Now new_path has a complete unix path to the binary
27451  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27452    # Keep paths in /bin as-is, but remove trailing .exe if any
27453    new_path="${new_path/%.exe/}"
27454    # Do not save /bin paths to all_fixpath_prefixes!
27455  else
27456    # Not in mixed or Windows style, start by that.
27457    new_path=`cmd //c echo $new_path`
27458
27459  input_path="$new_path"
27460  # Check if we need to convert this using DOS-style short mode. If the path
27461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27462  # take no chances and rewrite it.
27463  # Note: m4 eats our [], so we need to use [ and ] instead.
27464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27465  if test "x$has_forbidden_chars" != x; then
27466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27468  fi
27469
27470    # Output is in $new_path
27471
27472  windows_path="$new_path"
27473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27474    unix_path=`$CYGPATH -u "$windows_path"`
27475    new_path="$unix_path"
27476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27478    new_path="$unix_path"
27479  fi
27480
27481    # remove trailing .exe if any
27482    new_path="${new_path/%.exe/}"
27483
27484    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27485    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27486  fi
27487
27488  else
27489    # We're on a posix platform. Hooray! :)
27490    # First separate the path from the arguments. This will split at the first
27491    # space.
27492    complete="$OBJDUMP"
27493    path="${complete%% *}"
27494    tmp="$complete EOL"
27495    arguments="${tmp#* }"
27496
27497    # Cannot rely on the command "which" here since it doesn't always work.
27498    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27499    if test -z "$is_absolute_path"; then
27500      # Path to executable is not absolute. Find it.
27501      IFS_save="$IFS"
27502      IFS=:
27503      for p in $PATH; do
27504        if test -f "$p/$path" && test -x "$p/$path"; then
27505          new_path="$p/$path"
27506          break
27507        fi
27508      done
27509      IFS="$IFS_save"
27510    else
27511      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27512$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27513      new_path="$path"
27514    fi
27515
27516    if test "x$new_path" = x; then
27517        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27518$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27519        has_space=`$ECHO "$complete" | $GREP " "`
27520        if test "x$has_space" != x; then
27521          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27522$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27523        fi
27524        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27525      fi
27526  fi
27527
27528      # Now join together the path and the arguments once again
27529      if test "x$arguments" != xEOL; then
27530        new_complete="$new_path ${arguments% *}"
27531      else
27532        new_complete="$new_path"
27533      fi
27534
27535  if test "x$complete" != "x$new_complete"; then
27536      OBJDUMP="$new_complete"
27537      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27538$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27539    fi
27540
27541fi
27542
27543if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27544   # Extract the first word of "lipo", so it can be a program name with args.
27545set dummy lipo; ac_word=$2
27546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27547$as_echo_n "checking for $ac_word... " >&6; }
27548if test "${ac_cv_path_LIPO+set}" = set; then :
27549  $as_echo_n "(cached) " >&6
27550else
27551  case $LIPO in
27552  [\\/]* | ?:[\\/]*)
27553  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27554  ;;
27555  *)
27556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27557for as_dir in $PATH
27558do
27559  IFS=$as_save_IFS
27560  test -z "$as_dir" && as_dir=.
27561    for ac_exec_ext in '' $ac_executable_extensions; do
27562  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27563    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27565    break 2
27566  fi
27567done
27568  done
27569IFS=$as_save_IFS
27570
27571  ;;
27572esac
27573fi
27574LIPO=$ac_cv_path_LIPO
27575if test -n "$LIPO"; then
27576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27577$as_echo "$LIPO" >&6; }
27578else
27579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27580$as_echo "no" >&6; }
27581fi
27582
27583
27584
27585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27586
27587  # First separate the path from the arguments. This will split at the first
27588  # space.
27589  complete="$LIPO"
27590  path="${complete%% *}"
27591  tmp="$complete EOL"
27592  arguments="${tmp#* }"
27593
27594  # Input might be given as Windows format, start by converting to
27595  # unix format.
27596  new_path=`$CYGPATH -u "$path"`
27597
27598  # Now try to locate executable using which
27599  new_path=`$WHICH "$new_path" 2> /dev/null`
27600  # bat and cmd files are not always considered executable in cygwin causing which
27601  # to not find them
27602  if test "x$new_path" = x \
27603           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27604           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27605    new_path=`$CYGPATH -u "$path"`
27606  fi
27607  if test "x$new_path" = x; then
27608    # Oops. Which didn't find the executable.
27609    # The splitting of arguments from the executable at a space might have been incorrect,
27610    # since paths with space are more likely in Windows. Give it another try with the whole
27611    # argument.
27612    path="$complete"
27613    arguments="EOL"
27614    new_path=`$CYGPATH -u "$path"`
27615    new_path=`$WHICH "$new_path" 2> /dev/null`
27616    # bat and cmd files are not always considered executable in cygwin causing which
27617    # to not find them
27618    if test "x$new_path" = x \
27619             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27620             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27621      new_path=`$CYGPATH -u "$path"`
27622    fi
27623    if test "x$new_path" = x; then
27624      # It's still not found. Now this is an unrecoverable error.
27625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27626$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27627      has_space=`$ECHO "$complete" | $GREP " "`
27628      if test "x$has_space" != x; then
27629        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27630$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27631      fi
27632      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27633    fi
27634  fi
27635
27636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27639  # "foo.exe" is OK but "foo" is an error.
27640  #
27641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27642  # It is also a way to make sure we got the proper file name for the real test later on.
27643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27644  if test "x$test_shortpath" = x; then
27645    # Short path failed, file does not exist as specified.
27646    # Try adding .exe or .cmd
27647    if test -f "${new_path}.exe"; then
27648       input_to_shortpath="${new_path}.exe"
27649    elif test -f "${new_path}.cmd"; then
27650       input_to_shortpath="${new_path}.cmd"
27651    else
27652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27653$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27654      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27655$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27656      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27657    fi
27658  else
27659    input_to_shortpath="$new_path"
27660  fi
27661
27662  # Call helper function which possibly converts this using DOS-style short mode.
27663  # If so, the updated path is stored in $new_path.
27664  new_path="$input_to_shortpath"
27665
27666  input_path="$input_to_shortpath"
27667  # Check if we need to convert this using DOS-style short mode. If the path
27668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27669  # take no chances and rewrite it.
27670  # Note: m4 eats our [], so we need to use [ and ] instead.
27671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27672  if test "x$has_forbidden_chars" != x; then
27673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27677      # Going to short mode and back again did indeed matter. Since short mode is
27678      # case insensitive, let's make it lowercase to improve readability.
27679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27680      # Now convert it back to Unix-stile (cygpath)
27681      input_path=`$CYGPATH -u "$shortmode_path"`
27682      new_path="$input_path"
27683    fi
27684  fi
27685
27686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27687  if test "x$test_cygdrive_prefix" = x; then
27688    # As a simple fix, exclude /usr/bin since it's not a real path.
27689    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27691      # a path prefixed by /cygdrive for fixpath to work.
27692      new_path="$CYGWIN_ROOT_PATH$input_path"
27693    fi
27694  fi
27695
27696  # remove trailing .exe if any
27697  new_path="${new_path/%.exe/}"
27698
27699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27700
27701  # First separate the path from the arguments. This will split at the first
27702  # space.
27703  complete="$LIPO"
27704  path="${complete%% *}"
27705  tmp="$complete EOL"
27706  arguments="${tmp#* }"
27707
27708  # Input might be given as Windows format, start by converting to
27709  # unix format.
27710  new_path="$path"
27711
27712  windows_path="$new_path"
27713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27714    unix_path=`$CYGPATH -u "$windows_path"`
27715    new_path="$unix_path"
27716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27718    new_path="$unix_path"
27719  fi
27720
27721
27722  # Now try to locate executable using which
27723  new_path=`$WHICH "$new_path" 2> /dev/null`
27724
27725  if test "x$new_path" = x; then
27726    # Oops. Which didn't find the executable.
27727    # The splitting of arguments from the executable at a space might have been incorrect,
27728    # since paths with space are more likely in Windows. Give it another try with the whole
27729    # argument.
27730    path="$complete"
27731    arguments="EOL"
27732    new_path="$path"
27733
27734  windows_path="$new_path"
27735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27736    unix_path=`$CYGPATH -u "$windows_path"`
27737    new_path="$unix_path"
27738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27740    new_path="$unix_path"
27741  fi
27742
27743
27744    new_path=`$WHICH "$new_path" 2> /dev/null`
27745
27746    if test "x$new_path" = x; then
27747      # It's still not found. Now this is an unrecoverable error.
27748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27749$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27750      has_space=`$ECHO "$complete" | $GREP " "`
27751      if test "x$has_space" != x; then
27752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27754      fi
27755      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27756    fi
27757  fi
27758
27759  # Now new_path has a complete unix path to the binary
27760  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27761    # Keep paths in /bin as-is, but remove trailing .exe if any
27762    new_path="${new_path/%.exe/}"
27763    # Do not save /bin paths to all_fixpath_prefixes!
27764  else
27765    # Not in mixed or Windows style, start by that.
27766    new_path=`cmd //c echo $new_path`
27767
27768  input_path="$new_path"
27769  # Check if we need to convert this using DOS-style short mode. If the path
27770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27771  # take no chances and rewrite it.
27772  # Note: m4 eats our [], so we need to use [ and ] instead.
27773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27774  if test "x$has_forbidden_chars" != x; then
27775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27776    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27777  fi
27778
27779    # Output is in $new_path
27780
27781  windows_path="$new_path"
27782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27783    unix_path=`$CYGPATH -u "$windows_path"`
27784    new_path="$unix_path"
27785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27787    new_path="$unix_path"
27788  fi
27789
27790    # remove trailing .exe if any
27791    new_path="${new_path/%.exe/}"
27792
27793    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27794    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27795  fi
27796
27797  else
27798    # We're on a posix platform. Hooray! :)
27799    # First separate the path from the arguments. This will split at the first
27800    # space.
27801    complete="$LIPO"
27802    path="${complete%% *}"
27803    tmp="$complete EOL"
27804    arguments="${tmp#* }"
27805
27806    # Cannot rely on the command "which" here since it doesn't always work.
27807    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27808    if test -z "$is_absolute_path"; then
27809      # Path to executable is not absolute. Find it.
27810      IFS_save="$IFS"
27811      IFS=:
27812      for p in $PATH; do
27813        if test -f "$p/$path" && test -x "$p/$path"; then
27814          new_path="$p/$path"
27815          break
27816        fi
27817      done
27818      IFS="$IFS_save"
27819    else
27820      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27821$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27822      new_path="$path"
27823    fi
27824
27825    if test "x$new_path" = x; then
27826        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27827$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27828        has_space=`$ECHO "$complete" | $GREP " "`
27829        if test "x$has_space" != x; then
27830          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27831$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27832        fi
27833        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27834      fi
27835  fi
27836
27837      # Now join together the path and the arguments once again
27838      if test "x$arguments" != xEOL; then
27839        new_complete="$new_path ${arguments% *}"
27840      else
27841        new_complete="$new_path"
27842      fi
27843
27844  if test "x$complete" != "x$new_complete"; then
27845      LIPO="$new_complete"
27846      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27847$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27848    fi
27849
27850fi
27851
27852# Restore old path without tools dir
27853PATH="$OLD_PATH"
27854
27855
27856# FIXME: Currently we must test this after paths but before flags. Fix!
27857
27858# And we can test some aspects on the target using configure macros.
27859
27860
27861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27862$as_echo_n "checking for ANSI C header files... " >&6; }
27863if test "${ac_cv_header_stdc+set}" = set; then :
27864  $as_echo_n "(cached) " >&6
27865else
27866  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27867/* end confdefs.h.  */
27868#include <stdlib.h>
27869#include <stdarg.h>
27870#include <string.h>
27871#include <float.h>
27872
27873int
27874main ()
27875{
27876
27877  ;
27878  return 0;
27879}
27880_ACEOF
27881if ac_fn_cxx_try_compile "$LINENO"; then :
27882  ac_cv_header_stdc=yes
27883else
27884  ac_cv_header_stdc=no
27885fi
27886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27887
27888if test $ac_cv_header_stdc = yes; then
27889  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27890  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27891/* end confdefs.h.  */
27892#include <string.h>
27893
27894_ACEOF
27895if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27896  $EGREP "memchr" >/dev/null 2>&1; then :
27897
27898else
27899  ac_cv_header_stdc=no
27900fi
27901rm -f conftest*
27902
27903fi
27904
27905if test $ac_cv_header_stdc = yes; then
27906  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27907  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27908/* end confdefs.h.  */
27909#include <stdlib.h>
27910
27911_ACEOF
27912if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27913  $EGREP "free" >/dev/null 2>&1; then :
27914
27915else
27916  ac_cv_header_stdc=no
27917fi
27918rm -f conftest*
27919
27920fi
27921
27922if test $ac_cv_header_stdc = yes; then
27923  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27924  if test "$cross_compiling" = yes; then :
27925  :
27926else
27927  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27928/* end confdefs.h.  */
27929#include <ctype.h>
27930#include <stdlib.h>
27931#if ((' ' & 0x0FF) == 0x020)
27932# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27933# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27934#else
27935# define ISLOWER(c) \
27936		   (('a' <= (c) && (c) <= 'i') \
27937		     || ('j' <= (c) && (c) <= 'r') \
27938		     || ('s' <= (c) && (c) <= 'z'))
27939# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27940#endif
27941
27942#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27943int
27944main ()
27945{
27946  int i;
27947  for (i = 0; i < 256; i++)
27948    if (XOR (islower (i), ISLOWER (i))
27949	|| toupper (i) != TOUPPER (i))
27950      return 2;
27951  return 0;
27952}
27953_ACEOF
27954if ac_fn_cxx_try_run "$LINENO"; then :
27955
27956else
27957  ac_cv_header_stdc=no
27958fi
27959rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27960  conftest.$ac_objext conftest.beam conftest.$ac_ext
27961fi
27962
27963fi
27964fi
27965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27966$as_echo "$ac_cv_header_stdc" >&6; }
27967if test $ac_cv_header_stdc = yes; then
27968
27969$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27970
27971fi
27972
27973# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27974for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27975		  inttypes.h stdint.h unistd.h
27976do :
27977  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27978ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27979"
27980if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27981  cat >>confdefs.h <<_ACEOF
27982#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27983_ACEOF
27984
27985fi
27986
27987done
27988
27989
27990
27991###############################################################################
27992#
27993# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27994# (The JVM can use 32 or 64 bit Java pointers but that decision
27995# is made at runtime.)
27996#
27997if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27998  # Always specify -m flags on Solaris
27999
28000  # keep track of c/cxx flags that we added outselves...
28001  #   to prevent emitting warning...
28002  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28003  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28004  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28005
28006  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28007  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28008  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28009
28010  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28011  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28012  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28013
28014elif test "x$COMPILE_TYPE" = xreduced; then
28015  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28016    # Specify -m if running reduced on other Posix platforms
28017
28018  # keep track of c/cxx flags that we added outselves...
28019  #   to prevent emitting warning...
28020  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28021  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28022  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28023
28024  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28025  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28026  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28027
28028  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28029  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28030  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28031
28032  fi
28033fi
28034
28035# Make compilation sanity check
28036for ac_header in stdio.h
28037do :
28038  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28039if test "x$ac_cv_header_stdio_h" = x""yes; then :
28040  cat >>confdefs.h <<_ACEOF
28041#define HAVE_STDIO_H 1
28042_ACEOF
28043
28044else
28045
28046  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28047$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28048  if test "x$COMPILE_TYPE" = xreduced; then
28049    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28050$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28051  elif test "x$COMPILE_TYPE" = xcross; then
28052    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28053$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28054  fi
28055  as_fn_error $? "Cannot continue." "$LINENO" 5
28056
28057fi
28058
28059done
28060
28061
28062# The cast to long int works around a bug in the HP C Compiler
28063# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28064# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28065# This bug is HP SR number 8606223364.
28066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28067$as_echo_n "checking size of int *... " >&6; }
28068if test "${ac_cv_sizeof_int_p+set}" = set; then :
28069  $as_echo_n "(cached) " >&6
28070else
28071  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28072
28073else
28074  if test "$ac_cv_type_int_p" = yes; then
28075     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28077as_fn_error 77 "cannot compute sizeof (int *)
28078See \`config.log' for more details" "$LINENO" 5 ; }
28079   else
28080     ac_cv_sizeof_int_p=0
28081   fi
28082fi
28083
28084fi
28085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28086$as_echo "$ac_cv_sizeof_int_p" >&6; }
28087
28088
28089
28090cat >>confdefs.h <<_ACEOF
28091#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28092_ACEOF
28093
28094
28095
28096if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28097  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28098  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28099fi
28100
28101if test "x$SIZEOF_INT_P" = x; then
28102    # The test failed, lets stick to the assumed value.
28103    { $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
28104$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28105else
28106    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28107
28108    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28109        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
28110    fi
28111fi
28112
28113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28114$as_echo_n "checking for target address size... " >&6; }
28115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28116$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28117
28118
28119###############################################################################
28120#
28121# Is the target little of big endian?
28122#
28123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28124$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28125if test "${ac_cv_c_bigendian+set}" = set; then :
28126  $as_echo_n "(cached) " >&6
28127else
28128  ac_cv_c_bigendian=unknown
28129    # See if we're dealing with a universal compiler.
28130    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28131/* end confdefs.h.  */
28132#ifndef __APPLE_CC__
28133	       not a universal capable compiler
28134	     #endif
28135	     typedef int dummy;
28136
28137_ACEOF
28138if ac_fn_cxx_try_compile "$LINENO"; then :
28139
28140	# Check for potential -arch flags.  It is not universal unless
28141	# there are at least two -arch flags with different values.
28142	ac_arch=
28143	ac_prev=
28144	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28145	 if test -n "$ac_prev"; then
28146	   case $ac_word in
28147	     i?86 | x86_64 | ppc | ppc64)
28148	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28149		 ac_arch=$ac_word
28150	       else
28151		 ac_cv_c_bigendian=universal
28152		 break
28153	       fi
28154	       ;;
28155	   esac
28156	   ac_prev=
28157	 elif test "x$ac_word" = "x-arch"; then
28158	   ac_prev=arch
28159	 fi
28160       done
28161fi
28162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28163    if test $ac_cv_c_bigendian = unknown; then
28164      # See if sys/param.h defines the BYTE_ORDER macro.
28165      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28166/* end confdefs.h.  */
28167#include <sys/types.h>
28168	     #include <sys/param.h>
28169
28170int
28171main ()
28172{
28173#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28174		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28175		     && LITTLE_ENDIAN)
28176	      bogus endian macros
28177	     #endif
28178
28179  ;
28180  return 0;
28181}
28182_ACEOF
28183if ac_fn_cxx_try_compile "$LINENO"; then :
28184  # It does; now see whether it defined to BIG_ENDIAN or not.
28185	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28186/* end confdefs.h.  */
28187#include <sys/types.h>
28188		#include <sys/param.h>
28189
28190int
28191main ()
28192{
28193#if BYTE_ORDER != BIG_ENDIAN
28194		 not big endian
28195		#endif
28196
28197  ;
28198  return 0;
28199}
28200_ACEOF
28201if ac_fn_cxx_try_compile "$LINENO"; then :
28202  ac_cv_c_bigendian=yes
28203else
28204  ac_cv_c_bigendian=no
28205fi
28206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28207fi
28208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28209    fi
28210    if test $ac_cv_c_bigendian = unknown; then
28211      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28212      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28213/* end confdefs.h.  */
28214#include <limits.h>
28215
28216int
28217main ()
28218{
28219#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28220	      bogus endian macros
28221	     #endif
28222
28223  ;
28224  return 0;
28225}
28226_ACEOF
28227if ac_fn_cxx_try_compile "$LINENO"; then :
28228  # It does; now see whether it defined to _BIG_ENDIAN or not.
28229	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28230/* end confdefs.h.  */
28231#include <limits.h>
28232
28233int
28234main ()
28235{
28236#ifndef _BIG_ENDIAN
28237		 not big endian
28238		#endif
28239
28240  ;
28241  return 0;
28242}
28243_ACEOF
28244if ac_fn_cxx_try_compile "$LINENO"; then :
28245  ac_cv_c_bigendian=yes
28246else
28247  ac_cv_c_bigendian=no
28248fi
28249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28250fi
28251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28252    fi
28253    if test $ac_cv_c_bigendian = unknown; then
28254      # Compile a test program.
28255      if test "$cross_compiling" = yes; then :
28256  # Try to guess by grepping values from an object file.
28257	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28258/* end confdefs.h.  */
28259short int ascii_mm[] =
28260		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28261		short int ascii_ii[] =
28262		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28263		int use_ascii (int i) {
28264		  return ascii_mm[i] + ascii_ii[i];
28265		}
28266		short int ebcdic_ii[] =
28267		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28268		short int ebcdic_mm[] =
28269		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28270		int use_ebcdic (int i) {
28271		  return ebcdic_mm[i] + ebcdic_ii[i];
28272		}
28273		extern int foo;
28274
28275int
28276main ()
28277{
28278return use_ascii (foo) == use_ebcdic (foo);
28279  ;
28280  return 0;
28281}
28282_ACEOF
28283if ac_fn_cxx_try_compile "$LINENO"; then :
28284  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28285	      ac_cv_c_bigendian=yes
28286	    fi
28287	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28288	      if test "$ac_cv_c_bigendian" = unknown; then
28289		ac_cv_c_bigendian=no
28290	      else
28291		# finding both strings is unlikely to happen, but who knows?
28292		ac_cv_c_bigendian=unknown
28293	      fi
28294	    fi
28295fi
28296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28297else
28298  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28299/* end confdefs.h.  */
28300$ac_includes_default
28301int
28302main ()
28303{
28304
28305	     /* Are we little or big endian?  From Harbison&Steele.  */
28306	     union
28307	     {
28308	       long int l;
28309	       char c[sizeof (long int)];
28310	     } u;
28311	     u.l = 1;
28312	     return u.c[sizeof (long int) - 1] == 1;
28313
28314  ;
28315  return 0;
28316}
28317_ACEOF
28318if ac_fn_cxx_try_run "$LINENO"; then :
28319  ac_cv_c_bigendian=no
28320else
28321  ac_cv_c_bigendian=yes
28322fi
28323rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28324  conftest.$ac_objext conftest.beam conftest.$ac_ext
28325fi
28326
28327    fi
28328fi
28329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28330$as_echo "$ac_cv_c_bigendian" >&6; }
28331 case $ac_cv_c_bigendian in #(
28332   yes)
28333     ENDIAN="big";; #(
28334   no)
28335     ENDIAN="little" ;; #(
28336   universal)
28337     ENDIAN="universal_endianness"
28338     ;; #(
28339   *)
28340     ENDIAN="unknown" ;;
28341 esac
28342
28343
28344if test "x$ENDIAN" = xuniversal_endianness; then
28345    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28346fi
28347if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28348    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
28349fi
28350
28351
28352# Configure flags for the tools
28353
28354
28355###############################################################################
28356#
28357# How to compile shared libraries.
28358#
28359
28360if test "x$GCC" = xyes; then
28361    COMPILER_NAME=gcc
28362    PICFLAG="-fPIC"
28363    LIBRARY_PREFIX=lib
28364    SHARED_LIBRARY='lib$1.so'
28365    STATIC_LIBRARY='lib$1.a'
28366    SHARED_LIBRARY_FLAGS="-shared"
28367    SHARED_LIBRARY_SUFFIX='.so'
28368    STATIC_LIBRARY_SUFFIX='.a'
28369    OBJ_SUFFIX='.o'
28370    EXE_SUFFIX=''
28371    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28372    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28373    C_FLAG_REORDER=''
28374    CXX_FLAG_REORDER=''
28375    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28376    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28377    LD="$CC"
28378    LDEXE="$CC"
28379    LDCXX="$CXX"
28380    LDEXECXX="$CXX"
28381    POST_STRIP_CMD="$STRIP -g"
28382
28383    # Linking is different on MacOSX
28384    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28385        # Might change in the future to clang.
28386        COMPILER_NAME=gcc
28387        SHARED_LIBRARY='lib$1.dylib'
28388        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28389        SHARED_LIBRARY_SUFFIX='.dylib'
28390        EXE_SUFFIX=''
28391        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28392        SET_SHARED_LIBRARY_MAPFILE=''
28393        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28394        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28395        POST_STRIP_CMD="$STRIP -S"
28396    fi
28397else
28398    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28399        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28400        COMPILER_NAME=ossc
28401        PICFLAG="-KPIC"
28402        LIBRARY_PREFIX=lib
28403        SHARED_LIBRARY='lib$1.so'
28404        STATIC_LIBRARY='lib$1.a'
28405        SHARED_LIBRARY_FLAGS="-G"
28406        SHARED_LIBRARY_SUFFIX='.so'
28407        STATIC_LIBRARY_SUFFIX='.a'
28408        OBJ_SUFFIX='.o'
28409        EXE_SUFFIX=''
28410        SET_SHARED_LIBRARY_NAME=''
28411        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28412	C_FLAG_REORDER='-xF'
28413	CXX_FLAG_REORDER='-xF'
28414        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28415        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28416        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28417        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28418        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28419        POST_STRIP_CMD="$STRIP -x"
28420        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28421    fi
28422    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28423        # If it is not gcc, then assume it is the MS Visual Studio compiler
28424        COMPILER_NAME=cl
28425        PICFLAG=""
28426        LIBRARY_PREFIX=
28427        SHARED_LIBRARY='$1.dll'
28428        STATIC_LIBRARY='$1.lib'
28429        SHARED_LIBRARY_FLAGS="-LD"
28430        SHARED_LIBRARY_SUFFIX='.dll'
28431        STATIC_LIBRARY_SUFFIX='.lib'
28432        OBJ_SUFFIX='.obj'
28433        EXE_SUFFIX='.exe'
28434        SET_SHARED_LIBRARY_NAME=''
28435        SET_SHARED_LIBRARY_MAPFILE=''
28436        SET_SHARED_LIBRARY_ORIGIN=''
28437        SET_EXECUTABLE_ORIGIN=''
28438    fi
28439fi
28440
28441
28442
28443
28444
28445
28446
28447
28448
28449
28450
28451
28452
28453
28454
28455
28456
28457
28458# The (cross) compiler is now configured, we can now test capabilities
28459# of the target platform.
28460
28461
28462
28463###############################################################################
28464#
28465# Setup the opt flags for different compilers
28466# and different operating systems.
28467#
28468
28469#
28470# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28471#
28472if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28473    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28474    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28475    CFLAGS="$CFLAGS -mstackrealign"
28476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28477$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28478    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28479/* end confdefs.h.  */
28480int main() { return 0; }
28481_ACEOF
28482if ac_fn_cxx_try_link "$LINENO"; then :
28483
28484		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28485$as_echo "yes" >&6; }
28486
28487else
28488
28489		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28490$as_echo "no" >&6; }
28491	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28492
28493fi
28494rm -f core conftest.err conftest.$ac_objext \
28495    conftest$ac_exeext conftest.$ac_ext
28496fi
28497
28498C_FLAG_DEPS="-MMD -MF"
28499CXX_FLAG_DEPS="-MMD -MF"
28500
28501case $COMPILER_TYPE in
28502  CC )
28503    D_FLAG="-g"
28504    case $COMPILER_NAME in
28505      gcc )
28506      	case $OPENJDK_TARGET_OS in
28507	  macosx )
28508	    # On MacOSX we optimize for size, something
28509	    # we should do for all platforms?
28510	    C_O_FLAG_HI="-Os"
28511	    C_O_FLAG_NORM="-Os"
28512	    C_O_FLAG_NONE=""
28513	    ;;
28514	  *)
28515	    C_O_FLAG_HI="-O3"
28516	    C_O_FLAG_NORM="-O2"
28517	    C_O_FLAG_NONE="-O0"
28518	    CFLAGS_DEBUG_SYMBOLS="-g"
28519	    CXXFLAGS_DEBUG_SYMBOLS="-g"
28520	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28521	       CFLAGS_DEBUG_SYMBOLS="-g1"
28522	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
28523	    fi
28524	    ;;
28525	esac
28526        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28527        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28528        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28529        ;;
28530      ossc )
28531        #
28532        # Forte has different names for this with their C++ compiler...
28533        #
28534        C_FLAG_DEPS="-xMMD -xMF"
28535        CXX_FLAG_DEPS="-xMMD -xMF"
28536
28537        # Extra options used with HIGHEST
28538        #
28539        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28540        #          done with care, there are some assumptions below that need to
28541        #          be understood about the use of pointers, and IEEE behavior.
28542        #
28543        # Use non-standard floating point mode (not IEEE 754)
28544        CC_HIGHEST="$CC_HIGHEST -fns"
28545        # Do some simplification of floating point arithmetic (not IEEE 754)
28546        CC_HIGHEST="$CC_HIGHEST -fsimple"
28547        # Use single precision floating point with 'float'
28548        CC_HIGHEST="$CC_HIGHEST -fsingle"
28549        # Assume memory references via basic pointer types do not alias
28550        #   (Source with excessing pointer casting and data access with mixed
28551        #    pointer types are not recommended)
28552        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28553        # Use intrinsic or inline versions for math/std functions
28554        #   (If you expect perfect errno behavior, do not use this)
28555        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28556        # Loop data dependency optimizations (need -xO3 or higher)
28557        CC_HIGHEST="$CC_HIGHEST -xdepend"
28558        # Pointer parameters to functions do not overlap
28559        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28560        #    If you pass in multiple pointers to the same data, do not use this)
28561        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28562        # Inline some library routines
28563        #   (If you expect perfect errno behavior, do not use this)
28564        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28565        # Use optimized math routines
28566        #   (If you expect perfect errno behavior, do not use this)
28567        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28568        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28569
28570        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28571          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28572          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28573        fi
28574
28575        case $OPENJDK_TARGET_CPU_ARCH in
28576          x86)
28577            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28578            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28579            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28580            C_O_FLAG_NONE="-xregs=no%frameptr"
28581            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28582            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28583            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28584            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28585            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28586               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28587               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28588            fi
28589            ;;
28590          sparc)
28591            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28592            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28593            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28594            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28595            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28596            C_O_FLAG_NONE=""
28597            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28598            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28599            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28600            CXX_O_FLAG_NONE=""
28601            ;;
28602        esac
28603
28604    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28605    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28606    esac
28607    ;;
28608  CL )
28609    D_FLAG=
28610    C_O_FLAG_HIGHEST="-O2"
28611    C_O_FLAG_HI="-O1"
28612    C_O_FLAG_NORM="-O1"
28613    C_O_FLAG_NONE="-Od"
28614    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28615    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28616    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28617    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28618    ;;
28619esac
28620
28621if test -z "$C_O_FLAG_HIGHEST"; then
28622   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28623fi
28624
28625if test -z "$CXX_O_FLAG_HIGHEST"; then
28626   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28627fi
28628
28629
28630
28631
28632
28633
28634
28635
28636
28637
28638
28639
28640
28641
28642if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28643   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28644$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28645fi
28646
28647if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28648   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28649$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28650fi
28651
28652if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28653   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28654$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28655fi
28656
28657
28658# Check whether --with-extra-cflags was given.
28659if test "${with_extra_cflags+set}" = set; then :
28660  withval=$with_extra_cflags;
28661fi
28662
28663
28664
28665# Check whether --with-extra-cxxflags was given.
28666if test "${with_extra_cxxflags+set}" = set; then :
28667  withval=$with_extra_cxxflags;
28668fi
28669
28670
28671
28672# Check whether --with-extra-ldflags was given.
28673if test "${with_extra_ldflags+set}" = set; then :
28674  withval=$with_extra_ldflags;
28675fi
28676
28677
28678CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28679CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28680LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28681
28682# Hotspot needs these set in their legacy form
28683LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28684LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28685LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28686
28687
28688
28689
28690
28691###############################################################################
28692#
28693# Now setup the CFLAGS and LDFLAGS for the JDK build.
28694# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28695#
28696case $COMPILER_NAME in
28697      gcc )
28698      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28699                          -pipe \
28700                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28701	  case $OPENJDK_TARGET_CPU_ARCH in
28702	  arm )
28703            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28704	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28705	  ;;
28706	  ppc )
28707            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28708	  ;;
28709	  * )
28710	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28711	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28712          ;;
28713	  esac
28714          ;;
28715      ossc )
28716          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28717          case $OPENJDK_TARGET_CPU_ARCH in
28718          x86 )
28719            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28720       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28721          ;;
28722          esac
28723
28724      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28725      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28726
28727          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28728          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28729          ;;
28730      cl )
28731          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28732               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28733	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28734	       -DWIN32 -DIAL"
28735          case $OPENJDK_TARGET_CPU in
28736              x86 )
28737                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28738                  ;;
28739              x86_64 )
28740                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28741                  ;;
28742          esac
28743          ;;
28744esac
28745
28746###############################################################################
28747
28748CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28749
28750# The package path is used only on macosx?
28751PACKAGE_PATH=/opt/local
28752
28753
28754if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28755    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28756    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28757    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28758    #   Note: -Dmacro         is the same as    #define macro 1
28759    #         -Dmacro=	    is the same as    #define macro
28760    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28761        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28762    else
28763        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28764    fi
28765else
28766    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28767fi
28768if test "x$OPENJDK_TARGET_OS" = xlinux; then
28769    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28770fi
28771if test "x$OPENJDK_TARGET_OS" = xwindows; then
28772    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28773fi
28774if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28775    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28776fi
28777if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28778    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28779    # Setting these parameters makes it an error to link to macosx APIs that are
28780    # newer than the given OS version and makes the linked binaries compatible even
28781    # if built on a newer version of the OS.
28782    # The expected format is X.Y.Z
28783    MACOSX_VERSION_MIN=10.7.0
28784
28785    # The macro takes the version with no dots, ex: 1070
28786    # Let the flags variables get resolved in make for easier override on make
28787    # command line.
28788    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28789    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28790fi
28791if test "x$OPENJDK_TARGET_OS" = xbsd; then
28792    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28793fi
28794if test "x$DEBUG_LEVEL" = xrelease; then
28795    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28796    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28797        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28798    fi
28799else
28800    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28801fi
28802
28803CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28804CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28805
28806CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28807        -I${JDK_OUTPUTDIR}/include \
28808        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28809        -I${JDK_TOPDIR}/src/share/javavm/export \
28810        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28811        -I${JDK_TOPDIR}/src/share/native/common \
28812        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28813
28814# The shared libraries are compiled using the picflag.
28815CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28816CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28817
28818# Executable flags
28819CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28820CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28821
28822# Now this is odd. The JDK native libraries have to link against libjvm.so
28823# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28824# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28825# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28826# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28827# libraries will link to whatever is in memory. Yuck.
28828#
28829# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28830if test "x$COMPILER_NAME" = xcl; then
28831    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28832    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28833        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28834    fi
28835    # TODO: make -debug optional "--disable-full-debug-symbols"
28836    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28837    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28838    LDFLAGS_JDKLIB_SUFFIX=""
28839    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28840        LDFLAGS_STACK_SIZE=1048576
28841    else
28842        LDFLAGS_STACK_SIZE=327680
28843    fi
28844    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28845else
28846    if test "x$COMPILER_NAME" = xgcc; then
28847        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28848        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28849        if test -n "$HAS_GNU_HASH"; then
28850            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28851        fi
28852        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28853          # And since we now know that the linker is gnu, then add -z defs, to forbid
28854          # undefined symbols in object files.
28855          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28856          if test "x$DEBUG_LEVEL" = "xrelease"; then
28857              # When building release libraries, tell the linker optimize them.
28858              # Should this be supplied to the OSS linker as well?
28859              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28860          fi
28861        fi
28862    fi
28863    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28864                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28865
28866    # On some platforms (mac) the linker warns about non existing -L dirs.
28867    # Add server first if available. Linking aginst client does not always produce the same results.
28868    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28869    # Default to server for other variants.
28870    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28871        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28872    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28873        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28874    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28875        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28876    else
28877        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28878    fi
28879
28880    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28881    if test "x$COMPILER_NAME" = xossc; then
28882        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28883    fi
28884
28885    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28886    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28887        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28888    fi
28889fi
28890
28891# Adjust flags according to debug level.
28892case $DEBUG_LEVEL in
28893      fastdebug )
28894              CFLAGS="$CFLAGS $D_FLAG"
28895              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28896              ;;
28897      slowdebug )
28898              CFLAGS="$CFLAGS $D_FLAG"
28899	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28900	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28901	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28902	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28903              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28904              ;;
28905esac
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921# Setup debug symbols (need objcopy from the toolchain for that)
28922
28923#
28924# ENABLE_DEBUG_SYMBOLS
28925# This must be done after the toolchain is setup, since we're looking at objcopy.
28926#
28927# Check whether --enable-debug-symbols was given.
28928if test "${enable_debug_symbols+set}" = set; then :
28929  enableval=$enable_debug_symbols;
28930fi
28931
28932
28933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28934$as_echo_n "checking if we should generate debug symbols... " >&6; }
28935
28936if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28937   # explicit enabling of enable-debug-symbols and can't find objcopy
28938   #   this is an error
28939   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28940fi
28941
28942if test "x$enable_debug_symbols" = "xyes"; then
28943  ENABLE_DEBUG_SYMBOLS=true
28944elif test "x$enable_debug_symbols" = "xno"; then
28945  ENABLE_DEBUG_SYMBOLS=false
28946else
28947  # default on macosx is false
28948  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28949    ENABLE_DEBUG_SYMBOLS=false
28950  # Default is on if objcopy is found, otherwise off
28951  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28952    ENABLE_DEBUG_SYMBOLS=true
28953  else
28954    ENABLE_DEBUG_SYMBOLS=false
28955  fi
28956fi
28957
28958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28959$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28960
28961#
28962# ZIP_DEBUGINFO_FILES
28963#
28964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28965$as_echo_n "checking if we should zip debug-info files... " >&6; }
28966# Check whether --enable-zip-debug-info was given.
28967if test "${enable_zip_debug_info+set}" = set; then :
28968  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
28969else
28970  enable_zip_debug_info="yes"
28971fi
28972
28973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28974$as_echo "${enable_zip_debug_info}" >&6; }
28975
28976if test "x${enable_zip_debug_info}" = "xno"; then
28977   ZIP_DEBUGINFO_FILES=false
28978else
28979   ZIP_DEBUGINFO_FILES=true
28980fi
28981
28982
28983
28984
28985
28986
28987
28988###############################################################################
28989#
28990# Check dependencies for external and internal libraries.
28991#
28992###############################################################################
28993
28994
28995
28996###############################################################################
28997#
28998# OS specific settings that we never will need to probe.
28999#
29000if test "x$OPENJDK_TARGET_OS" = xlinux; then
29001    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29002$as_echo_n "checking what is not needed on Linux?... " >&6; }
29003    PULSE_NOT_NEEDED=yes
29004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29005$as_echo "pulse" >&6; }
29006fi
29007
29008if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29010$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29011    ALSA_NOT_NEEDED=yes
29012    PULSE_NOT_NEEDED=yes
29013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29014$as_echo "alsa pulse" >&6; }
29015fi
29016
29017if test "x$OPENJDK_TARGET_OS" = xwindows; then
29018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29019$as_echo_n "checking what is not needed on Windows?... " >&6; }
29020    CUPS_NOT_NEEDED=yes
29021    ALSA_NOT_NEEDED=yes
29022    PULSE_NOT_NEEDED=yes
29023    X11_NOT_NEEDED=yes
29024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29025$as_echo "alsa cups pulse x11" >&6; }
29026fi
29027
29028if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29030$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29031    ALSA_NOT_NEEDED=yes
29032    PULSE_NOT_NEEDED=yes
29033    X11_NOT_NEEDED=yes
29034    FREETYPE2_NOT_NEEDED=yes
29035    # If the java runtime framework is disabled, then we need X11.
29036    # This will be adjusted below.
29037    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29038$as_echo "alsa pulse x11" >&6; }
29039fi
29040
29041if test "x$OPENJDK_TARGET_OS" = xbsd; then
29042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29043$as_echo_n "checking what is not needed on bsd?... " >&6; }
29044    ALSA_NOT_NEEDED=yes
29045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29046$as_echo "alsa" >&6; }
29047fi
29048
29049if test "x$OPENJDK" = "xfalse"; then
29050    FREETYPE2_NOT_NEEDED=yes
29051fi
29052
29053if test "x$SUPPORT_HEADFUL" = xno; then
29054    X11_NOT_NEEDED=yes
29055fi
29056
29057###############################################################################
29058#
29059# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29060# that uses this API.
29061#
29062# Check whether --enable-macosx-runtime-support was given.
29063if test "${enable_macosx_runtime_support+set}" = set; then :
29064  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29065else
29066  MACOSX_RUNTIME_SUPPORT="no"
29067fi
29068
29069
29070USE_MACOSX_RUNTIME_SUPPORT=no
29071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29072$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29073if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29074    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29075        MACOSX_RUNTIME_SUPPORT=yes
29076        USE_MACOSX_RUNTIME_SUPPORT=yes
29077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29078$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29079    else
29080        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29081$as_echo "yes, but explicitly disabled." >&6; }
29082    fi
29083else
29084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29085$as_echo "no" >&6; }
29086fi
29087
29088if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29090$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29091    X11_NOT_NEEDED=
29092    FREETYPE2_NOT_NEEDED=
29093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29094$as_echo "alsa pulse" >&6; }
29095fi
29096
29097
29098
29099
29100###############################################################################
29101#
29102# Check for X Windows
29103#
29104
29105# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29106# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29107# --x-libraries for the sysroot, if that seems to be correct.
29108if test "x$SYS_ROOT" != "x/"; then
29109  if test "x$x_includes" = xNONE; then
29110    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29111      x_includes="$SYS_ROOT/usr/X11R6/include"
29112    fi
29113  fi
29114  if test "x$x_libraries" = xNONE; then
29115    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29116      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29117    fi
29118  fi
29119fi
29120
29121# Now let autoconf do it's magic
29122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29123$as_echo_n "checking for X... " >&6; }
29124
29125
29126# Check whether --with-x was given.
29127if test "${with_x+set}" = set; then :
29128  withval=$with_x;
29129fi
29130
29131# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29132if test "x$with_x" = xno; then
29133  # The user explicitly disabled X.
29134  have_x=disabled
29135else
29136  case $x_includes,$x_libraries in #(
29137    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
29138    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
29139  $as_echo_n "(cached) " >&6
29140else
29141  # One or both of the vars are not set, and there is no cached value.
29142ac_x_includes=no ac_x_libraries=no
29143rm -f -r conftest.dir
29144if mkdir conftest.dir; then
29145  cd conftest.dir
29146  cat >Imakefile <<'_ACEOF'
29147incroot:
29148	@echo incroot='${INCROOT}'
29149usrlibdir:
29150	@echo usrlibdir='${USRLIBDIR}'
29151libdir:
29152	@echo libdir='${LIBDIR}'
29153_ACEOF
29154  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29155    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29156    for ac_var in incroot usrlibdir libdir; do
29157      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29158    done
29159    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29160    for ac_extension in a so sl dylib la dll; do
29161      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29162	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29163	ac_im_usrlibdir=$ac_im_libdir; break
29164      fi
29165    done
29166    # Screen out bogus values from the imake configuration.  They are
29167    # bogus both because they are the default anyway, and because
29168    # using them would break gcc on systems where it needs fixed includes.
29169    case $ac_im_incroot in
29170	/usr/include) ac_x_includes= ;;
29171	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29172    esac
29173    case $ac_im_usrlibdir in
29174	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29175	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29176    esac
29177  fi
29178  cd ..
29179  rm -f -r conftest.dir
29180fi
29181
29182# Standard set of common directories for X headers.
29183# Check X11 before X11Rn because it is often a symlink to the current release.
29184ac_x_header_dirs='
29185/usr/X11/include
29186/usr/X11R7/include
29187/usr/X11R6/include
29188/usr/X11R5/include
29189/usr/X11R4/include
29190
29191/usr/include/X11
29192/usr/include/X11R7
29193/usr/include/X11R6
29194/usr/include/X11R5
29195/usr/include/X11R4
29196
29197/usr/local/X11/include
29198/usr/local/X11R7/include
29199/usr/local/X11R6/include
29200/usr/local/X11R5/include
29201/usr/local/X11R4/include
29202
29203/usr/local/include/X11
29204/usr/local/include/X11R7
29205/usr/local/include/X11R6
29206/usr/local/include/X11R5
29207/usr/local/include/X11R4
29208
29209/usr/X386/include
29210/usr/x386/include
29211/usr/XFree86/include/X11
29212
29213/usr/include
29214/usr/local/include
29215/usr/unsupported/include
29216/usr/athena/include
29217/usr/local/x11r5/include
29218/usr/lpp/Xamples/include
29219
29220/usr/openwin/include
29221/usr/openwin/share/include'
29222
29223if test "$ac_x_includes" = no; then
29224  # Guess where to find include files, by looking for Xlib.h.
29225  # First, try using that file with no special directory specified.
29226  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29227/* end confdefs.h.  */
29228#include <X11/Xlib.h>
29229_ACEOF
29230if ac_fn_cxx_try_cpp "$LINENO"; then :
29231  # We can compile using X headers with no special include directory.
29232ac_x_includes=
29233else
29234  for ac_dir in $ac_x_header_dirs; do
29235  if test -r "$ac_dir/X11/Xlib.h"; then
29236    ac_x_includes=$ac_dir
29237    break
29238  fi
29239done
29240fi
29241rm -f conftest.err conftest.i conftest.$ac_ext
29242fi # $ac_x_includes = no
29243
29244if test "$ac_x_libraries" = no; then
29245  # Check for the libraries.
29246  # See if we find them without any special options.
29247  # Don't add to $LIBS permanently.
29248  ac_save_LIBS=$LIBS
29249  LIBS="-lX11 $LIBS"
29250  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29251/* end confdefs.h.  */
29252#include <X11/Xlib.h>
29253int
29254main ()
29255{
29256XrmInitialize ()
29257  ;
29258  return 0;
29259}
29260_ACEOF
29261if ac_fn_cxx_try_link "$LINENO"; then :
29262  LIBS=$ac_save_LIBS
29263# We can link X programs with no special library path.
29264ac_x_libraries=
29265else
29266  LIBS=$ac_save_LIBS
29267for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29268do
29269  # Don't even attempt the hair of trying to link an X program!
29270  for ac_extension in a so sl dylib la dll; do
29271    if test -r "$ac_dir/libX11.$ac_extension"; then
29272      ac_x_libraries=$ac_dir
29273      break 2
29274    fi
29275  done
29276done
29277fi
29278rm -f core conftest.err conftest.$ac_objext \
29279    conftest$ac_exeext conftest.$ac_ext
29280fi # $ac_x_libraries = no
29281
29282case $ac_x_includes,$ac_x_libraries in #(
29283  no,* | *,no | *\'*)
29284    # Didn't find X, or a directory has "'" in its name.
29285    ac_cv_have_x="have_x=no";; #(
29286  *)
29287    # Record where we found X for the cache.
29288    ac_cv_have_x="have_x=yes\
29289	ac_x_includes='$ac_x_includes'\
29290	ac_x_libraries='$ac_x_libraries'"
29291esac
29292fi
29293;; #(
29294    *) have_x=yes;;
29295  esac
29296  eval "$ac_cv_have_x"
29297fi # $with_x != no
29298
29299if test "$have_x" != yes; then
29300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29301$as_echo "$have_x" >&6; }
29302  no_x=yes
29303else
29304  # If each of the values was on the command line, it overrides each guess.
29305  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29306  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29307  # Update the cache value to reflect the command line values.
29308  ac_cv_have_x="have_x=yes\
29309	ac_x_includes='$x_includes'\
29310	ac_x_libraries='$x_libraries'"
29311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29312$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29313fi
29314
29315if test "$no_x" = yes; then
29316  # Not all programs may use this symbol, but it does not hurt to define it.
29317
29318$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29319
29320  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29321else
29322  if test -n "$x_includes"; then
29323    X_CFLAGS="$X_CFLAGS -I$x_includes"
29324  fi
29325
29326  # It would also be nice to do this for all -L options, not just this one.
29327  if test -n "$x_libraries"; then
29328    X_LIBS="$X_LIBS -L$x_libraries"
29329    # For Solaris; some versions of Sun CC require a space after -R and
29330    # others require no space.  Words are not sufficient . . . .
29331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29332$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29333    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29334    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29335    ac_cxx_werror_flag=yes
29336    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29337/* end confdefs.h.  */
29338
29339int
29340main ()
29341{
29342
29343  ;
29344  return 0;
29345}
29346_ACEOF
29347if ac_fn_cxx_try_link "$LINENO"; then :
29348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29349$as_echo "no" >&6; }
29350       X_LIBS="$X_LIBS -R$x_libraries"
29351else
29352  LIBS="$ac_xsave_LIBS -R $x_libraries"
29353       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29354/* end confdefs.h.  */
29355
29356int
29357main ()
29358{
29359
29360  ;
29361  return 0;
29362}
29363_ACEOF
29364if ac_fn_cxx_try_link "$LINENO"; then :
29365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29366$as_echo "yes" >&6; }
29367	  X_LIBS="$X_LIBS -R $x_libraries"
29368else
29369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29370$as_echo "neither works" >&6; }
29371fi
29372rm -f core conftest.err conftest.$ac_objext \
29373    conftest$ac_exeext conftest.$ac_ext
29374fi
29375rm -f core conftest.err conftest.$ac_objext \
29376    conftest$ac_exeext conftest.$ac_ext
29377    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29378    LIBS=$ac_xsave_LIBS
29379  fi
29380
29381  # Check for system-dependent libraries X programs must link with.
29382  # Do this before checking for the system-independent R6 libraries
29383  # (-lICE), since we may need -lsocket or whatever for X linking.
29384
29385  if test "$ISC" = yes; then
29386    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29387  else
29388    # Martyn Johnson says this is needed for Ultrix, if the X
29389    # libraries were built with DECnet support.  And Karl Berry says
29390    # the Alpha needs dnet_stub (dnet does not exist).
29391    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29392    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29393/* end confdefs.h.  */
29394
29395/* Override any GCC internal prototype to avoid an error.
29396   Use char because int might match the return type of a GCC
29397   builtin and then its argument prototype would still apply.  */
29398#ifdef __cplusplus
29399extern "C"
29400#endif
29401char XOpenDisplay ();
29402int
29403main ()
29404{
29405return XOpenDisplay ();
29406  ;
29407  return 0;
29408}
29409_ACEOF
29410if ac_fn_cxx_try_link "$LINENO"; then :
29411
29412else
29413  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
29414$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29415if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
29416  $as_echo_n "(cached) " >&6
29417else
29418  ac_check_lib_save_LIBS=$LIBS
29419LIBS="-ldnet  $LIBS"
29420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29421/* end confdefs.h.  */
29422
29423/* Override any GCC internal prototype to avoid an error.
29424   Use char because int might match the return type of a GCC
29425   builtin and then its argument prototype would still apply.  */
29426#ifdef __cplusplus
29427extern "C"
29428#endif
29429char dnet_ntoa ();
29430int
29431main ()
29432{
29433return dnet_ntoa ();
29434  ;
29435  return 0;
29436}
29437_ACEOF
29438if ac_fn_cxx_try_link "$LINENO"; then :
29439  ac_cv_lib_dnet_dnet_ntoa=yes
29440else
29441  ac_cv_lib_dnet_dnet_ntoa=no
29442fi
29443rm -f core conftest.err conftest.$ac_objext \
29444    conftest$ac_exeext conftest.$ac_ext
29445LIBS=$ac_check_lib_save_LIBS
29446fi
29447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29448$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29449if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
29450  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29451fi
29452
29453    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
29454      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
29455$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
29456if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
29457  $as_echo_n "(cached) " >&6
29458else
29459  ac_check_lib_save_LIBS=$LIBS
29460LIBS="-ldnet_stub  $LIBS"
29461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29462/* end confdefs.h.  */
29463
29464/* Override any GCC internal prototype to avoid an error.
29465   Use char because int might match the return type of a GCC
29466   builtin and then its argument prototype would still apply.  */
29467#ifdef __cplusplus
29468extern "C"
29469#endif
29470char dnet_ntoa ();
29471int
29472main ()
29473{
29474return dnet_ntoa ();
29475  ;
29476  return 0;
29477}
29478_ACEOF
29479if ac_fn_cxx_try_link "$LINENO"; then :
29480  ac_cv_lib_dnet_stub_dnet_ntoa=yes
29481else
29482  ac_cv_lib_dnet_stub_dnet_ntoa=no
29483fi
29484rm -f core conftest.err conftest.$ac_objext \
29485    conftest$ac_exeext conftest.$ac_ext
29486LIBS=$ac_check_lib_save_LIBS
29487fi
29488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
29489$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
29490if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
29491  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
29492fi
29493
29494    fi
29495fi
29496rm -f core conftest.err conftest.$ac_objext \
29497    conftest$ac_exeext conftest.$ac_ext
29498    LIBS="$ac_xsave_LIBS"
29499
29500    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
29501    # to get the SysV transport functions.
29502    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
29503    # needs -lnsl.
29504    # The nsl library prevents programs from opening the X display
29505    # on Irix 5.2, according to T.E. Dickey.
29506    # The functions gethostbyname, getservbyname, and inet_addr are
29507    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
29508    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
29509if test "x$ac_cv_func_gethostbyname" = x""yes; then :
29510
29511fi
29512
29513    if test $ac_cv_func_gethostbyname = no; then
29514      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
29515$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
29516if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
29517  $as_echo_n "(cached) " >&6
29518else
29519  ac_check_lib_save_LIBS=$LIBS
29520LIBS="-lnsl  $LIBS"
29521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29522/* end confdefs.h.  */
29523
29524/* Override any GCC internal prototype to avoid an error.
29525   Use char because int might match the return type of a GCC
29526   builtin and then its argument prototype would still apply.  */
29527#ifdef __cplusplus
29528extern "C"
29529#endif
29530char gethostbyname ();
29531int
29532main ()
29533{
29534return gethostbyname ();
29535  ;
29536  return 0;
29537}
29538_ACEOF
29539if ac_fn_cxx_try_link "$LINENO"; then :
29540  ac_cv_lib_nsl_gethostbyname=yes
29541else
29542  ac_cv_lib_nsl_gethostbyname=no
29543fi
29544rm -f core conftest.err conftest.$ac_objext \
29545    conftest$ac_exeext conftest.$ac_ext
29546LIBS=$ac_check_lib_save_LIBS
29547fi
29548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29549$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29550if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
29551  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29552fi
29553
29554      if test $ac_cv_lib_nsl_gethostbyname = no; then
29555	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29556$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29557if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
29558  $as_echo_n "(cached) " >&6
29559else
29560  ac_check_lib_save_LIBS=$LIBS
29561LIBS="-lbsd  $LIBS"
29562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29563/* end confdefs.h.  */
29564
29565/* Override any GCC internal prototype to avoid an error.
29566   Use char because int might match the return type of a GCC
29567   builtin and then its argument prototype would still apply.  */
29568#ifdef __cplusplus
29569extern "C"
29570#endif
29571char gethostbyname ();
29572int
29573main ()
29574{
29575return gethostbyname ();
29576  ;
29577  return 0;
29578}
29579_ACEOF
29580if ac_fn_cxx_try_link "$LINENO"; then :
29581  ac_cv_lib_bsd_gethostbyname=yes
29582else
29583  ac_cv_lib_bsd_gethostbyname=no
29584fi
29585rm -f core conftest.err conftest.$ac_objext \
29586    conftest$ac_exeext conftest.$ac_ext
29587LIBS=$ac_check_lib_save_LIBS
29588fi
29589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29590$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29591if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
29592  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29593fi
29594
29595      fi
29596    fi
29597
29598    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29599    # socket/setsockopt and other routines are undefined under SCO ODT
29600    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29601    # on later versions), says Simon Leinen: it contains gethostby*
29602    # variants that don't use the name server (or something).  -lsocket
29603    # must be given before -lnsl if both are needed.  We assume that
29604    # if connect needs -lnsl, so does gethostbyname.
29605    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29606if test "x$ac_cv_func_connect" = x""yes; then :
29607
29608fi
29609
29610    if test $ac_cv_func_connect = no; then
29611      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29612$as_echo_n "checking for connect in -lsocket... " >&6; }
29613if test "${ac_cv_lib_socket_connect+set}" = set; then :
29614  $as_echo_n "(cached) " >&6
29615else
29616  ac_check_lib_save_LIBS=$LIBS
29617LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29619/* end confdefs.h.  */
29620
29621/* Override any GCC internal prototype to avoid an error.
29622   Use char because int might match the return type of a GCC
29623   builtin and then its argument prototype would still apply.  */
29624#ifdef __cplusplus
29625extern "C"
29626#endif
29627char connect ();
29628int
29629main ()
29630{
29631return connect ();
29632  ;
29633  return 0;
29634}
29635_ACEOF
29636if ac_fn_cxx_try_link "$LINENO"; then :
29637  ac_cv_lib_socket_connect=yes
29638else
29639  ac_cv_lib_socket_connect=no
29640fi
29641rm -f core conftest.err conftest.$ac_objext \
29642    conftest$ac_exeext conftest.$ac_ext
29643LIBS=$ac_check_lib_save_LIBS
29644fi
29645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29646$as_echo "$ac_cv_lib_socket_connect" >&6; }
29647if test "x$ac_cv_lib_socket_connect" = x""yes; then :
29648  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29649fi
29650
29651    fi
29652
29653    # Guillermo Gomez says -lposix is necessary on A/UX.
29654    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29655if test "x$ac_cv_func_remove" = x""yes; then :
29656
29657fi
29658
29659    if test $ac_cv_func_remove = no; then
29660      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29661$as_echo_n "checking for remove in -lposix... " >&6; }
29662if test "${ac_cv_lib_posix_remove+set}" = set; then :
29663  $as_echo_n "(cached) " >&6
29664else
29665  ac_check_lib_save_LIBS=$LIBS
29666LIBS="-lposix  $LIBS"
29667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29668/* end confdefs.h.  */
29669
29670/* Override any GCC internal prototype to avoid an error.
29671   Use char because int might match the return type of a GCC
29672   builtin and then its argument prototype would still apply.  */
29673#ifdef __cplusplus
29674extern "C"
29675#endif
29676char remove ();
29677int
29678main ()
29679{
29680return remove ();
29681  ;
29682  return 0;
29683}
29684_ACEOF
29685if ac_fn_cxx_try_link "$LINENO"; then :
29686  ac_cv_lib_posix_remove=yes
29687else
29688  ac_cv_lib_posix_remove=no
29689fi
29690rm -f core conftest.err conftest.$ac_objext \
29691    conftest$ac_exeext conftest.$ac_ext
29692LIBS=$ac_check_lib_save_LIBS
29693fi
29694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29695$as_echo "$ac_cv_lib_posix_remove" >&6; }
29696if test "x$ac_cv_lib_posix_remove" = x""yes; then :
29697  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29698fi
29699
29700    fi
29701
29702    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29703    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29704if test "x$ac_cv_func_shmat" = x""yes; then :
29705
29706fi
29707
29708    if test $ac_cv_func_shmat = no; then
29709      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29710$as_echo_n "checking for shmat in -lipc... " >&6; }
29711if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
29712  $as_echo_n "(cached) " >&6
29713else
29714  ac_check_lib_save_LIBS=$LIBS
29715LIBS="-lipc  $LIBS"
29716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29717/* end confdefs.h.  */
29718
29719/* Override any GCC internal prototype to avoid an error.
29720   Use char because int might match the return type of a GCC
29721   builtin and then its argument prototype would still apply.  */
29722#ifdef __cplusplus
29723extern "C"
29724#endif
29725char shmat ();
29726int
29727main ()
29728{
29729return shmat ();
29730  ;
29731  return 0;
29732}
29733_ACEOF
29734if ac_fn_cxx_try_link "$LINENO"; then :
29735  ac_cv_lib_ipc_shmat=yes
29736else
29737  ac_cv_lib_ipc_shmat=no
29738fi
29739rm -f core conftest.err conftest.$ac_objext \
29740    conftest$ac_exeext conftest.$ac_ext
29741LIBS=$ac_check_lib_save_LIBS
29742fi
29743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29744$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29745if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29746  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29747fi
29748
29749    fi
29750  fi
29751
29752  # Check for libraries that X11R6 Xt/Xaw programs need.
29753  ac_save_LDFLAGS=$LDFLAGS
29754  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29755  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29756  # check for ICE first), but we must link in the order -lSM -lICE or
29757  # we get undefined symbols.  So assume we have SM if we have ICE.
29758  # These have to be linked with before -lX11, unlike the other
29759  # libraries we check for below, so use a different variable.
29760  # John Interrante, Karl Berry
29761  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29762$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29763if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29764  $as_echo_n "(cached) " >&6
29765else
29766  ac_check_lib_save_LIBS=$LIBS
29767LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29769/* end confdefs.h.  */
29770
29771/* Override any GCC internal prototype to avoid an error.
29772   Use char because int might match the return type of a GCC
29773   builtin and then its argument prototype would still apply.  */
29774#ifdef __cplusplus
29775extern "C"
29776#endif
29777char IceConnectionNumber ();
29778int
29779main ()
29780{
29781return IceConnectionNumber ();
29782  ;
29783  return 0;
29784}
29785_ACEOF
29786if ac_fn_cxx_try_link "$LINENO"; then :
29787  ac_cv_lib_ICE_IceConnectionNumber=yes
29788else
29789  ac_cv_lib_ICE_IceConnectionNumber=no
29790fi
29791rm -f core conftest.err conftest.$ac_objext \
29792    conftest$ac_exeext conftest.$ac_ext
29793LIBS=$ac_check_lib_save_LIBS
29794fi
29795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29796$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29797if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29798  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29799fi
29800
29801  LDFLAGS=$ac_save_LDFLAGS
29802
29803fi
29804
29805
29806# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29807# this doesn't make sense so we remove it.
29808if test "x$COMPILE_TYPE" = xcross; then
29809  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29810fi
29811
29812if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29813
29814    # Print a helpful message on how to acquire the necessary build dependency.
29815    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29816    MISSING_DEPENDENCY=x11
29817    PKGHANDLER_COMMAND=
29818
29819    case $PKGHANDLER in
29820	apt-get)
29821                apt_help     $MISSING_DEPENDENCY ;;
29822    yum)
29823                yum_help     $MISSING_DEPENDENCY ;;
29824	port)
29825                port_help    $MISSING_DEPENDENCY ;;
29826	pkgutil)
29827                pkgutil_help $MISSING_DEPENDENCY ;;
29828	pkgadd)
29829                pkgadd_help  $MISSING_DEPENDENCY ;;
29830    * )
29831      break ;;
29832    esac
29833
29834    if test "x$PKGHANDLER_COMMAND" != x; then
29835        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29836    fi
29837
29838    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29839fi
29840
29841# Some of the old makefiles require a setting of OPENWIN_HOME
29842# Since the X11R6 directory has disappeared on later Linuxes,
29843# we need to probe for it.
29844if test "x$OPENJDK_TARGET_OS" = xlinux; then
29845    if test -d "$SYS_ROOT/usr/X11R6"; then
29846        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29847    fi
29848    if test -d "$SYS_ROOT/usr/include/X11"; then
29849        OPENWIN_HOME="$SYS_ROOT/usr"
29850    fi
29851fi
29852if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29853    OPENWIN_HOME="/usr/openwin"
29854fi
29855
29856
29857
29858#
29859# Weird Sol10 something check...TODO change to try compile
29860#
29861if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29862  if test "`uname -r`" = "5.10"; then
29863     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29864     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29865     fi
29866  fi
29867fi
29868
29869ac_ext=c
29870ac_cpp='$CPP $CPPFLAGS'
29871ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29872ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29873ac_compiler_gnu=$ac_cv_c_compiler_gnu
29874
29875OLD_CFLAGS="$CFLAGS"
29876CFLAGS="$CFLAGS $X_CFLAGS"
29877
29878# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29879for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29880do :
29881  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29882ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29883                   # include <X11/Xutil.h>
29884
29885"
29886if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29887  cat >>confdefs.h <<_ACEOF
29888#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29889_ACEOF
29890 X11_A_OK=yes
29891else
29892  X11_A_OK=no; break
29893fi
29894
29895done
29896
29897
29898CFLAGS="$OLD_CFLAGS"
29899ac_ext=cpp
29900ac_cpp='$CXXCPP $CPPFLAGS'
29901ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29902ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29903ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29904
29905
29906if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29907
29908    # Print a helpful message on how to acquire the necessary build dependency.
29909    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29910    MISSING_DEPENDENCY=x11
29911    PKGHANDLER_COMMAND=
29912
29913    case $PKGHANDLER in
29914	apt-get)
29915                apt_help     $MISSING_DEPENDENCY ;;
29916    yum)
29917                yum_help     $MISSING_DEPENDENCY ;;
29918	port)
29919                port_help    $MISSING_DEPENDENCY ;;
29920	pkgutil)
29921                pkgutil_help $MISSING_DEPENDENCY ;;
29922	pkgadd)
29923                pkgadd_help  $MISSING_DEPENDENCY ;;
29924    * )
29925      break ;;
29926    esac
29927
29928    if test "x$PKGHANDLER_COMMAND" != x; then
29929        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29930    fi
29931
29932    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29933fi
29934
29935
29936
29937
29938
29939
29940###############################################################################
29941#
29942# The common unix printing system cups is used to print from java.
29943#
29944
29945# Check whether --with-cups was given.
29946if test "${with_cups+set}" = set; then :
29947  withval=$with_cups;
29948fi
29949
29950
29951# Check whether --with-cups-include was given.
29952if test "${with_cups_include+set}" = set; then :
29953  withval=$with_cups_include;
29954fi
29955
29956
29957if test "x$CUPS_NOT_NEEDED" = xyes; then
29958	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29959		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29960$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29961	fi
29962	CUPS_CFLAGS=
29963else
29964	CUPS_FOUND=no
29965
29966	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29967	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29968	fi
29969
29970	if test "x${with_cups}" != x; then
29971	    CUPS_CFLAGS="-I${with_cups}/include"
29972	    CUPS_FOUND=yes
29973	fi
29974	if test "x${with_cups_include}" != x; then
29975	    CUPS_CFLAGS="-I${with_cups_include}"
29976	    CUPS_FOUND=yes
29977	fi
29978	if test "x$CUPS_FOUND" = xno; then
29979
29980
29981    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29982        # Source the builddeps file again, to make sure it uses the latest variables!
29983        . $builddepsfile
29984        # Look for a target and build machine specific resource!
29985        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29986        if test "x$resource" = x; then
29987            # Ok, lets instead look for a target specific resource
29988            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29989        fi
29990        if test "x$resource" = x; then
29991            # Ok, lets instead look for a build specific resource
29992            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29993        fi
29994        if test "x$resource" = x; then
29995            # Ok, lets instead look for a generic resource
29996            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29997            resource=${builddep_cups}
29998        fi
29999        if test "x$resource" != x; then
30000            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30001$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30002	    # If the resource in the builddeps.conf file is an existing directory,
30003	    # for example /java/linux/cups
30004	    if test -d ${resource}; then
30005	       depdir=${resource}
30006	    else
30007
30008# cups is for example mymodule
30009# $resource is for example libs/general/libmymod_1_2_3.zip
30010# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30011# $with_builddeps_dir is for example /localhome/builddeps
30012# depdir is the name of the variable into which we store the depdir, eg MYMOD
30013# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30014# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30015    filename=`basename $resource`
30016    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30017    filebase=${filename%%.*}
30018    extension=${filename#*.}
30019    installdir=$with_builddeps_dir/$filebase
30020    if test ! -f $installdir/$filename.unpacked; then
30021        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30022$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30023        if test ! -d $installdir; then
30024            mkdir -p $installdir
30025        fi
30026        if test ! -d $installdir; then
30027            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30028        fi
30029        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30030        touch $tmpfile
30031        if test ! -f $tmpfile; then
30032            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30033        fi
30034
30035    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30036    # $tmpfile is the local file name for the downloaded file.
30037    VALID_TOOL=no
30038    if test "x$BDEPS_FTP" = xwget; then
30039       VALID_TOOL=yes
30040       wget -O $tmpfile $with_builddeps_server/$resource
30041    fi
30042    if test "x$BDEPS_FTP" = xlftp; then
30043       VALID_TOOL=yes
30044       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30045    fi
30046    if test "x$BDEPS_FTP" = xftp; then
30047        VALID_TOOL=yes
30048        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30049        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30050        FTPUSERPWD=${FTPSERVER%%@*}
30051        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30052            FTPUSER=${userpwd%%:*}
30053            FTPPWD=${userpwd#*@}
30054            FTPSERVER=${FTPSERVER#*@}
30055        else
30056            FTPUSER=ftp
30057            FTPPWD=ftp
30058        fi
30059        # the "pass" command does not work on some
30060        # ftp clients (read ftp.exe) but if it works,
30061        # passive mode is better!
30062        (\
30063            echo "user $FTPUSER $FTPPWD"        ;\
30064            echo "pass"                         ;\
30065            echo "bin"                          ;\
30066            echo "get $FTPPATH $tmpfile"              ;\
30067        ) | ftp -in $FTPSERVER
30068    fi
30069    if test "x$VALID_TOOL" != xyes; then
30070       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30071    fi
30072
30073        mv $tmpfile $installdir/$filename
30074        if test ! -s $installdir/$filename; then
30075            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30076        fi
30077        case "$extension" in
30078            zip)  echo "Unzipping $installdir/$filename..."
30079               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30080            ;;
30081            tar.gz) echo "Untaring $installdir/$filename..."
30082               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30083            ;;
30084            tgz) echo "Untaring $installdir/$filename..."
30085               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30086            ;;
30087            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30088            ;;
30089        esac
30090    fi
30091    if test -f $installdir/$filename.unpacked; then
30092        depdir=$installdir
30093    fi
30094
30095	    fi
30096            # Source the builddeps file again, because in the previous command, the depdir
30097            # was updated to point at the current build dependency install directory.
30098            . $builddepsfile
30099            # Now extract variables from the builddeps.conf files.
30100            theroot=${builddep_cups_ROOT}
30101            thecflags=${builddep_cups_CFLAGS}
30102            thelibs=${builddep_cups_LIBS}
30103            if test "x$depdir" = x; then
30104                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30105            fi
30106            CUPS=$depdir
30107            if test "x$theroot" != x; then
30108               CUPS="$theroot"
30109            fi
30110            if test "x$thecflags" != x; then
30111               CUPS_CFLAGS="$thecflags"
30112            fi
30113            if test "x$thelibs" != x; then
30114               CUPS_LIBS="$thelibs"
30115            fi
30116            CUPS_FOUND=yes
30117
30118        fi
30119
30120    fi
30121
30122	fi
30123	if test "x$CUPS_FOUND" = xno; then
30124	    # Are the cups headers installed in the default /usr/include location?
30125	    for ac_header in cups/cups.h cups/ppd.h
30126do :
30127  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30128ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30129if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30130  cat >>confdefs.h <<_ACEOF
30131#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30132_ACEOF
30133 CUPS_FOUND=yes
30134	                      CUPS_CFLAGS=
30135	                      DEFAULT_CUPS=yes
30136fi
30137
30138done
30139
30140	fi
30141	if test "x$CUPS_FOUND" = xno; then
30142	    # Getting nervous now? Lets poke around for standard Solaris third-party
30143	    # package installation locations.
30144	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30145$as_echo_n "checking for cups headers... " >&6; }
30146	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30147	       # An SFW package seems to be installed!
30148	       CUPS_FOUND=yes
30149	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30150	    elif test -s /opt/csw/include/cups/cups.h; then
30151	       # A CSW package seems to be installed!
30152	       CUPS_FOUND=yes
30153	       CUPS_CFLAGS="-I/opt/csw/include"
30154	    fi
30155	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30156$as_echo "$CUPS_FOUND" >&6; }
30157	fi
30158	if test "x$CUPS_FOUND" = xno; then
30159
30160    # Print a helpful message on how to acquire the necessary build dependency.
30161    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30162    MISSING_DEPENDENCY=cups
30163    PKGHANDLER_COMMAND=
30164
30165    case $PKGHANDLER in
30166	apt-get)
30167                apt_help     $MISSING_DEPENDENCY ;;
30168    yum)
30169                yum_help     $MISSING_DEPENDENCY ;;
30170	port)
30171                port_help    $MISSING_DEPENDENCY ;;
30172	pkgutil)
30173                pkgutil_help $MISSING_DEPENDENCY ;;
30174	pkgadd)
30175                pkgadd_help  $MISSING_DEPENDENCY ;;
30176    * )
30177      break ;;
30178    esac
30179
30180    if test "x$PKGHANDLER_COMMAND" != x; then
30181        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30182    fi
30183
30184	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30185	fi
30186fi
30187
30188
30189
30190
30191
30192
30193###############################################################################
30194#
30195# The ubiquitous freetype2 library is used to render fonts.
30196#
30197
30198# Check whether --with-freetype was given.
30199if test "${with_freetype+set}" = set; then :
30200  withval=$with_freetype;
30201fi
30202
30203
30204# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30205USING_SYSTEM_FT_LIB=false
30206
30207if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30208	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30209		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30210$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30211	fi
30212	FREETYPE2_CFLAGS=
30213	FREETYPE2_LIBS=
30214        FREETYPE2_LIB_PATH=
30215else
30216	FREETYPE2_FOUND=no
30217
30218	if test "x$with_freetype" != x; then
30219
30220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30221
30222  # Input might be given as Windows format, start by converting to
30223  # unix format.
30224  path="$with_freetype"
30225  new_path=`$CYGPATH -u "$path"`
30226
30227  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30228  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30229  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30230  # "foo.exe" is OK but "foo" is an error.
30231  #
30232  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30233  # It is also a way to make sure we got the proper file name for the real test later on.
30234  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30235  if test "x$test_shortpath" = x; then
30236    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30237$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30238    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30239  fi
30240
30241  # Call helper function which possibly converts this using DOS-style short mode.
30242  # If so, the updated path is stored in $new_path.
30243
30244  input_path="$new_path"
30245  # Check if we need to convert this using DOS-style short mode. If the path
30246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30247  # take no chances and rewrite it.
30248  # Note: m4 eats our [], so we need to use [ and ] instead.
30249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30250  if test "x$has_forbidden_chars" != x; then
30251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30252    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30253    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30254    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30255      # Going to short mode and back again did indeed matter. Since short mode is
30256      # case insensitive, let's make it lowercase to improve readability.
30257      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30258      # Now convert it back to Unix-stile (cygpath)
30259      input_path=`$CYGPATH -u "$shortmode_path"`
30260      new_path="$input_path"
30261    fi
30262  fi
30263
30264  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30265  if test "x$test_cygdrive_prefix" = x; then
30266    # As a simple fix, exclude /usr/bin since it's not a real path.
30267    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30268      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30269      # a path prefixed by /cygdrive for fixpath to work.
30270      new_path="$CYGWIN_ROOT_PATH$input_path"
30271    fi
30272  fi
30273
30274
30275  if test "x$path" != "x$new_path"; then
30276    with_freetype="$new_path"
30277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30278$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30279  fi
30280
30281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30282
30283  path="$with_freetype"
30284  has_colon=`$ECHO $path | $GREP ^.:`
30285  new_path="$path"
30286  if test "x$has_colon" = x; then
30287    # Not in mixed or Windows style, start by that.
30288    new_path=`cmd //c echo $path`
30289  fi
30290
30291
30292  input_path="$new_path"
30293  # Check if we need to convert this using DOS-style short mode. If the path
30294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30295  # take no chances and rewrite it.
30296  # Note: m4 eats our [], so we need to use [ and ] instead.
30297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30298  if test "x$has_forbidden_chars" != x; then
30299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30301  fi
30302
30303
30304  windows_path="$new_path"
30305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30306    unix_path=`$CYGPATH -u "$windows_path"`
30307    new_path="$unix_path"
30308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30310    new_path="$unix_path"
30311  fi
30312
30313  if test "x$path" != "x$new_path"; then
30314    with_freetype="$new_path"
30315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30316$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30317  fi
30318
30319  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30320  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30321
30322  else
30323    # We're on a posix platform. Hooray! :)
30324    path="$with_freetype"
30325
30326    if test ! -f "$path" && test ! -d "$path"; then
30327      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30328    fi
30329
30330    has_space=`$ECHO "$path" | $GREP " "`
30331    if test "x$has_space" != x; then
30332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30333$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30334      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30335    fi
30336  fi
30337
30338	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30339            FREETYPE2_LIB_PATH="$with_freetype/lib"
30340            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30341                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30342                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30343            fi
30344            if test "x$OPENJDK_TARGET_OS" = xwindows; then
30345                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30346            fi
30347	    FREETYPE2_CFLAGS="-I$with_freetype/include"
30348            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30349                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30350            fi
30351 	    FREETYPE2_FOUND=yes
30352   	    if test "x$FREETYPE2_FOUND" = xyes; then
30353	        # Verify that the directories exist
30354                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30355		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30356		fi
30357	        # List the contents of the lib.
30358		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30359                if test "x$FREETYPELIB" = x; then
30360		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30361		fi
30362	        # Check one h-file
30363                if ! test -s "$with_freetype/include/ft2build.h"; then
30364		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30365		fi
30366            fi
30367        fi
30368	if test "x$FREETYPE2_FOUND" = xno; then
30369
30370
30371    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30372        # Source the builddeps file again, to make sure it uses the latest variables!
30373        . $builddepsfile
30374        # Look for a target and build machine specific resource!
30375        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30376        if test "x$resource" = x; then
30377            # Ok, lets instead look for a target specific resource
30378            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30379        fi
30380        if test "x$resource" = x; then
30381            # Ok, lets instead look for a build specific resource
30382            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30383        fi
30384        if test "x$resource" = x; then
30385            # Ok, lets instead look for a generic resource
30386            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30387            resource=${builddep_freetype2}
30388        fi
30389        if test "x$resource" != x; then
30390            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
30391$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
30392	    # If the resource in the builddeps.conf file is an existing directory,
30393	    # for example /java/linux/cups
30394	    if test -d ${resource}; then
30395	       depdir=${resource}
30396	    else
30397
30398# freetype2 is for example mymodule
30399# $resource is for example libs/general/libmymod_1_2_3.zip
30400# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30401# $with_builddeps_dir is for example /localhome/builddeps
30402# depdir is the name of the variable into which we store the depdir, eg MYMOD
30403# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30404# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30405    filename=`basename $resource`
30406    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30407    filebase=${filename%%.*}
30408    extension=${filename#*.}
30409    installdir=$with_builddeps_dir/$filebase
30410    if test ! -f $installdir/$filename.unpacked; then
30411        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
30412$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30413        if test ! -d $installdir; then
30414            mkdir -p $installdir
30415        fi
30416        if test ! -d $installdir; then
30417            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30418        fi
30419        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
30420        touch $tmpfile
30421        if test ! -f $tmpfile; then
30422            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30423        fi
30424
30425    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30426    # $tmpfile is the local file name for the downloaded file.
30427    VALID_TOOL=no
30428    if test "x$BDEPS_FTP" = xwget; then
30429       VALID_TOOL=yes
30430       wget -O $tmpfile $with_builddeps_server/$resource
30431    fi
30432    if test "x$BDEPS_FTP" = xlftp; then
30433       VALID_TOOL=yes
30434       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30435    fi
30436    if test "x$BDEPS_FTP" = xftp; then
30437        VALID_TOOL=yes
30438        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30439        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30440        FTPUSERPWD=${FTPSERVER%%@*}
30441        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30442            FTPUSER=${userpwd%%:*}
30443            FTPPWD=${userpwd#*@}
30444            FTPSERVER=${FTPSERVER#*@}
30445        else
30446            FTPUSER=ftp
30447            FTPPWD=ftp
30448        fi
30449        # the "pass" command does not work on some
30450        # ftp clients (read ftp.exe) but if it works,
30451        # passive mode is better!
30452        (\
30453            echo "user $FTPUSER $FTPPWD"        ;\
30454            echo "pass"                         ;\
30455            echo "bin"                          ;\
30456            echo "get $FTPPATH $tmpfile"              ;\
30457        ) | ftp -in $FTPSERVER
30458    fi
30459    if test "x$VALID_TOOL" != xyes; then
30460       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30461    fi
30462
30463        mv $tmpfile $installdir/$filename
30464        if test ! -s $installdir/$filename; then
30465            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30466        fi
30467        case "$extension" in
30468            zip)  echo "Unzipping $installdir/$filename..."
30469               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30470            ;;
30471            tar.gz) echo "Untaring $installdir/$filename..."
30472               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30473            ;;
30474            tgz) echo "Untaring $installdir/$filename..."
30475               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30476            ;;
30477            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30478            ;;
30479        esac
30480    fi
30481    if test -f $installdir/$filename.unpacked; then
30482        depdir=$installdir
30483    fi
30484
30485	    fi
30486            # Source the builddeps file again, because in the previous command, the depdir
30487            # was updated to point at the current build dependency install directory.
30488            . $builddepsfile
30489            # Now extract variables from the builddeps.conf files.
30490            theroot=${builddep_freetype2_ROOT}
30491            thecflags=${builddep_freetype2_CFLAGS}
30492            thelibs=${builddep_freetype2_LIBS}
30493            if test "x$depdir" = x; then
30494                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
30495            fi
30496            FREETYPE2=$depdir
30497            if test "x$theroot" != x; then
30498               FREETYPE2="$theroot"
30499            fi
30500            if test "x$thecflags" != x; then
30501               FREETYPE2_CFLAGS="$thecflags"
30502            fi
30503            if test "x$thelibs" != x; then
30504               FREETYPE2_LIBS="$thelibs"
30505            fi
30506            FREETYPE2_FOUND=yes
30507            else FREETYPE2_FOUND=no
30508
30509        fi
30510        else FREETYPE2_FOUND=no
30511
30512    fi
30513
30514            USING_SYSTEM_FT_LIB=true
30515	fi
30516	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
30517            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
30518
30519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30520
30521  # Input might be given as Windows format, start by converting to
30522  # unix format.
30523  path="$FREETYPELOCATION"
30524  new_path=`$CYGPATH -u "$path"`
30525
30526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30529  # "foo.exe" is OK but "foo" is an error.
30530  #
30531  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30532  # It is also a way to make sure we got the proper file name for the real test later on.
30533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30534  if test "x$test_shortpath" = x; then
30535    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30536$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30537    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
30538  fi
30539
30540  # Call helper function which possibly converts this using DOS-style short mode.
30541  # If so, the updated path is stored in $new_path.
30542
30543  input_path="$new_path"
30544  # Check if we need to convert this using DOS-style short mode. If the path
30545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30546  # take no chances and rewrite it.
30547  # Note: m4 eats our [], so we need to use [ and ] instead.
30548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30549  if test "x$has_forbidden_chars" != x; then
30550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30554      # Going to short mode and back again did indeed matter. Since short mode is
30555      # case insensitive, let's make it lowercase to improve readability.
30556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30557      # Now convert it back to Unix-stile (cygpath)
30558      input_path=`$CYGPATH -u "$shortmode_path"`
30559      new_path="$input_path"
30560    fi
30561  fi
30562
30563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30564  if test "x$test_cygdrive_prefix" = x; then
30565    # As a simple fix, exclude /usr/bin since it's not a real path.
30566    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30568      # a path prefixed by /cygdrive for fixpath to work.
30569      new_path="$CYGWIN_ROOT_PATH$input_path"
30570    fi
30571  fi
30572
30573
30574  if test "x$path" != "x$new_path"; then
30575    FREETYPELOCATION="$new_path"
30576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30577$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30578  fi
30579
30580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30581
30582  path="$FREETYPELOCATION"
30583  has_colon=`$ECHO $path | $GREP ^.:`
30584  new_path="$path"
30585  if test "x$has_colon" = x; then
30586    # Not in mixed or Windows style, start by that.
30587    new_path=`cmd //c echo $path`
30588  fi
30589
30590
30591  input_path="$new_path"
30592  # Check if we need to convert this using DOS-style short mode. If the path
30593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30594  # take no chances and rewrite it.
30595  # Note: m4 eats our [], so we need to use [ and ] instead.
30596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30597  if test "x$has_forbidden_chars" != x; then
30598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30600  fi
30601
30602
30603  windows_path="$new_path"
30604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30605    unix_path=`$CYGPATH -u "$windows_path"`
30606    new_path="$unix_path"
30607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30609    new_path="$unix_path"
30610  fi
30611
30612  if test "x$path" != "x$new_path"; then
30613    FREETYPELOCATION="$new_path"
30614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30615$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30616  fi
30617
30618  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30619  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30620
30621  else
30622    # We're on a posix platform. Hooray! :)
30623    path="$FREETYPELOCATION"
30624
30625    if test ! -f "$path" && test ! -d "$path"; then
30626      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30627    fi
30628
30629    has_space=`$ECHO "$path" | $GREP " "`
30630    if test "x$has_space" != x; then
30631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30632$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30633      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30634    fi
30635  fi
30636
30637	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30638$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30639	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30640	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30641	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30642 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30643                if ! test -s "$FREETYPE2_LIBS"; then
30644		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30645		fi
30646                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30647		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30648		fi
30649                USING_SYSTEM_FT_LIB=true
30650                FREETYPE2_FOUND=yes
30651	    fi
30652	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30653$as_echo "$FREETYPE2_FOUND" >&6; }
30654        fi
30655	if test "x$FREETYPE2_FOUND" = xno; then
30656
30657pkg_failed=no
30658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30659$as_echo_n "checking for FREETYPE2... " >&6; }
30660
30661if test -n "$FREETYPE2_CFLAGS"; then
30662    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30663 elif test -n "$PKG_CONFIG"; then
30664    if test -n "$PKG_CONFIG" && \
30665    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30666  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30667  ac_status=$?
30668  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30669  test $ac_status = 0; }; then
30670  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30671else
30672  pkg_failed=yes
30673fi
30674 else
30675    pkg_failed=untried
30676fi
30677if test -n "$FREETYPE2_LIBS"; then
30678    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30679 elif test -n "$PKG_CONFIG"; then
30680    if test -n "$PKG_CONFIG" && \
30681    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30682  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30683  ac_status=$?
30684  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30685  test $ac_status = 0; }; then
30686  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30687else
30688  pkg_failed=yes
30689fi
30690 else
30691    pkg_failed=untried
30692fi
30693
30694
30695
30696if test $pkg_failed = yes; then
30697
30698if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30699        _pkg_short_errors_supported=yes
30700else
30701        _pkg_short_errors_supported=no
30702fi
30703        if test $_pkg_short_errors_supported = yes; then
30704	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30705        else
30706	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30707        fi
30708	# Put the nasty error message in config.log where it belongs
30709	echo "$FREETYPE2_PKG_ERRORS" >&5
30710
30711	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30712$as_echo "no" >&6; }
30713                FREETYPE2_FOUND=no
30714elif test $pkg_failed = untried; then
30715	FREETYPE2_FOUND=no
30716else
30717	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30718	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30720$as_echo "yes" >&6; }
30721	FREETYPE2_FOUND=yes
30722fi
30723            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30724            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30725            USING_SYSTEM_FT_LIB=true
30726            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30727            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30728              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30729            fi
30730	fi
30731	if test "x$FREETYPE2_FOUND" = xno; then
30732	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30733$as_echo_n "checking for freetype in some standard locations... " >&6; }
30734
30735	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30736	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30737	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30738	    fi
30739	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30740	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30741	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30742	    fi
30743
30744	    PREV_CXXCFLAGS="$CXXFLAGS"
30745	    PREV_LDFLAGS="$LDFLAGS"
30746	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30747	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30748	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30749/* end confdefs.h.  */
30750#include<ft2build.h>
30751	                    #include FT_FREETYPE_H
30752	                   int main() { return 0; }
30753
30754_ACEOF
30755if ac_fn_cxx_try_link "$LINENO"; then :
30756
30757	                      # Yes, the default cflags and libs did the trick.
30758	                      FREETYPE2_FOUND=yes
30759	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30760	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30761
30762else
30763
30764	                      FREETYPE2_FOUND=no
30765
30766fi
30767rm -f core conftest.err conftest.$ac_objext \
30768    conftest$ac_exeext conftest.$ac_ext
30769            CXXCFLAGS="$PREV_CXXFLAGS"
30770	    LDFLAGS="$PREV_LDFLAGS"
30771	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30772$as_echo "$FREETYPE2_FOUND" >&6; }
30773            USING_SYSTEM_FT_LIB=true
30774	fi
30775	if test "x$FREETYPE2_FOUND" = xno; then
30776
30777    # Print a helpful message on how to acquire the necessary build dependency.
30778    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30779    MISSING_DEPENDENCY=freetype2
30780    PKGHANDLER_COMMAND=
30781
30782    case $PKGHANDLER in
30783	apt-get)
30784                apt_help     $MISSING_DEPENDENCY ;;
30785    yum)
30786                yum_help     $MISSING_DEPENDENCY ;;
30787	port)
30788                port_help    $MISSING_DEPENDENCY ;;
30789	pkgutil)
30790                pkgutil_help $MISSING_DEPENDENCY ;;
30791	pkgadd)
30792                pkgadd_help  $MISSING_DEPENDENCY ;;
30793    * )
30794      break ;;
30795    esac
30796
30797    if test "x$PKGHANDLER_COMMAND" != x; then
30798        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30799    fi
30800
30801		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30802	fi
30803
30804        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30805            # AC_CHECK_LIB does not support use of cl.exe
30806            PREV_LDFLAGS="$LDFLAGS"
30807            LDFLAGS="$FREETYPE2_LIBS"
30808            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30809$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30810if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30811  $as_echo_n "(cached) " >&6
30812else
30813  ac_check_lib_save_LIBS=$LIBS
30814LIBS="-lfreetype  $LIBS"
30815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30816/* end confdefs.h.  */
30817
30818/* Override any GCC internal prototype to avoid an error.
30819   Use char because int might match the return type of a GCC
30820   builtin and then its argument prototype would still apply.  */
30821#ifdef __cplusplus
30822extern "C"
30823#endif
30824char FT_Init_FreeType ();
30825int
30826main ()
30827{
30828return FT_Init_FreeType ();
30829  ;
30830  return 0;
30831}
30832_ACEOF
30833if ac_fn_cxx_try_link "$LINENO"; then :
30834  ac_cv_lib_freetype_FT_Init_FreeType=yes
30835else
30836  ac_cv_lib_freetype_FT_Init_FreeType=no
30837fi
30838rm -f core conftest.err conftest.$ac_objext \
30839    conftest$ac_exeext conftest.$ac_ext
30840LIBS=$ac_check_lib_save_LIBS
30841fi
30842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30843$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30844if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30845  FREETYPE2_FOUND=true
30846else
30847  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30848fi
30849
30850            LDFLAGS="$PREV_LDFLAGS"
30851        fi
30852fi
30853
30854
30855
30856
30857
30858
30859
30860
30861
30862###############################################################################
30863#
30864# Check for alsa headers and libraries. Used on Linux/GNU systems.
30865#
30866
30867# Check whether --with-alsa was given.
30868if test "${with_alsa+set}" = set; then :
30869  withval=$with_alsa;
30870fi
30871
30872
30873# Check whether --with-alsa-include was given.
30874if test "${with_alsa_include+set}" = set; then :
30875  withval=$with_alsa_include;
30876fi
30877
30878
30879# Check whether --with-alsa-lib was given.
30880if test "${with_alsa_lib+set}" = set; then :
30881  withval=$with_alsa_lib;
30882fi
30883
30884
30885if test "x$ALSA_NOT_NEEDED" = xyes; then
30886	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30887		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30888$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30889	fi
30890	ALSA_CFLAGS=
30891	ALSA_LIBS=
30892else
30893	ALSA_FOUND=no
30894
30895	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30896	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30897	fi
30898
30899	if test "x${with_alsa}" != x; then
30900	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30901	    ALSA_CFLAGS="-I${with_alsa}/include"
30902	    ALSA_FOUND=yes
30903	fi
30904	if test "x${with_alsa_include}" != x; then
30905	    ALSA_CFLAGS="-I${with_alsa_include}"
30906	    ALSA_FOUND=yes
30907	fi
30908	if test "x${with_alsa_lib}" != x; then
30909	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30910	    ALSA_FOUND=yes
30911	fi
30912	if test "x$ALSA_FOUND" = xno; then
30913
30914
30915    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30916        # Source the builddeps file again, to make sure it uses the latest variables!
30917        . $builddepsfile
30918        # Look for a target and build machine specific resource!
30919        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30920        if test "x$resource" = x; then
30921            # Ok, lets instead look for a target specific resource
30922            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30923        fi
30924        if test "x$resource" = x; then
30925            # Ok, lets instead look for a build specific resource
30926            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30927        fi
30928        if test "x$resource" = x; then
30929            # Ok, lets instead look for a generic resource
30930            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30931            resource=${builddep_alsa}
30932        fi
30933        if test "x$resource" != x; then
30934            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30935$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30936	    # If the resource in the builddeps.conf file is an existing directory,
30937	    # for example /java/linux/cups
30938	    if test -d ${resource}; then
30939	       depdir=${resource}
30940	    else
30941
30942# alsa is for example mymodule
30943# $resource is for example libs/general/libmymod_1_2_3.zip
30944# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30945# $with_builddeps_dir is for example /localhome/builddeps
30946# depdir is the name of the variable into which we store the depdir, eg MYMOD
30947# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30948# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30949    filename=`basename $resource`
30950    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30951    filebase=${filename%%.*}
30952    extension=${filename#*.}
30953    installdir=$with_builddeps_dir/$filebase
30954    if test ! -f $installdir/$filename.unpacked; then
30955        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30956$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30957        if test ! -d $installdir; then
30958            mkdir -p $installdir
30959        fi
30960        if test ! -d $installdir; then
30961            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30962        fi
30963        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30964        touch $tmpfile
30965        if test ! -f $tmpfile; then
30966            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30967        fi
30968
30969    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30970    # $tmpfile is the local file name for the downloaded file.
30971    VALID_TOOL=no
30972    if test "x$BDEPS_FTP" = xwget; then
30973       VALID_TOOL=yes
30974       wget -O $tmpfile $with_builddeps_server/$resource
30975    fi
30976    if test "x$BDEPS_FTP" = xlftp; then
30977       VALID_TOOL=yes
30978       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30979    fi
30980    if test "x$BDEPS_FTP" = xftp; then
30981        VALID_TOOL=yes
30982        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30983        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30984        FTPUSERPWD=${FTPSERVER%%@*}
30985        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30986            FTPUSER=${userpwd%%:*}
30987            FTPPWD=${userpwd#*@}
30988            FTPSERVER=${FTPSERVER#*@}
30989        else
30990            FTPUSER=ftp
30991            FTPPWD=ftp
30992        fi
30993        # the "pass" command does not work on some
30994        # ftp clients (read ftp.exe) but if it works,
30995        # passive mode is better!
30996        (\
30997            echo "user $FTPUSER $FTPPWD"        ;\
30998            echo "pass"                         ;\
30999            echo "bin"                          ;\
31000            echo "get $FTPPATH $tmpfile"              ;\
31001        ) | ftp -in $FTPSERVER
31002    fi
31003    if test "x$VALID_TOOL" != xyes; then
31004       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31005    fi
31006
31007        mv $tmpfile $installdir/$filename
31008        if test ! -s $installdir/$filename; then
31009            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31010        fi
31011        case "$extension" in
31012            zip)  echo "Unzipping $installdir/$filename..."
31013               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31014            ;;
31015            tar.gz) echo "Untaring $installdir/$filename..."
31016               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31017            ;;
31018            tgz) echo "Untaring $installdir/$filename..."
31019               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31020            ;;
31021            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31022            ;;
31023        esac
31024    fi
31025    if test -f $installdir/$filename.unpacked; then
31026        depdir=$installdir
31027    fi
31028
31029	    fi
31030            # Source the builddeps file again, because in the previous command, the depdir
31031            # was updated to point at the current build dependency install directory.
31032            . $builddepsfile
31033            # Now extract variables from the builddeps.conf files.
31034            theroot=${builddep_alsa_ROOT}
31035            thecflags=${builddep_alsa_CFLAGS}
31036            thelibs=${builddep_alsa_LIBS}
31037            if test "x$depdir" = x; then
31038                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31039            fi
31040            ALSA=$depdir
31041            if test "x$theroot" != x; then
31042               ALSA="$theroot"
31043            fi
31044            if test "x$thecflags" != x; then
31045               ALSA_CFLAGS="$thecflags"
31046            fi
31047            if test "x$thelibs" != x; then
31048               ALSA_LIBS="$thelibs"
31049            fi
31050            ALSA_FOUND=yes
31051            else ALSA_FOUND=no
31052
31053        fi
31054        else ALSA_FOUND=no
31055
31056    fi
31057
31058	fi
31059	if test "x$ALSA_FOUND" = xno; then
31060
31061pkg_failed=no
31062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31063$as_echo_n "checking for ALSA... " >&6; }
31064
31065if test -n "$ALSA_CFLAGS"; then
31066    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31067 elif test -n "$PKG_CONFIG"; then
31068    if test -n "$PKG_CONFIG" && \
31069    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31070  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31071  ac_status=$?
31072  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31073  test $ac_status = 0; }; then
31074  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31075else
31076  pkg_failed=yes
31077fi
31078 else
31079    pkg_failed=untried
31080fi
31081if test -n "$ALSA_LIBS"; then
31082    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31083 elif test -n "$PKG_CONFIG"; then
31084    if test -n "$PKG_CONFIG" && \
31085    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31086  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31087  ac_status=$?
31088  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31089  test $ac_status = 0; }; then
31090  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31091else
31092  pkg_failed=yes
31093fi
31094 else
31095    pkg_failed=untried
31096fi
31097
31098
31099
31100if test $pkg_failed = yes; then
31101
31102if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31103        _pkg_short_errors_supported=yes
31104else
31105        _pkg_short_errors_supported=no
31106fi
31107        if test $_pkg_short_errors_supported = yes; then
31108	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31109        else
31110	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31111        fi
31112	# Put the nasty error message in config.log where it belongs
31113	echo "$ALSA_PKG_ERRORS" >&5
31114
31115	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31116$as_echo "no" >&6; }
31117                ALSA_FOUND=no
31118elif test $pkg_failed = untried; then
31119	ALSA_FOUND=no
31120else
31121	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31122	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31124$as_echo "yes" >&6; }
31125	ALSA_FOUND=yes
31126fi
31127	fi
31128	if test "x$ALSA_FOUND" = xno; then
31129	    for ac_header in alsa/asoundlib.h
31130do :
31131  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31132if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
31133  cat >>confdefs.h <<_ACEOF
31134#define HAVE_ALSA_ASOUNDLIB_H 1
31135_ACEOF
31136 ALSA_FOUND=yes
31137	                      ALSA_CFLAGS=-Iignoreme
31138	                      ALSA_LIBS=-lasound
31139	                      DEFAULT_ALSA=yes
31140else
31141  ALSA_FOUND=no
31142fi
31143
31144done
31145
31146	fi
31147	if test "x$ALSA_FOUND" = xno; then
31148
31149    # Print a helpful message on how to acquire the necessary build dependency.
31150    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31151    MISSING_DEPENDENCY=alsa
31152    PKGHANDLER_COMMAND=
31153
31154    case $PKGHANDLER in
31155	apt-get)
31156                apt_help     $MISSING_DEPENDENCY ;;
31157    yum)
31158                yum_help     $MISSING_DEPENDENCY ;;
31159	port)
31160                port_help    $MISSING_DEPENDENCY ;;
31161	pkgutil)
31162                pkgutil_help $MISSING_DEPENDENCY ;;
31163	pkgadd)
31164                pkgadd_help  $MISSING_DEPENDENCY ;;
31165    * )
31166      break ;;
31167    esac
31168
31169    if test "x$PKGHANDLER_COMMAND" != x; then
31170        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31171    fi
31172
31173	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31174	fi
31175fi
31176
31177
31178
31179
31180
31181
31182
31183###############################################################################
31184#
31185# Check for the jpeg library
31186#
31187
31188USE_EXTERNAL_LIBJPEG=true
31189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31190$as_echo_n "checking for main in -ljpeg... " >&6; }
31191if test "${ac_cv_lib_jpeg_main+set}" = set; then :
31192  $as_echo_n "(cached) " >&6
31193else
31194  ac_check_lib_save_LIBS=$LIBS
31195LIBS="-ljpeg  $LIBS"
31196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31197/* end confdefs.h.  */
31198
31199
31200int
31201main ()
31202{
31203return main ();
31204  ;
31205  return 0;
31206}
31207_ACEOF
31208if ac_fn_cxx_try_link "$LINENO"; then :
31209  ac_cv_lib_jpeg_main=yes
31210else
31211  ac_cv_lib_jpeg_main=no
31212fi
31213rm -f core conftest.err conftest.$ac_objext \
31214    conftest$ac_exeext conftest.$ac_ext
31215LIBS=$ac_check_lib_save_LIBS
31216fi
31217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31218$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31219if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
31220  cat >>confdefs.h <<_ACEOF
31221#define HAVE_LIBJPEG 1
31222_ACEOF
31223
31224  LIBS="-ljpeg $LIBS"
31225
31226else
31227   USE_EXTERNAL_LIBJPEG=false
31228               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31229$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31230
31231fi
31232
31233
31234
31235###############################################################################
31236#
31237# Check for the gif library
31238#
31239
31240
31241# Check whether --with-giflib was given.
31242if test "${with_giflib+set}" = set; then :
31243  withval=$with_giflib;
31244fi
31245
31246
31247
31248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
31249$as_echo_n "checking for which giflib to use... " >&6; }
31250
31251# default is bundled
31252DEFAULT_GIFLIB=bundled
31253
31254#
31255# if user didn't specify, use DEFAULT_GIFLIB
31256#
31257if test "x${with_giflib}" = "x"; then
31258    with_giflib=${DEFAULT_GIFLIB}
31259fi
31260
31261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
31262$as_echo "${with_giflib}" >&6; }
31263
31264if test "x${with_giflib}" = "xbundled"; then
31265    USE_EXTERNAL_LIBGIF=false
31266elif test "x${with_giflib}" = "xsystem"; then
31267    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31268if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
31269
31270else
31271   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
31272fi
31273
31274
31275    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
31276$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
31277if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
31278  $as_echo_n "(cached) " >&6
31279else
31280  ac_check_lib_save_LIBS=$LIBS
31281LIBS="-lgif  $LIBS"
31282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31283/* end confdefs.h.  */
31284
31285/* Override any GCC internal prototype to avoid an error.
31286   Use char because int might match the return type of a GCC
31287   builtin and then its argument prototype would still apply.  */
31288#ifdef __cplusplus
31289extern "C"
31290#endif
31291char DGifGetCode ();
31292int
31293main ()
31294{
31295return DGifGetCode ();
31296  ;
31297  return 0;
31298}
31299_ACEOF
31300if ac_fn_cxx_try_link "$LINENO"; then :
31301  ac_cv_lib_gif_DGifGetCode=yes
31302else
31303  ac_cv_lib_gif_DGifGetCode=no
31304fi
31305rm -f core conftest.err conftest.$ac_objext \
31306    conftest$ac_exeext conftest.$ac_ext
31307LIBS=$ac_check_lib_save_LIBS
31308fi
31309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
31310$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
31311if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
31312  cat >>confdefs.h <<_ACEOF
31313#define HAVE_LIBGIF 1
31314_ACEOF
31315
31316  LIBS="-lgif $LIBS"
31317
31318else
31319   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
31320fi
31321
31322
31323    USE_EXTERNAL_LIBGIF=true
31324else
31325    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
31326fi
31327
31328
31329###############################################################################
31330#
31331# Check for the zlib library
31332#
31333
31334
31335# Check whether --with-zlib was given.
31336if test "${with_zlib+set}" = set; then :
31337  withval=$with_zlib;
31338fi
31339
31340
31341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31342$as_echo_n "checking for compress in -lz... " >&6; }
31343if test "${ac_cv_lib_z_compress+set}" = set; then :
31344  $as_echo_n "(cached) " >&6
31345else
31346  ac_check_lib_save_LIBS=$LIBS
31347LIBS="-lz  $LIBS"
31348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31349/* end confdefs.h.  */
31350
31351/* Override any GCC internal prototype to avoid an error.
31352   Use char because int might match the return type of a GCC
31353   builtin and then its argument prototype would still apply.  */
31354#ifdef __cplusplus
31355extern "C"
31356#endif
31357char compress ();
31358int
31359main ()
31360{
31361return compress ();
31362  ;
31363  return 0;
31364}
31365_ACEOF
31366if ac_fn_cxx_try_link "$LINENO"; then :
31367  ac_cv_lib_z_compress=yes
31368else
31369  ac_cv_lib_z_compress=no
31370fi
31371rm -f core conftest.err conftest.$ac_objext \
31372    conftest$ac_exeext conftest.$ac_ext
31373LIBS=$ac_check_lib_save_LIBS
31374fi
31375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31376$as_echo "$ac_cv_lib_z_compress" >&6; }
31377if test "x$ac_cv_lib_z_compress" = x""yes; then :
31378   ZLIB_FOUND=yes
31379else
31380   ZLIB_FOUND=no
31381fi
31382
31383
31384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31385$as_echo_n "checking for which zlib to use... " >&6; }
31386
31387DEFAULT_ZLIB=bundled
31388if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31389#
31390# On macosx default is system...on others default is
31391#
31392    DEFAULT_ZLIB=system
31393fi
31394
31395if test "x${ZLIB_FOUND}" != "xyes"; then
31396#
31397# If we don't find any system...set default to bundled
31398#
31399    DEFAULT_ZLIB=bundled
31400fi
31401
31402#
31403# If user didn't specify, use DEFAULT_ZLIB
31404#
31405if test "x${with_zlib}" = "x"; then
31406    with_zlib=${DEFAULT_ZLIB}
31407fi
31408
31409if test "x${with_zlib}" = "xbundled"; then
31410    USE_EXTERNAL_LIBZ=false
31411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
31412$as_echo "bundled" >&6; }
31413elif test "x${with_zlib}" = "xsystem"; then
31414    if test "x${ZLIB_FOUND}" = "xyes"; then
31415        USE_EXTERNAL_LIBZ=true
31416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
31417$as_echo "system" >&6; }
31418    else
31419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
31420$as_echo "system not found" >&6; }
31421        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
31422    fi
31423else
31424    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
31425fi
31426
31427
31428
31429###############################################################################
31430LIBZIP_CAN_USE_MMAP=true
31431
31432
31433
31434###############################################################################
31435#
31436# Check if altzone exists in time.h
31437#
31438
31439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31440/* end confdefs.h.  */
31441#include <time.h>
31442int
31443main ()
31444{
31445return (int)altzone;
31446  ;
31447  return 0;
31448}
31449_ACEOF
31450if ac_fn_cxx_try_link "$LINENO"; then :
31451  has_altzone=yes
31452else
31453  has_altzone=no
31454fi
31455rm -f core conftest.err conftest.$ac_objext \
31456    conftest$ac_exeext conftest.$ac_ext
31457if test "x$has_altzone" = xyes; then
31458
31459$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
31460
31461fi
31462
31463###############################################################################
31464#
31465# Check the maths library
31466#
31467
31468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
31469$as_echo_n "checking for cos in -lm... " >&6; }
31470if test "${ac_cv_lib_m_cos+set}" = set; then :
31471  $as_echo_n "(cached) " >&6
31472else
31473  ac_check_lib_save_LIBS=$LIBS
31474LIBS="-lm  $LIBS"
31475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31476/* end confdefs.h.  */
31477
31478/* Override any GCC internal prototype to avoid an error.
31479   Use char because int might match the return type of a GCC
31480   builtin and then its argument prototype would still apply.  */
31481#ifdef __cplusplus
31482extern "C"
31483#endif
31484char cos ();
31485int
31486main ()
31487{
31488return cos ();
31489  ;
31490  return 0;
31491}
31492_ACEOF
31493if ac_fn_cxx_try_link "$LINENO"; then :
31494  ac_cv_lib_m_cos=yes
31495else
31496  ac_cv_lib_m_cos=no
31497fi
31498rm -f core conftest.err conftest.$ac_objext \
31499    conftest$ac_exeext conftest.$ac_ext
31500LIBS=$ac_check_lib_save_LIBS
31501fi
31502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
31503$as_echo "$ac_cv_lib_m_cos" >&6; }
31504if test "x$ac_cv_lib_m_cos" = x""yes; then :
31505  cat >>confdefs.h <<_ACEOF
31506#define HAVE_LIBM 1
31507_ACEOF
31508
31509  LIBS="-lm $LIBS"
31510
31511else
31512
31513                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
31514$as_echo "$as_me: Maths library was not found" >&6;}
31515
31516fi
31517
31518
31519
31520###############################################################################
31521#
31522# Check for libdl.so
31523
31524save_LIBS="$LIBS"
31525LIBS=""
31526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
31527$as_echo_n "checking for dlopen in -ldl... " >&6; }
31528if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
31529  $as_echo_n "(cached) " >&6
31530else
31531  ac_check_lib_save_LIBS=$LIBS
31532LIBS="-ldl  $LIBS"
31533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31534/* end confdefs.h.  */
31535
31536/* Override any GCC internal prototype to avoid an error.
31537   Use char because int might match the return type of a GCC
31538   builtin and then its argument prototype would still apply.  */
31539#ifdef __cplusplus
31540extern "C"
31541#endif
31542char dlopen ();
31543int
31544main ()
31545{
31546return dlopen ();
31547  ;
31548  return 0;
31549}
31550_ACEOF
31551if ac_fn_cxx_try_link "$LINENO"; then :
31552  ac_cv_lib_dl_dlopen=yes
31553else
31554  ac_cv_lib_dl_dlopen=no
31555fi
31556rm -f core conftest.err conftest.$ac_objext \
31557    conftest$ac_exeext conftest.$ac_ext
31558LIBS=$ac_check_lib_save_LIBS
31559fi
31560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
31561$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
31562if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
31563  cat >>confdefs.h <<_ACEOF
31564#define HAVE_LIBDL 1
31565_ACEOF
31566
31567  LIBS="-ldl $LIBS"
31568
31569fi
31570
31571LIBDL="$LIBS"
31572
31573LIBS="$save_LIBS"
31574
31575
31576
31577###############################################################################
31578#
31579# statically link libstdc++ before C++ ABI is stablized on Linux unless
31580# dynamic build is configured on command line.
31581#
31582
31583# Check whether --with-stdc++lib was given.
31584if test "${with_stdc__lib+set}" = set; then :
31585  withval=$with_stdc__lib;
31586    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31587        && test "x$with_stdc__lib" != xdefault; then
31588      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31589    fi
31590
31591else
31592  with_stdc__lib=default
31593
31594fi
31595
31596
31597if test "x$OPENJDK_TARGET_OS" = xlinux; then
31598    # Test if -lstdc++ works.
31599    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31600$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31601    ac_ext=cpp
31602ac_cpp='$CXXCPP $CPPFLAGS'
31603ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31604ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31605ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31606
31607    OLD_CXXFLAGS="$CXXFLAGS"
31608    CXXFLAGS="$CXXFLAGS -lstdc++"
31609    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31610/* end confdefs.h.  */
31611
31612int
31613main ()
31614{
31615return 0;
31616  ;
31617  return 0;
31618}
31619_ACEOF
31620if ac_fn_cxx_try_link "$LINENO"; then :
31621  has_dynamic_libstdcxx=yes
31622else
31623  has_dynamic_libstdcxx=no
31624fi
31625rm -f core conftest.err conftest.$ac_objext \
31626    conftest$ac_exeext conftest.$ac_ext
31627    CXXFLAGS="$OLD_CXXFLAGS"
31628    ac_ext=cpp
31629ac_cpp='$CXXCPP $CPPFLAGS'
31630ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31631ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31632ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31633
31634    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31635$as_echo "$has_dynamic_libstdcxx" >&6; }
31636
31637    # Test if stdc++ can be linked statically.
31638    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31639$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31640    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31641    ac_ext=cpp
31642ac_cpp='$CXXCPP $CPPFLAGS'
31643ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31644ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31645ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31646
31647    OLD_LIBS="$LIBS"
31648    OLD_CXX="$CXX"
31649    LIBS="$STATIC_STDCXX_FLAGS"
31650    CXX="$CC"
31651    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31652/* end confdefs.h.  */
31653
31654int
31655main ()
31656{
31657return 0;
31658  ;
31659  return 0;
31660}
31661_ACEOF
31662if ac_fn_cxx_try_link "$LINENO"; then :
31663  has_static_libstdcxx=yes
31664else
31665  has_static_libstdcxx=no
31666fi
31667rm -f core conftest.err conftest.$ac_objext \
31668    conftest$ac_exeext conftest.$ac_ext
31669    LIBS="$OLD_LIBS"
31670    CXX="$OLD_CXX"
31671    ac_ext=cpp
31672ac_cpp='$CXXCPP $CPPFLAGS'
31673ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31674ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31675ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31676
31677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31678$as_echo "$has_static_libstdcxx" >&6; }
31679
31680    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31681        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31682    fi
31683
31684    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31685        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31686    fi
31687
31688    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31689        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31690    fi
31691
31692    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31693$as_echo_n "checking how to link with libstdc++... " >&6; }
31694    # If dynamic was requested, it's available since it would fail above otherwise.
31695    # If dynamic wasn't requested, go with static unless it isn't available.
31696    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31697        LIBCXX="$LIBCXX -lstdc++"
31698        LDCXX="$CXX"
31699        STATIC_CXX_SETTING="STATIC_CXX=false"
31700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31701$as_echo "dynamic" >&6; }
31702    else
31703        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31704        LDCXX="$CC"
31705        STATIC_CXX_SETTING="STATIC_CXX=true"
31706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31707$as_echo "static" >&6; }
31708    fi
31709fi
31710
31711
31712# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31713if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31714    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31715fi
31716
31717# TODO better (platform agnostic) test
31718if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31719    LIBCXX="-lstdc++"
31720fi
31721
31722
31723
31724
31725
31726# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31727
31728# When using cygwin or msys, we need a wrapper binary that renames
31729# /cygdrive/c/ arguments into c:/ arguments and peeks into
31730# @files and rewrites these too! This wrapper binary is
31731# called fixpath.
31732FIXPATH=
31733if test "x$OPENJDK_BUILD_OS" = xwindows; then
31734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31735$as_echo_n "checking if fixpath can be created... " >&6; }
31736    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31737    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31738    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31739      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31740      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31741      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31742      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31743    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31744      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31745      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31746
31747      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31748      # @ was chosen as separator to minimize risk of other tools messing around with it
31749      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31750      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31751
31752      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31753    fi
31754    rm -f $OUTPUT_ROOT/fixpath*
31755    cd $OUTPUT_ROOT
31756    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31757    cd $CURDIR
31758
31759    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31761$as_echo "no" >&6; }
31762        cat $OUTPUT_ROOT/fixpath1.log
31763        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31764    fi
31765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31766$as_echo "yes" >&6; }
31767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31768$as_echo_n "checking if fixpath.exe works... " >&6; }
31769    cd $OUTPUT_ROOT
31770    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31771    cd $CURDIR
31772    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31774$as_echo "no" >&6; }
31775        cat $OUTPUT_ROOT/fixpath2.log
31776        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31777    fi
31778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31779$as_echo "yes" >&6; }
31780    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31781fi
31782
31783
31784
31785
31786###############################################################################
31787#
31788# We need to do some final tweaking, when everything else is done.
31789#
31790###############################################################################
31791
31792
31793HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31794
31795
31796# The name of the Service Agent jar.
31797SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31798if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31799  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31800fi
31801
31802
31803
31804
31805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
31806$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
31807
31808if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
31809    ENABLE_INTREE_EC=yes
31810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31811$as_echo "yes" >&6; }
31812else
31813    ENABLE_INTREE_EC=no
31814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31815$as_echo "no" >&6; }
31816fi
31817
31818
31819
31820
31821###############################################################################
31822#
31823# Configure parts of the build that only affect the build performance,
31824# not the result.
31825#
31826###############################################################################
31827
31828
31829  # How many cores do we have on this build system?
31830
31831# Check whether --with-num-cores was given.
31832if test "${with_num_cores+set}" = set; then :
31833  withval=$with_num_cores;
31834fi
31835
31836  if test "x$with_num_cores" = x; then
31837    # The number of cores were not specified, try to probe them.
31838
31839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31840$as_echo_n "checking for number of cores... " >&6; }
31841    NUM_CORES=1
31842    FOUND_CORES=no
31843
31844    if test -f /proc/cpuinfo; then
31845        # Looks like a Linux (or cygwin) system
31846        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31847        FOUND_CORES=yes
31848    elif test -x /usr/sbin/psrinfo; then
31849        # Looks like a Solaris system
31850        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31851        FOUND_CORES=yes
31852    elif test -x /usr/sbin/system_profiler; then
31853        # Looks like a MacOSX system
31854        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31855        FOUND_CORES=yes
31856    elif test -n "$NUMBER_OF_PROCESSORS"; then
31857        # On windows, look in the env
31858        NUM_CORES=$NUMBER_OF_PROCESSORS
31859        FOUND_CORES=yes
31860    fi
31861
31862    if test "x$FOUND_CORES" = xyes; then
31863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31864$as_echo "$NUM_CORES" >&6; }
31865    else
31866        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31867$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31868        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31869$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31870    fi
31871
31872
31873  else
31874    NUM_CORES=$with_num_cores
31875  fi
31876
31877
31878
31879  # How much memory do we have on this build system?
31880
31881# Check whether --with-memory-size was given.
31882if test "${with_memory_size+set}" = set; then :
31883  withval=$with_memory_size;
31884fi
31885
31886  if test "x$with_memory_size" = x; then
31887    # The memory size was not specified, try to probe it.
31888
31889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31890$as_echo_n "checking for memory size... " >&6; }
31891    # Default to 1024 MB
31892    MEMORY_SIZE=1024
31893    FOUND_MEM=no
31894
31895    if test -f /proc/meminfo; then
31896        # Looks like a Linux (or cygwin) system
31897        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31898        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31899        FOUND_MEM=yes
31900    elif test -x /usr/sbin/prtconf; then
31901        # Looks like a Solaris system
31902        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31903        FOUND_MEM=yes
31904    elif test -x /usr/sbin/system_profiler; then
31905        # Looks like a MacOSX system
31906        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31907        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31908        FOUND_MEM=yes
31909    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31910        # Windows, but without cygwin
31911        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31912        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31913        FOUND_MEM=yes
31914    fi
31915
31916    if test "x$FOUND_MEM" = xyes; then
31917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31918$as_echo "$MEMORY_SIZE MB" >&6; }
31919    else
31920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31921$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31923$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31924    fi
31925
31926  else
31927    MEMORY_SIZE=$with_memory_size
31928  fi
31929
31930
31931
31932  # Provide a decent default number of parallel jobs for make depending on
31933  # number of cores, amount of memory and machine architecture.
31934
31935# Check whether --with-jobs was given.
31936if test "${with_jobs+set}" = set; then :
31937  withval=$with_jobs;
31938fi
31939
31940  if test "x$with_jobs" = x; then
31941    # Number of jobs was not specified, calculate.
31942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
31943$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
31944    # Approximate memory in GB, rounding up a bit.
31945    memory_gb=`expr $MEMORY_SIZE / 1100`
31946    # Pick the lowest of memory in gb and number of cores.
31947    if test "$memory_gb" -lt "$NUM_CORES"; then
31948      JOBS="$memory_gb"
31949    else
31950      JOBS="$NUM_CORES"
31951      # On bigger machines, leave some room for other processes to run
31952      if test "$JOBS" -gt "4"; then
31953        JOBS=`expr $JOBS '*' 90 / 100`
31954      fi
31955    fi
31956    # Cap number of jobs to 16
31957    if test "$JOBS" -gt "16"; then
31958      JOBS=16
31959    fi
31960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
31961$as_echo "$JOBS" >&6; }
31962  else
31963    JOBS=$with_jobs
31964  fi
31965
31966
31967
31968# Setup smart javac (after cores and memory have been setup)
31969
31970
31971# Check whether --with-sjavac-server-java was given.
31972if test "${with_sjavac_server_java+set}" = set; then :
31973  withval=$with_sjavac_server_java;
31974fi
31975
31976
31977if test "x$with_sjavac_server_java" != x; then
31978    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31979    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31980    if test "x$FOUND_VERSION" = x; then
31981        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31982    fi
31983else
31984    SJAVAC_SERVER_JAVA=""
31985    # Hotspot specific options.
31986
31987    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31988    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31989    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31990    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31991    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31992        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31993    fi
31994
31995    # JRockit specific options.
31996
31997    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31998    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31999    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
32000    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
32001    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32002        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32003    fi
32004
32005    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32006fi
32007
32008
32009
32010# Check whether --with-sjavac-server-cores was given.
32011if test "${with_sjavac_server_cores+set}" = set; then :
32012  withval=$with_sjavac_server_cores;
32013fi
32014
32015if test "x$with_sjavac_server_cores" != x; then
32016    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
32017else
32018    if test "$NUM_CORES" -gt 16; then
32019        # We set this arbitrary limit because we want to limit the heap
32020        # size of the javac server.
32021        # In the future we will make the javac compilers in the server
32022        # share more and more state, thus enabling us to use more and
32023        # more concurrent threads in the server.
32024        SJAVAC_SERVER_CORES="16"
32025    else
32026        SJAVAC_SERVER_CORES="$NUM_CORES"
32027    fi
32028
32029    if test "$MEMORY_SIZE" -gt "17000"; then
32030        MAX_HEAP_MEM=10000
32031
32032    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32033    # If so, then append -d64 to SJAVAC_SERVER_JAVA
32034    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
32035    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
32036    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32037        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32038    fi
32039
32040
32041    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32042    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
32043    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
32044    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
32045    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32046        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
32047    fi
32048
32049    elif test "$MEMORY_SIZE" -gt "10000"; then
32050        MAX_HEAP_MEM=6000
32051
32052    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32053    # If so, then append -d64 to SJAVAC_SERVER_JAVA
32054    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
32055    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
32056    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32057        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32058    fi
32059
32060
32061    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32062    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
32063    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
32064    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
32065    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32066        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
32067    fi
32068
32069    elif test "$MEMORY_SIZE" -gt "5000"; then
32070        MAX_HEAP_MEM=3000
32071
32072    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32073    # If so, then append -d64 to SJAVAC_SERVER_JAVA
32074    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
32075    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
32076    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32077        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32078    fi
32079
32080
32081    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32082    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
32083    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
32084    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
32085    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32086        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
32087    fi
32088
32089    elif test "$MEMORY_SIZE" -gt "3800"; then
32090        MAX_HEAP_MEM=2500
32091
32092    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32093    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
32094    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
32095    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
32096    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32097        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
32098    fi
32099
32100    elif test "$MEMORY_SIZE" -gt "1900"; then
32101        MAX_HEAP_MEM=1200
32102
32103    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32104    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
32105    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
32106    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
32107    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32108        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
32109    fi
32110
32111    elif test "$MEMORY_SIZE" -gt "1000"; then
32112        MAX_HEAP_MEM=900
32113
32114    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32115    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
32116    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
32117    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
32118    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32119        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
32120    fi
32121
32122    else
32123        MAX_HEAP_MEM=512
32124
32125    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32126    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
32127    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
32128    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
32129    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32130        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
32131    fi
32132
32133    fi
32134
32135
32136    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32137    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
32138    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
32139    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
32140    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32141        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
32142    fi
32143
32144
32145    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32146    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
32147    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
32148    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
32149    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32150        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
32151    fi
32152
32153
32154    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
32155    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
32156    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
32157    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
32158    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32159        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
32160    fi
32161
32162
32163    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
32164    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
32165        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
32166$as_echo_n "checking if number of server cores must be reduced... " >&6; }
32167        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
32168        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
32169$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
32170    fi
32171fi
32172
32173
32174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32175$as_echo_n "checking whether to use sjavac... " >&6; }
32176# Check whether --enable-sjavac was given.
32177if test "${enable_sjavac+set}" = set; then :
32178  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32179else
32180  ENABLE_SJAVAC='no'
32181fi
32182
32183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32184$as_echo "$ENABLE_SJAVAC" >&6; }
32185
32186
32187if test "x$ENABLE_SJAVAC" = xyes; then
32188    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32189else
32190    SJAVAC_SERVER_DIR=
32191fi
32192
32193
32194
32195
32196# Can the C/C++ compiler use precompiled headers?
32197
32198
32199###############################################################################
32200#
32201# Can the C/C++ compiler use precompiled headers?
32202#
32203# Check whether --enable-precompiled-headers was given.
32204if test "${enable_precompiled_headers+set}" = set; then :
32205  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32206else
32207  ENABLE_PRECOMPH=yes
32208fi
32209
32210
32211USE_PRECOMPILED_HEADER=1
32212if test "x$ENABLE_PRECOMPH" = xno; then
32213    USE_PRECOMPILED_HEADER=0
32214fi
32215
32216if test "x$ENABLE_PRECOMPH" = xyes; then
32217    # Check that the compiler actually supports precomp headers.
32218    if test "x$GCC" = xyes; then
32219         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
32220$as_echo_n "checking that precompiled headers work... " >&6; }
32221         echo "int alfa();" > conftest.h
32222         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
32223         if test ! -f conftest.hpp.gch; then
32224             USE_PRECOMPILED_HEADER=0
32225             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32226$as_echo "no" >&6; }
32227         else
32228             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32229$as_echo "yes" >&6; }
32230         fi
32231         rm -f conftest.h conftest.hpp.gch
32232    fi
32233fi
32234
32235
32236
32237
32238# Setup use of ccache, if available
32239
32240    # Check whether --enable-ccache was given.
32241if test "${enable_ccache+set}" = set; then :
32242  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
32243else
32244  ENABLE_CCACHE=yes
32245fi
32246
32247    if test "x$ENABLE_CCACHE" = xyes; then
32248        # Extract the first word of "ccache", so it can be a program name with args.
32249set dummy ccache; ac_word=$2
32250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32251$as_echo_n "checking for $ac_word... " >&6; }
32252if test "${ac_cv_path_CCACHE+set}" = set; then :
32253  $as_echo_n "(cached) " >&6
32254else
32255  case $CCACHE in
32256  [\\/]* | ?:[\\/]*)
32257  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
32258  ;;
32259  *)
32260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32261for as_dir in $PATH
32262do
32263  IFS=$as_save_IFS
32264  test -z "$as_dir" && as_dir=.
32265    for ac_exec_ext in '' $ac_executable_extensions; do
32266  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32267    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
32268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32269    break 2
32270  fi
32271done
32272  done
32273IFS=$as_save_IFS
32274
32275  ;;
32276esac
32277fi
32278CCACHE=$ac_cv_path_CCACHE
32279if test -n "$CCACHE"; then
32280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
32281$as_echo "$CCACHE" >&6; }
32282else
32283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32284$as_echo "no" >&6; }
32285fi
32286
32287
32288    else
32289        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
32290$as_echo_n "checking for ccache... " >&6; }
32291        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
32292$as_echo "explicitly disabled" >&6; }
32293        CCACHE=
32294    fi
32295
32296
32297
32298# Check whether --with-ccache-dir was given.
32299if test "${with_ccache_dir+set}" = set; then :
32300  withval=$with_ccache_dir;
32301fi
32302
32303
32304    if test "x$with_ccache_dir" != x; then
32305        # When using a non home ccache directory, assume the use is to share ccache files
32306        # with other users. Thus change the umask.
32307        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
32308    fi
32309    CCACHE_FOUND=""
32310    if test "x$CCACHE" != x; then
32311
32312    if test "x$CCACHE" != x; then
32313        CCACHE_FOUND="true"
32314        # Only use ccache if it is 3.1.4 or later, which supports
32315        # precompiled headers.
32316        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
32317$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
32318        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
32319        if test "x$HAS_GOOD_CCACHE" = x; then
32320            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
32321$as_echo "no, disabling ccache" >&6; }
32322            CCACHE=
32323        else
32324            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32325$as_echo "yes" >&6; }
32326            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
32327$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
32328            PUSHED_FLAGS="$CXXFLAGS"
32329            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
32330            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32331/* end confdefs.h.  */
32332
32333int
32334main ()
32335{
32336
32337  ;
32338  return 0;
32339}
32340_ACEOF
32341if ac_fn_cxx_try_compile "$LINENO"; then :
32342  CC_KNOWS_CCACHE_TRICK=yes
32343else
32344  CC_KNOWS_CCACHE_TRICK=no
32345fi
32346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32347            CXXFLAGS="$PUSHED_FLAGS"
32348            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
32349                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32350$as_echo "yes" >&6; }
32351            else
32352                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
32353$as_echo "no, disabling ccaching of precompiled headers" >&6; }
32354                CCACHE=
32355            fi
32356        fi
32357    fi
32358
32359    if test "x$CCACHE" != x; then
32360        CCACHE_SLOPPINESS=time_macros
32361        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
32362        CCACHE_FLAGS=-fpch-preprocess
32363
32364        if test "x$SET_CCACHE_DIR" != x; then
32365            mkdir -p $CCACHE_DIR > /dev/null 2>&1
32366	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
32367        fi
32368    fi
32369
32370    fi
32371
32372
32373###############################################################################
32374#
32375# And now the finish...
32376#
32377###############################################################################
32378
32379# Check for some common pitfalls
32380
32381  if test x"$OPENJDK_BUILD_OS" = xwindows; then
32382    file_to_test="$SRC_ROOT/LICENSE"
32383    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
32384      as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5
32385    fi
32386  fi
32387
32388
32389
32390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
32391$as_echo_n "checking if build directory is on local disk... " >&6; }
32392
32393	# df -l lists only local disks; if the given directory is not found then
32394	# a non-zero exit code is given
32395  if test "x$DF" = x; then
32396    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32397      # msys does not have df; use Windows "net use" instead.
32398      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
32399      if test "x$IS_NETWORK_DISK" = x; then
32400        OUTPUT_DIR_IS_LOCAL="yes"
32401      else
32402        OUTPUT_DIR_IS_LOCAL="no"
32403      fi
32404    else
32405      # No df here, say it's local
32406      OUTPUT_DIR_IS_LOCAL="yes"
32407    fi
32408  else
32409    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
32410      OUTPUT_DIR_IS_LOCAL="yes"
32411    else
32412      OUTPUT_DIR_IS_LOCAL="no"
32413    fi
32414  fi
32415
32416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
32417$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
32418
32419
32420
32421# Check if the user has any old-style ALT_ variables set.
32422FOUND_ALT_VARIABLES=`env | grep ^ALT_`
32423
32424# Before generating output files, test if they exist. If they do, this is a reconfigure.
32425# Since we can't properly handle the dependencies for this, warn the user about the situation
32426if test -e $OUTPUT_ROOT/spec.gmk; then
32427  IS_RECONFIGURE=yes
32428else
32429  IS_RECONFIGURE=no
32430fi
32431
32432if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
32433  HIDE_PERFORMANCE_HINTS=yes
32434else
32435  HIDE_PERFORMANCE_HINTS=no
32436  # Hide it the next time around...
32437  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
32438fi
32439
32440
32441
32442# At the end, call the custom hook. (Dummy macro if no custom sources available)
32443
32444
32445# We're messing a bit with internal autoconf variables to put the config.status
32446# in the output directory instead of the current directory.
32447CONFIG_STATUS="$OUTPUT_ROOT/config.status"
32448# Create the actual output files. Now the main work of configure is done.
32449cat >confcache <<\_ACEOF
32450# This file is a shell script that caches the results of configure
32451# tests run on this system so they can be shared between configure
32452# scripts and configure runs, see configure's option --config-cache.
32453# It is not useful on other systems.  If it contains results you don't
32454# want to keep, you may remove or edit it.
32455#
32456# config.status only pays attention to the cache file if you give it
32457# the --recheck option to rerun configure.
32458#
32459# `ac_cv_env_foo' variables (set or unset) will be overridden when
32460# loading this file, other *unset* `ac_cv_foo' will be assigned the
32461# following values.
32462
32463_ACEOF
32464
32465# The following way of writing the cache mishandles newlines in values,
32466# but we know of no workaround that is simple, portable, and efficient.
32467# So, we kill variables containing newlines.
32468# Ultrix sh set writes to stderr and can't be redirected directly,
32469# and sets the high bit in the cache file unless we assign to the vars.
32470(
32471  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
32472    eval ac_val=\$$ac_var
32473    case $ac_val in #(
32474    *${as_nl}*)
32475      case $ac_var in #(
32476      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
32477$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
32478      esac
32479      case $ac_var in #(
32480      _ | IFS | as_nl) ;; #(
32481      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
32482      *) { eval $ac_var=; unset $ac_var;} ;;
32483      esac ;;
32484    esac
32485  done
32486
32487  (set) 2>&1 |
32488    case $as_nl`(ac_space=' '; set) 2>&1` in #(
32489    *${as_nl}ac_space=\ *)
32490      # `set' does not quote correctly, so add quotes: double-quote
32491      # substitution turns \\\\ into \\, and sed turns \\ into \.
32492      sed -n \
32493	"s/'/'\\\\''/g;
32494	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
32495      ;; #(
32496    *)
32497      # `set' quotes correctly as required by POSIX, so do not add quotes.
32498      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
32499      ;;
32500    esac |
32501    sort
32502) |
32503  sed '
32504     /^ac_cv_env_/b end
32505     t clear
32506     :clear
32507     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
32508     t end
32509     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
32510     :end' >>confcache
32511if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
32512  if test -w "$cache_file"; then
32513    test "x$cache_file" != "x/dev/null" &&
32514      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
32515$as_echo "$as_me: updating cache $cache_file" >&6;}
32516    cat confcache >$cache_file
32517  else
32518    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
32519$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
32520  fi
32521fi
32522rm -f confcache
32523
32524test "x$prefix" = xNONE && prefix=$ac_default_prefix
32525# Let make expand exec_prefix.
32526test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
32527
32528DEFS=-DHAVE_CONFIG_H
32529
32530ac_libobjs=
32531ac_ltlibobjs=
32532U=
32533for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
32534  # 1. Remove the extension, and $U if already installed.
32535  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
32536  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
32537  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
32538  #    will be set to the directory where LIBOBJS objects are built.
32539  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
32540  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
32541done
32542LIBOBJS=$ac_libobjs
32543
32544LTLIBOBJS=$ac_ltlibobjs
32545
32546
32547
32548: ${CONFIG_STATUS=./config.status}
32549ac_write_fail=0
32550ac_clean_files_save=$ac_clean_files
32551ac_clean_files="$ac_clean_files $CONFIG_STATUS"
32552{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
32553$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
32554as_write_fail=0
32555cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
32556#! $SHELL
32557# Generated by $as_me.
32558# Run this file to recreate the current configuration.
32559# Compiler output produced by configure, useful for debugging
32560# configure, is in config.log if it exists.
32561
32562debug=false
32563ac_cs_recheck=false
32564ac_cs_silent=false
32565
32566SHELL=\${CONFIG_SHELL-$SHELL}
32567export SHELL
32568_ASEOF
32569cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
32570## -------------------- ##
32571## M4sh Initialization. ##
32572## -------------------- ##
32573
32574# Be more Bourne compatible
32575DUALCASE=1; export DUALCASE # for MKS sh
32576if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
32577  emulate sh
32578  NULLCMD=:
32579  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
32580  # is contrary to our usage.  Disable this feature.
32581  alias -g '${1+"$@"}'='"$@"'
32582  setopt NO_GLOB_SUBST
32583else
32584  case `(set -o) 2>/dev/null` in #(
32585  *posix*) :
32586    set -o posix ;; #(
32587  *) :
32588     ;;
32589esac
32590fi
32591
32592
32593as_nl='
32594'
32595export as_nl
32596# Printing a long string crashes Solaris 7 /usr/bin/printf.
32597as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
32598as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
32599as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
32600# Prefer a ksh shell builtin over an external printf program on Solaris,
32601# but without wasting forks for bash or zsh.
32602if test -z "$BASH_VERSION$ZSH_VERSION" \
32603    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
32604  as_echo='print -r --'
32605  as_echo_n='print -rn --'
32606elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32607  as_echo='printf %s\n'
32608  as_echo_n='printf %s'
32609else
32610  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32611    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
32612    as_echo_n='/usr/ucb/echo -n'
32613  else
32614    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32615    as_echo_n_body='eval
32616      arg=$1;
32617      case $arg in #(
32618      *"$as_nl"*)
32619	expr "X$arg" : "X\\(.*\\)$as_nl";
32620	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32621      esac;
32622      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32623    '
32624    export as_echo_n_body
32625    as_echo_n='sh -c $as_echo_n_body as_echo'
32626  fi
32627  export as_echo_body
32628  as_echo='sh -c $as_echo_body as_echo'
32629fi
32630
32631# The user is always right.
32632if test "${PATH_SEPARATOR+set}" != set; then
32633  PATH_SEPARATOR=:
32634  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32635    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32636      PATH_SEPARATOR=';'
32637  }
32638fi
32639
32640
32641# IFS
32642# We need space, tab and new line, in precisely that order.  Quoting is
32643# there to prevent editors from complaining about space-tab.
32644# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32645# splitting by setting IFS to empty value.)
32646IFS=" ""	$as_nl"
32647
32648# Find who we are.  Look in the path if we contain no directory separator.
32649case $0 in #((
32650  *[\\/]* ) as_myself=$0 ;;
32651  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32652for as_dir in $PATH
32653do
32654  IFS=$as_save_IFS
32655  test -z "$as_dir" && as_dir=.
32656    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32657  done
32658IFS=$as_save_IFS
32659
32660     ;;
32661esac
32662# We did not find ourselves, most probably we were run as `sh COMMAND'
32663# in which case we are not to be found in the path.
32664if test "x$as_myself" = x; then
32665  as_myself=$0
32666fi
32667if test ! -f "$as_myself"; then
32668  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32669  exit 1
32670fi
32671
32672# Unset variables that we do not need and which cause bugs (e.g. in
32673# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32674# suppresses any "Segmentation fault" message there.  '((' could
32675# trigger a bug in pdksh 5.2.14.
32676for as_var in BASH_ENV ENV MAIL MAILPATH
32677do eval test x\${$as_var+set} = xset \
32678  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32679done
32680PS1='$ '
32681PS2='> '
32682PS4='+ '
32683
32684# NLS nuisances.
32685LC_ALL=C
32686export LC_ALL
32687LANGUAGE=C
32688export LANGUAGE
32689
32690# CDPATH.
32691(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32692
32693
32694# as_fn_error STATUS ERROR [LINENO LOG_FD]
32695# ----------------------------------------
32696# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32697# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32698# script with STATUS, using 1 if that was 0.
32699as_fn_error ()
32700{
32701  as_status=$1; test $as_status -eq 0 && as_status=1
32702  if test "$4"; then
32703    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32704    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32705  fi
32706  $as_echo "$as_me: error: $2" >&2
32707  as_fn_exit $as_status
32708} # as_fn_error
32709
32710
32711# as_fn_set_status STATUS
32712# -----------------------
32713# Set $? to STATUS, without forking.
32714as_fn_set_status ()
32715{
32716  return $1
32717} # as_fn_set_status
32718
32719# as_fn_exit STATUS
32720# -----------------
32721# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32722as_fn_exit ()
32723{
32724  set +e
32725  as_fn_set_status $1
32726  exit $1
32727} # as_fn_exit
32728
32729# as_fn_unset VAR
32730# ---------------
32731# Portably unset VAR.
32732as_fn_unset ()
32733{
32734  { eval $1=; unset $1;}
32735}
32736as_unset=as_fn_unset
32737# as_fn_append VAR VALUE
32738# ----------------------
32739# Append the text in VALUE to the end of the definition contained in VAR. Take
32740# advantage of any shell optimizations that allow amortized linear growth over
32741# repeated appends, instead of the typical quadratic growth present in naive
32742# implementations.
32743if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32744  eval 'as_fn_append ()
32745  {
32746    eval $1+=\$2
32747  }'
32748else
32749  as_fn_append ()
32750  {
32751    eval $1=\$$1\$2
32752  }
32753fi # as_fn_append
32754
32755# as_fn_arith ARG...
32756# ------------------
32757# Perform arithmetic evaluation on the ARGs, and store the result in the
32758# global $as_val. Take advantage of shells that can avoid forks. The arguments
32759# must be portable across $(()) and expr.
32760if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32761  eval 'as_fn_arith ()
32762  {
32763    as_val=$(( $* ))
32764  }'
32765else
32766  as_fn_arith ()
32767  {
32768    as_val=`expr "$@" || test $? -eq 1`
32769  }
32770fi # as_fn_arith
32771
32772
32773if expr a : '\(a\)' >/dev/null 2>&1 &&
32774   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32775  as_expr=expr
32776else
32777  as_expr=false
32778fi
32779
32780if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32781  as_basename=basename
32782else
32783  as_basename=false
32784fi
32785
32786if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32787  as_dirname=dirname
32788else
32789  as_dirname=false
32790fi
32791
32792as_me=`$as_basename -- "$0" ||
32793$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32794	 X"$0" : 'X\(//\)$' \| \
32795	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32796$as_echo X/"$0" |
32797    sed '/^.*\/\([^/][^/]*\)\/*$/{
32798	    s//\1/
32799	    q
32800	  }
32801	  /^X\/\(\/\/\)$/{
32802	    s//\1/
32803	    q
32804	  }
32805	  /^X\/\(\/\).*/{
32806	    s//\1/
32807	    q
32808	  }
32809	  s/.*/./; q'`
32810
32811# Avoid depending upon Character Ranges.
32812as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32813as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32814as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32815as_cr_digits='0123456789'
32816as_cr_alnum=$as_cr_Letters$as_cr_digits
32817
32818ECHO_C= ECHO_N= ECHO_T=
32819case `echo -n x` in #(((((
32820-n*)
32821  case `echo 'xy\c'` in
32822  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32823  xy)  ECHO_C='\c';;
32824  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32825       ECHO_T='	';;
32826  esac;;
32827*)
32828  ECHO_N='-n';;
32829esac
32830
32831rm -f conf$$ conf$$.exe conf$$.file
32832if test -d conf$$.dir; then
32833  rm -f conf$$.dir/conf$$.file
32834else
32835  rm -f conf$$.dir
32836  mkdir conf$$.dir 2>/dev/null
32837fi
32838if (echo >conf$$.file) 2>/dev/null; then
32839  if ln -s conf$$.file conf$$ 2>/dev/null; then
32840    as_ln_s='ln -s'
32841    # ... but there are two gotchas:
32842    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32843    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32844    # In both cases, we have to default to `cp -p'.
32845    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32846      as_ln_s='cp -p'
32847  elif ln conf$$.file conf$$ 2>/dev/null; then
32848    as_ln_s=ln
32849  else
32850    as_ln_s='cp -p'
32851  fi
32852else
32853  as_ln_s='cp -p'
32854fi
32855rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32856rmdir conf$$.dir 2>/dev/null
32857
32858
32859# as_fn_mkdir_p
32860# -------------
32861# Create "$as_dir" as a directory, including parents if necessary.
32862as_fn_mkdir_p ()
32863{
32864
32865  case $as_dir in #(
32866  -*) as_dir=./$as_dir;;
32867  esac
32868  test -d "$as_dir" || eval $as_mkdir_p || {
32869    as_dirs=
32870    while :; do
32871      case $as_dir in #(
32872      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32873      *) as_qdir=$as_dir;;
32874      esac
32875      as_dirs="'$as_qdir' $as_dirs"
32876      as_dir=`$as_dirname -- "$as_dir" ||
32877$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32878	 X"$as_dir" : 'X\(//\)[^/]' \| \
32879	 X"$as_dir" : 'X\(//\)$' \| \
32880	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32881$as_echo X"$as_dir" |
32882    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32883	    s//\1/
32884	    q
32885	  }
32886	  /^X\(\/\/\)[^/].*/{
32887	    s//\1/
32888	    q
32889	  }
32890	  /^X\(\/\/\)$/{
32891	    s//\1/
32892	    q
32893	  }
32894	  /^X\(\/\).*/{
32895	    s//\1/
32896	    q
32897	  }
32898	  s/.*/./; q'`
32899      test -d "$as_dir" && break
32900    done
32901    test -z "$as_dirs" || eval "mkdir $as_dirs"
32902  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32903
32904
32905} # as_fn_mkdir_p
32906if mkdir -p . 2>/dev/null; then
32907  as_mkdir_p='mkdir -p "$as_dir"'
32908else
32909  test -d ./-p && rmdir ./-p
32910  as_mkdir_p=false
32911fi
32912
32913if test -x / >/dev/null 2>&1; then
32914  as_test_x='test -x'
32915else
32916  if ls -dL / >/dev/null 2>&1; then
32917    as_ls_L_option=L
32918  else
32919    as_ls_L_option=
32920  fi
32921  as_test_x='
32922    eval sh -c '\''
32923      if test -d "$1"; then
32924	test -d "$1/.";
32925      else
32926	case $1 in #(
32927	-*)set "./$1";;
32928	esac;
32929	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32930	???[sx]*):;;*)false;;esac;fi
32931    '\'' sh
32932  '
32933fi
32934as_executable_p=$as_test_x
32935
32936# Sed expression to map a string onto a valid CPP name.
32937as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32938
32939# Sed expression to map a string onto a valid variable name.
32940as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32941
32942
32943exec 6>&1
32944## ----------------------------------- ##
32945## Main body of $CONFIG_STATUS script. ##
32946## ----------------------------------- ##
32947_ASEOF
32948test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32949
32950cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32951# Save the log message, to keep $0 and so on meaningful, and to
32952# report actual input values of CONFIG_FILES etc. instead of their
32953# values after options handling.
32954ac_log="
32955This file was extended by OpenJDK $as_me jdk8, which was
32956generated by GNU Autoconf 2.67.  Invocation command line was
32957
32958  CONFIG_FILES    = $CONFIG_FILES
32959  CONFIG_HEADERS  = $CONFIG_HEADERS
32960  CONFIG_LINKS    = $CONFIG_LINKS
32961  CONFIG_COMMANDS = $CONFIG_COMMANDS
32962  $ $0 $@
32963
32964on `(hostname || uname -n) 2>/dev/null | sed 1q`
32965"
32966
32967_ACEOF
32968
32969case $ac_config_files in *"
32970"*) set x $ac_config_files; shift; ac_config_files=$*;;
32971esac
32972
32973case $ac_config_headers in *"
32974"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32975esac
32976
32977
32978cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32979# Files that config.status was made for.
32980config_files="$ac_config_files"
32981config_headers="$ac_config_headers"
32982
32983_ACEOF
32984
32985cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32986ac_cs_usage="\
32987\`$as_me' instantiates files and other configuration actions
32988from templates according to the current configuration.  Unless the files
32989and actions are specified as TAGs, all are instantiated by default.
32990
32991Usage: $0 [OPTION]... [TAG]...
32992
32993  -h, --help       print this help, then exit
32994  -V, --version    print version number and configuration settings, then exit
32995      --config     print configuration, then exit
32996  -q, --quiet, --silent
32997                   do not print progress messages
32998  -d, --debug      don't remove temporary files
32999      --recheck    update $as_me by reconfiguring in the same conditions
33000      --file=FILE[:TEMPLATE]
33001                   instantiate the configuration file FILE
33002      --header=FILE[:TEMPLATE]
33003                   instantiate the configuration header FILE
33004
33005Configuration files:
33006$config_files
33007
33008Configuration headers:
33009$config_headers
33010
33011Report bugs to <build-dev@openjdk.java.net>.
33012OpenJDK home page: <http://openjdk.java.net>."
33013
33014_ACEOF
33015cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33016ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33017ac_cs_version="\\
33018OpenJDK config.status jdk8
33019configured by $0, generated by GNU Autoconf 2.67,
33020  with options \\"\$ac_cs_config\\"
33021
33022Copyright (C) 2010 Free Software Foundation, Inc.
33023This config.status script is free software; the Free Software Foundation
33024gives unlimited permission to copy, distribute and modify it."
33025
33026ac_pwd='$ac_pwd'
33027srcdir='$srcdir'
33028AWK='$AWK'
33029test -n "\$AWK" || AWK=awk
33030_ACEOF
33031
33032cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33033# The default lists apply if the user does not specify any file.
33034ac_need_defaults=:
33035while test $# != 0
33036do
33037  case $1 in
33038  --*=?*)
33039    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33040    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33041    ac_shift=:
33042    ;;
33043  --*=)
33044    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33045    ac_optarg=
33046    ac_shift=:
33047    ;;
33048  *)
33049    ac_option=$1
33050    ac_optarg=$2
33051    ac_shift=shift
33052    ;;
33053  esac
33054
33055  case $ac_option in
33056  # Handling of the options.
33057  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33058    ac_cs_recheck=: ;;
33059  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33060    $as_echo "$ac_cs_version"; exit ;;
33061  --config | --confi | --conf | --con | --co | --c )
33062    $as_echo "$ac_cs_config"; exit ;;
33063  --debug | --debu | --deb | --de | --d | -d )
33064    debug=: ;;
33065  --file | --fil | --fi | --f )
33066    $ac_shift
33067    case $ac_optarg in
33068    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33069    '') as_fn_error $? "missing file argument" ;;
33070    esac
33071    as_fn_append CONFIG_FILES " '$ac_optarg'"
33072    ac_need_defaults=false;;
33073  --header | --heade | --head | --hea )
33074    $ac_shift
33075    case $ac_optarg in
33076    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33077    esac
33078    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33079    ac_need_defaults=false;;
33080  --he | --h)
33081    # Conflict between --help and --header
33082    as_fn_error $? "ambiguous option: \`$1'
33083Try \`$0 --help' for more information.";;
33084  --help | --hel | -h )
33085    $as_echo "$ac_cs_usage"; exit ;;
33086  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33087  | -silent | --silent | --silen | --sile | --sil | --si | --s)
33088    ac_cs_silent=: ;;
33089
33090  # This is an error.
33091  -*) as_fn_error $? "unrecognized option: \`$1'
33092Try \`$0 --help' for more information." ;;
33093
33094  *) as_fn_append ac_config_targets " $1"
33095     ac_need_defaults=false ;;
33096
33097  esac
33098  shift
33099done
33100
33101ac_configure_extra_args=
33102
33103if $ac_cs_silent; then
33104  exec 6>/dev/null
33105  ac_configure_extra_args="$ac_configure_extra_args --silent"
33106fi
33107
33108_ACEOF
33109cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33110if \$ac_cs_recheck; then
33111  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33112  shift
33113  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33114  CONFIG_SHELL='$SHELL'
33115  export CONFIG_SHELL
33116  exec "\$@"
33117fi
33118
33119_ACEOF
33120cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33121exec 5>>config.log
33122{
33123  echo
33124  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33125## Running $as_me. ##
33126_ASBOX
33127  $as_echo "$ac_log"
33128} >&5
33129
33130_ACEOF
33131cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33132_ACEOF
33133
33134cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33135
33136# Handling of arguments.
33137for ac_config_target in $ac_config_targets
33138do
33139  case $ac_config_target in
33140    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33141    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33142    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33143    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33144    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33145    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33146    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33147
33148  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
33149  esac
33150done
33151
33152
33153# If the user did not use the arguments to specify the items to instantiate,
33154# then the envvar interface is used.  Set only those that are not.
33155# We use the long form for the default assignment because of an extremely
33156# bizarre bug on SunOS 4.1.3.
33157if $ac_need_defaults; then
33158  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33159  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33160fi
33161
33162# Have a temporary directory for convenience.  Make it in the build tree
33163# simply because there is no reason against having it here, and in addition,
33164# creating and moving files from /tmp can sometimes cause problems.
33165# Hook for its removal unless debugging.
33166# Note that there is a small window in which the directory will not be cleaned:
33167# after its creation but before its name has been assigned to `$tmp'.
33168$debug ||
33169{
33170  tmp=
33171  trap 'exit_status=$?
33172  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
33173' 0
33174  trap 'as_fn_exit 1' 1 2 13 15
33175}
33176# Create a (secure) tmp directory for tmp files.
33177
33178{
33179  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33180  test -n "$tmp" && test -d "$tmp"
33181}  ||
33182{
33183  tmp=./conf$$-$RANDOM
33184  (umask 077 && mkdir "$tmp")
33185} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33186
33187# Set up the scripts for CONFIG_FILES section.
33188# No need to generate them if there are no CONFIG_FILES.
33189# This happens for instance with `./config.status config.h'.
33190if test -n "$CONFIG_FILES"; then
33191
33192
33193ac_cr=`echo X | tr X '\015'`
33194# On cygwin, bash can eat \r inside `` if the user requested igncr.
33195# But we know of no other shell where ac_cr would be empty at this
33196# point, so we can use a bashism as a fallback.
33197if test "x$ac_cr" = x; then
33198  eval ac_cr=\$\'\\r\'
33199fi
33200ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33201if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33202  ac_cs_awk_cr='\\r'
33203else
33204  ac_cs_awk_cr=$ac_cr
33205fi
33206
33207echo 'BEGIN {' >"$tmp/subs1.awk" &&
33208_ACEOF
33209
33210
33211{
33212  echo "cat >conf$$subs.awk <<_ACEOF" &&
33213  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33214  echo "_ACEOF"
33215} >conf$$subs.sh ||
33216  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33217ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33218ac_delim='%!_!# '
33219for ac_last_try in false false false false false :; do
33220  . ./conf$$subs.sh ||
33221    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33222
33223  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33224  if test $ac_delim_n = $ac_delim_num; then
33225    break
33226  elif $ac_last_try; then
33227    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33228  else
33229    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33230  fi
33231done
33232rm -f conf$$subs.sh
33233
33234cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33235cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
33236_ACEOF
33237sed -n '
33238h
33239s/^/S["/; s/!.*/"]=/
33240p
33241g
33242s/^[^!]*!//
33243:repl
33244t repl
33245s/'"$ac_delim"'$//
33246t delim
33247:nl
33248h
33249s/\(.\{148\}\)..*/\1/
33250t more1
33251s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33252p
33253n
33254b repl
33255:more1
33256s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33257p
33258g
33259s/.\{148\}//
33260t nl
33261:delim
33262h
33263s/\(.\{148\}\)..*/\1/
33264t more2
33265s/["\\]/\\&/g; s/^/"/; s/$/"/
33266p
33267b
33268:more2
33269s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33270p
33271g
33272s/.\{148\}//
33273t delim
33274' <conf$$subs.awk | sed '
33275/^[^""]/{
33276  N
33277  s/\n//
33278}
33279' >>$CONFIG_STATUS || ac_write_fail=1
33280rm -f conf$$subs.awk
33281cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33282_ACAWK
33283cat >>"\$tmp/subs1.awk" <<_ACAWK &&
33284  for (key in S) S_is_set[key] = 1
33285  FS = ""
33286
33287}
33288{
33289  line = $ 0
33290  nfields = split(line, field, "@")
33291  substed = 0
33292  len = length(field[1])
33293  for (i = 2; i < nfields; i++) {
33294    key = field[i]
33295    keylen = length(key)
33296    if (S_is_set[key]) {
33297      value = S[key]
33298      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
33299      len += length(value) + length(field[++i])
33300      substed = 1
33301    } else
33302      len += 1 + keylen
33303  }
33304
33305  print line
33306}
33307
33308_ACAWK
33309_ACEOF
33310cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33311if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
33312  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
33313else
33314  cat
33315fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
33316  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
33317_ACEOF
33318
33319# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
33320# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
33321# trailing colons and then remove the whole line if VPATH becomes empty
33322# (actually we leave an empty line to preserve line numbers).
33323if test "x$srcdir" = x.; then
33324  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
33325h
33326s///
33327s/^/:/
33328s/[	 ]*$/:/
33329s/:\$(srcdir):/:/g
33330s/:\${srcdir}:/:/g
33331s/:@srcdir@:/:/g
33332s/^:*//
33333s/:*$//
33334x
33335s/\(=[	 ]*\).*/\1/
33336G
33337s/\n//
33338s/^[^=]*=[	 ]*$//
33339}'
33340fi
33341
33342cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33343fi # test -n "$CONFIG_FILES"
33344
33345# Set up the scripts for CONFIG_HEADERS section.
33346# No need to generate them if there are no CONFIG_HEADERS.
33347# This happens for instance with `./config.status Makefile'.
33348if test -n "$CONFIG_HEADERS"; then
33349cat >"$tmp/defines.awk" <<\_ACAWK ||
33350BEGIN {
33351_ACEOF
33352
33353# Transform confdefs.h into an awk script `defines.awk', embedded as
33354# here-document in config.status, that substitutes the proper values into
33355# config.h.in to produce config.h.
33356
33357# Create a delimiter string that does not exist in confdefs.h, to ease
33358# handling of long lines.
33359ac_delim='%!_!# '
33360for ac_last_try in false false :; do
33361  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
33362  if test -z "$ac_t"; then
33363    break
33364  elif $ac_last_try; then
33365    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
33366  else
33367    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33368  fi
33369done
33370
33371# For the awk script, D is an array of macro values keyed by name,
33372# likewise P contains macro parameters if any.  Preserve backslash
33373# newline sequences.
33374
33375ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
33376sed -n '
33377s/.\{148\}/&'"$ac_delim"'/g
33378t rset
33379:rset
33380s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
33381t def
33382d
33383:def
33384s/\\$//
33385t bsnl
33386s/["\\]/\\&/g
33387s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
33388D["\1"]=" \3"/p
33389s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
33390d
33391:bsnl
33392s/["\\]/\\&/g
33393s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
33394D["\1"]=" \3\\\\\\n"\\/p
33395t cont
33396s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
33397t cont
33398d
33399:cont
33400n
33401s/.\{148\}/&'"$ac_delim"'/g
33402t clear
33403:clear
33404s/\\$//
33405t bsnlc
33406s/["\\]/\\&/g; s/^/"/; s/$/"/p
33407d
33408:bsnlc
33409s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
33410b cont
33411' <confdefs.h | sed '
33412s/'"$ac_delim"'/"\\\
33413"/g' >>$CONFIG_STATUS || ac_write_fail=1
33414
33415cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33416  for (key in D) D_is_set[key] = 1
33417  FS = ""
33418}
33419/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
33420  line = \$ 0
33421  split(line, arg, " ")
33422  if (arg[1] == "#") {
33423    defundef = arg[2]
33424    mac1 = arg[3]
33425  } else {
33426    defundef = substr(arg[1], 2)
33427    mac1 = arg[2]
33428  }
33429  split(mac1, mac2, "(") #)
33430  macro = mac2[1]
33431  prefix = substr(line, 1, index(line, defundef) - 1)
33432  if (D_is_set[macro]) {
33433    # Preserve the white space surrounding the "#".
33434    print prefix "define", macro P[macro] D[macro]
33435    next
33436  } else {
33437    # Replace #undef with comments.  This is necessary, for example,
33438    # in the case of _POSIX_SOURCE, which is predefined and required
33439    # on some systems where configure will not decide to define it.
33440    if (defundef == "undef") {
33441      print "/*", prefix defundef, macro, "*/"
33442      next
33443    }
33444  }
33445}
33446{ print }
33447_ACAWK
33448_ACEOF
33449cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33450  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
33451fi # test -n "$CONFIG_HEADERS"
33452
33453
33454eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
33455shift
33456for ac_tag
33457do
33458  case $ac_tag in
33459  :[FHLC]) ac_mode=$ac_tag; continue;;
33460  esac
33461  case $ac_mode$ac_tag in
33462  :[FHL]*:*);;
33463  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
33464  :[FH]-) ac_tag=-:-;;
33465  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
33466  esac
33467  ac_save_IFS=$IFS
33468  IFS=:
33469  set x $ac_tag
33470  IFS=$ac_save_IFS
33471  shift
33472  ac_file=$1
33473  shift
33474
33475  case $ac_mode in
33476  :L) ac_source=$1;;
33477  :[FH])
33478    ac_file_inputs=
33479    for ac_f
33480    do
33481      case $ac_f in
33482      -) ac_f="$tmp/stdin";;
33483      *) # Look for the file first in the build tree, then in the source tree
33484	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
33485	 # because $ac_f cannot contain `:'.
33486	 test -f "$ac_f" ||
33487	   case $ac_f in
33488	   [\\/$]*) false;;
33489	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
33490	   esac ||
33491	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
33492      esac
33493      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
33494      as_fn_append ac_file_inputs " '$ac_f'"
33495    done
33496
33497    # Let's still pretend it is `configure' which instantiates (i.e., don't
33498    # use $as_me), people would be surprised to read:
33499    #    /* config.h.  Generated by config.status.  */
33500    configure_input='Generated from '`
33501	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
33502	`' by configure.'
33503    if test x"$ac_file" != x-; then
33504      configure_input="$ac_file.  $configure_input"
33505      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
33506$as_echo "$as_me: creating $ac_file" >&6;}
33507    fi
33508    # Neutralize special characters interpreted by sed in replacement strings.
33509    case $configure_input in #(
33510    *\&* | *\|* | *\\* )
33511       ac_sed_conf_input=`$as_echo "$configure_input" |
33512       sed 's/[\\\\&|]/\\\\&/g'`;; #(
33513    *) ac_sed_conf_input=$configure_input;;
33514    esac
33515
33516    case $ac_tag in
33517    *:-:* | *:-) cat >"$tmp/stdin" \
33518      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
33519    esac
33520    ;;
33521  esac
33522
33523  ac_dir=`$as_dirname -- "$ac_file" ||
33524$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33525	 X"$ac_file" : 'X\(//\)[^/]' \| \
33526	 X"$ac_file" : 'X\(//\)$' \| \
33527	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
33528$as_echo X"$ac_file" |
33529    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33530	    s//\1/
33531	    q
33532	  }
33533	  /^X\(\/\/\)[^/].*/{
33534	    s//\1/
33535	    q
33536	  }
33537	  /^X\(\/\/\)$/{
33538	    s//\1/
33539	    q
33540	  }
33541	  /^X\(\/\).*/{
33542	    s//\1/
33543	    q
33544	  }
33545	  s/.*/./; q'`
33546  as_dir="$ac_dir"; as_fn_mkdir_p
33547  ac_builddir=.
33548
33549case "$ac_dir" in
33550.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
33551*)
33552  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33553  # A ".." for each directory in $ac_dir_suffix.
33554  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33555  case $ac_top_builddir_sub in
33556  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
33557  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
33558  esac ;;
33559esac
33560ac_abs_top_builddir=$ac_pwd
33561ac_abs_builddir=$ac_pwd$ac_dir_suffix
33562# for backward compatibility:
33563ac_top_builddir=$ac_top_build_prefix
33564
33565case $srcdir in
33566  .)  # We are building in place.
33567    ac_srcdir=.
33568    ac_top_srcdir=$ac_top_builddir_sub
33569    ac_abs_top_srcdir=$ac_pwd ;;
33570  [\\/]* | ?:[\\/]* )  # Absolute name.
33571    ac_srcdir=$srcdir$ac_dir_suffix;
33572    ac_top_srcdir=$srcdir
33573    ac_abs_top_srcdir=$srcdir ;;
33574  *) # Relative name.
33575    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
33576    ac_top_srcdir=$ac_top_build_prefix$srcdir
33577    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
33578esac
33579ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
33580
33581
33582  case $ac_mode in
33583  :F)
33584  #
33585  # CONFIG_FILE
33586  #
33587
33588_ACEOF
33589
33590cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33591# If the template does not know about datarootdir, expand it.
33592# FIXME: This hack should be removed a few years after 2.60.
33593ac_datarootdir_hack=; ac_datarootdir_seen=
33594ac_sed_dataroot='
33595/datarootdir/ {
33596  p
33597  q
33598}
33599/@datadir@/p
33600/@docdir@/p
33601/@infodir@/p
33602/@localedir@/p
33603/@mandir@/p'
33604case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
33605*datarootdir*) ac_datarootdir_seen=yes;;
33606*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
33607  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33608$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33609_ACEOF
33610cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33611  ac_datarootdir_hack='
33612  s&@datadir@&$datadir&g
33613  s&@docdir@&$docdir&g
33614  s&@infodir@&$infodir&g
33615  s&@localedir@&$localedir&g
33616  s&@mandir@&$mandir&g
33617  s&\\\${datarootdir}&$datarootdir&g' ;;
33618esac
33619_ACEOF
33620
33621# Neutralize VPATH when `$srcdir' = `.'.
33622# Shell code in configure.ac might set extrasub.
33623# FIXME: do we really want to maintain this feature?
33624cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33625ac_sed_extra="$ac_vpsub
33626$extrasub
33627_ACEOF
33628cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33629:t
33630/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33631s|@configure_input@|$ac_sed_conf_input|;t t
33632s&@top_builddir@&$ac_top_builddir_sub&;t t
33633s&@top_build_prefix@&$ac_top_build_prefix&;t t
33634s&@srcdir@&$ac_srcdir&;t t
33635s&@abs_srcdir@&$ac_abs_srcdir&;t t
33636s&@top_srcdir@&$ac_top_srcdir&;t t
33637s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33638s&@builddir@&$ac_builddir&;t t
33639s&@abs_builddir@&$ac_abs_builddir&;t t
33640s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33641$ac_datarootdir_hack
33642"
33643eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
33644  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33645
33646test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33647  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
33648  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
33649  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33650which seems to be undefined.  Please make sure it is defined" >&5
33651$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33652which seems to be undefined.  Please make sure it is defined" >&2;}
33653
33654  rm -f "$tmp/stdin"
33655  case $ac_file in
33656  -) cat "$tmp/out" && rm -f "$tmp/out";;
33657  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
33658  esac \
33659  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33660 ;;
33661  :H)
33662  #
33663  # CONFIG_HEADER
33664  #
33665  if test x"$ac_file" != x-; then
33666    {
33667      $as_echo "/* $configure_input  */" \
33668      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
33669    } >"$tmp/config.h" \
33670      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33671    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
33672      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33673$as_echo "$as_me: $ac_file is unchanged" >&6;}
33674    else
33675      rm -f "$ac_file"
33676      mv "$tmp/config.h" "$ac_file" \
33677	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33678    fi
33679  else
33680    $as_echo "/* $configure_input  */" \
33681      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
33682      || as_fn_error $? "could not create -" "$LINENO" 5
33683  fi
33684 ;;
33685
33686
33687  esac
33688
33689done # for ac_tag
33690
33691
33692as_fn_exit 0
33693_ACEOF
33694ac_clean_files=$ac_clean_files_save
33695
33696test $ac_write_fail = 0 ||
33697  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33698
33699
33700# configure is writing to config.log, and then calls config.status.
33701# config.status does its own redirection, appending to config.log.
33702# Unfortunately, on DOS this fails, as config.log is still kept open
33703# by configure, so config.status won't be able to write to it; its
33704# output is simply discarded.  So we exec the FD to /dev/null,
33705# effectively closing config.log, so it can be properly (re)opened and
33706# appended to by config.status.  When coming back to configure, we
33707# need to make the FD available again.
33708if test "$no_create" != yes; then
33709  ac_cs_success=:
33710  ac_config_status_args=
33711  test "$silent" = yes &&
33712    ac_config_status_args="$ac_config_status_args --quiet"
33713  exec 5>/dev/null
33714  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33715  exec 5>>config.log
33716  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33717  # would make configure fail if this is the last instruction.
33718  $ac_cs_success || as_fn_exit 1
33719fi
33720if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33721  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33722$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33723fi
33724
33725
33726# Make the compare script executable
33727$CHMOD +x $OUTPUT_ROOT/compare.sh
33728
33729# Finally output some useful information to the user
33730
33731# Finally output some useful information to the user
33732
33733if test "x$CCACHE_FOUND" != x; then
33734	if  test "x$HAS_GOOD_CCACHE" = x; then
33735		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33736		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33737	else
33738		CCACHE_STATUS="installed and in use"
33739	fi
33740else
33741	if test "x$GCC" = xyes; then
33742		CCACHE_STATUS="not installed (consider installing)"
33743		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33744	else
33745		CCACHE_STATUS="not available for your system"
33746	fi
33747fi
33748
33749printf "\n"
33750printf "====================================================\n"
33751printf "A new configuration has been successfully created in\n"
33752printf "$OUTPUT_ROOT\n"
33753if test "x$CONFIGURE_COMMAND_LINE" != x; then
33754	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33755else
33756	printf "using default settings.\n"
33757fi
33758
33759printf "\n"
33760printf "Configuration summary:\n"
33761printf "* Debug level:    $DEBUG_LEVEL\n"
33762printf "* JDK variant:    $JDK_VARIANT\n"
33763printf "* JVM variants:   $with_jvm_variants\n"
33764printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33765
33766printf "\n"
33767printf "Tools summary:\n"
33768if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33769  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33770fi
33771printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33772printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33773printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33774
33775printf "\n"
33776printf "Build performance summary:\n"
33777printf "* Cores to use:   $JOBS\n"
33778printf "* Memory limit:   $MEMORY_SIZE MB\n"
33779printf "* ccache status:  $CCACHE_STATUS\n"
33780printf "\n"
33781
33782if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33783	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33784	printf "$CCACHE_HELP_MSG\n"
33785
33786    # Print a helpful message on how to acquire the necessary build dependency.
33787    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33788    MISSING_DEPENDENCY=ccache
33789    PKGHANDLER_COMMAND=
33790
33791    case $PKGHANDLER in
33792	apt-get)
33793                apt_help     $MISSING_DEPENDENCY ;;
33794    yum)
33795                yum_help     $MISSING_DEPENDENCY ;;
33796	port)
33797                port_help    $MISSING_DEPENDENCY ;;
33798	pkgutil)
33799                pkgutil_help $MISSING_DEPENDENCY ;;
33800	pkgadd)
33801                pkgadd_help  $MISSING_DEPENDENCY ;;
33802    * )
33803      break ;;
33804    esac
33805
33806    if test "x$PKGHANDLER_COMMAND" != x; then
33807        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33808    fi
33809
33810	printf "$HELP_MSG\n"
33811	printf "\n"
33812fi
33813
33814if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33815	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33816	printf "will result in longer build times.\n"
33817	printf "\n"
33818fi
33819
33820if test "x$FOUND_ALT_VARIABLES" != "x"; then
33821	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33822	printf "These are not respected, and will be ignored. It is recommended\n"
33823	printf "that you clean your environment. The following variables are set:\n"
33824	printf "$FOUND_ALT_VARIABLES\n"
33825	printf "\n"
33826fi
33827
33828if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33829	printf "WARNING: Your build output directory is not on a local disk.\n"
33830	printf "This will severely degrade build performance!\n"
33831	printf "It is recommended that you create an output directory on a local disk,\n"
33832	printf "and run the configure script again from that directory.\n"
33833	printf "\n"
33834fi
33835
33836if test "x$IS_RECONFIGURE" = "xyes"; then
33837	printf "WARNING: The result of this configuration has overridden an older\n"
33838	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33839	printf "proper build. Failure to do so might result in strange build problems.\n"
33840	printf "\n"
33841fi
33842
33843