generated-configure.sh revision 715:e247ee3924d5
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_JAVA
603JOBS
604MEMORY_SIZE
605NUM_CORES
606ENABLE_INTREE_EC
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611LLVM_LIBS
612LLVM_LDFLAGS
613LLVM_CFLAGS
614LLVM_CONFIG
615LIBFFI_LIBS
616LIBFFI_CFLAGS
617STATIC_CXX_SETTING
618LIBDL
619LIBM
620LIBZIP_CAN_USE_MMAP
621USE_EXTERNAL_LIBZ
622USE_EXTERNAL_LIBGIF
623USE_EXTERNAL_LIBJPEG
624ALSA_LIBS
625ALSA_CFLAGS
626FREETYPE2_LIB_PATH
627USING_SYSTEM_FT_LIB
628FREETYPE2_LIBS
629FREETYPE2_CFLAGS
630CUPS_CFLAGS
631OPENWIN_HOME
632X_EXTRA_LIBS
633X_LIBS
634X_PRE_LIBS
635X_CFLAGS
636XMKMF
637CXXFLAGS_DEBUG_SYMBOLS
638CFLAGS_DEBUG_SYMBOLS
639ZIP_DEBUGINFO_FILES
640ENABLE_DEBUG_SYMBOLS
641COMPILER_SUPPORTS_TARGET_BITS_FLAG
642ZERO_ARCHFLAG
643LDFLAGS_CXX_JDK
644LDFLAGS_JDKEXE_SUFFIX
645LDFLAGS_JDKLIB_SUFFIX
646LDFLAGS_JDKEXE
647LDFLAGS_JDKLIB
648CXXFLAGS_JDKEXE
649CXXFLAGS_JDKLIB
650CFLAGS_JDKEXE
651CFLAGS_JDKLIB
652MACOSX_VERSION_MIN
653PACKAGE_PATH
654LEGACY_EXTRA_LDFLAGS
655LEGACY_EXTRA_CXXFLAGS
656LEGACY_EXTRA_CFLAGS
657CXX_FLAG_DEPS
658C_FLAG_DEPS
659CXX_O_FLAG_NONE
660CXX_O_FLAG_NORM
661CXX_O_FLAG_HI
662CXX_O_FLAG_HIGHEST
663C_O_FLAG_NONE
664C_O_FLAG_NORM
665C_O_FLAG_HI
666C_O_FLAG_HIGHEST
667POST_MCS_CMD
668POST_STRIP_CMD
669SET_EXECUTABLE_ORIGIN
670SET_SHARED_LIBRARY_ORIGIN
671CXX_FLAG_REORDER
672C_FLAG_REORDER
673SET_SHARED_LIBRARY_MAPFILE
674SET_SHARED_LIBRARY_NAME
675SHARED_LIBRARY_FLAGS
676EXE_SUFFIX
677STATIC_LIBRARY_SUFFIX
678SHARED_LIBRARY_SUFFIX
679LIBRARY_PREFIX
680STATIC_LIBRARY
681SHARED_LIBRARY
682OBJ_SUFFIX
683COMPILER_NAME
684LIPO
685ac_ct_OBJDUMP
686OBJDUMP
687ac_ct_OBJCOPY
688OBJCOPY
689MCS
690STRIP
691GNM
692NM
693AS
694CXXCPP
695CPP
696COMPILER_TYPE
697RC_FLAGS
698DUMPBIN
699WINAR
700HOTSPOT_RC
701HOTSPOT_MT
702RC
703MT
704WINLD
705HOTSPOT_LD
706HOTSPOT_CXX
707ARFLAGS
708AR
709LDEXECXX
710LDCXX
711LDEXE
712LD
713ac_ct_OBJC
714OBJCFLAGS
715OBJC
716ac_ct_CXX
717CXXFLAGS
718CXX
719ac_ct_PROPER_COMPILER_CXX
720PROPER_COMPILER_CXX
721POTENTIAL_CXX
722TOOLS_DIR_CXX
723OBJEXT
724EXEEXT
725ac_ct_CC
726CPPFLAGS
727LDFLAGS
728CFLAGS
729CC
730ac_ct_PROPER_COMPILER_CC
731PROPER_COMPILER_CC
732POTENTIAL_CC
733TOOLS_DIR_CC
734BUILD_LD
735BUILD_CXX
736BUILD_CC
737MSVCR_DLL
738DXSDK_INCLUDE_PATH
739DXSDK_LIB_PATH
740VS_PATH
741VS_LIB
742VS_INCLUDE
743CYGWIN_LINK
744AR_OUT_OPTION
745LD_OUT_OPTION
746EXE_OUT_OPTION
747CC_OUT_OPTION
748BUILD_HOTSPOT
749HOTSPOT_DIST
750BUILD_OUTPUT
751OVERRIDE_SRC_ROOT
752ADD_SRC_ROOT
753JDK_TOPDIR
754NASHORN_TOPDIR
755HOTSPOT_TOPDIR
756JAXWS_TOPDIR
757JAXP_TOPDIR
758CORBA_TOPDIR
759LANGTOOLS_TOPDIR
760BOOT_JDK_JVMARGS
761JAVAC_FLAGS
762BOOT_JDK_SOURCETARGET
763BOOT_JDK
764BOOT_TOOLSJAR
765BOOT_RTJAR
766JAVA_CHECK
767JAVAC_CHECK
768COOKED_BUILD_NUMBER
769JDK_VERSION
770COPYRIGHT_YEAR
771MACOSX_BUNDLE_ID_BASE
772MACOSX_BUNDLE_NAME_BASE
773COMPANY_NAME
774JDK_RC_PLATFORM_NAME
775PRODUCT_SUFFIX
776PRODUCT_NAME
777LAUNCHER_NAME
778MILESTONE
779JDK_BUILD_NUMBER
780JDK_UPDATE_VERSION
781JDK_MICRO_VERSION
782JDK_MINOR_VERSION
783JDK_MAJOR_VERSION
784USER_RELEASE_SUFFIX
785COMPRESS_JARS
786UNLIMITED_CRYPTO
787CACERTS_FILE
788TEST_IN_BUILD
789BUILD_HEADLESS
790SUPPORT_HEADFUL
791SUPPORT_HEADLESS
792BDEPS_FTP
793BDEPS_UNZIP
794OS_VERSION_MICRO
795OS_VERSION_MINOR
796OS_VERSION_MAJOR
797PKG_CONFIG
798XATTR
799TIME
800STAT
801HG
802READELF
803OTOOL
804LDD
805ZIP
806UNZIP
807FIND_DELETE
808MAKE
809CHECK_TOOLSDIR_MAKE
810CHECK_TOOLSDIR_GMAKE
811CHECK_MAKE
812CHECK_GMAKE
813PKGHANDLER
814OUTPUT_ROOT
815CONF_NAME
816SPEC
817BUILD_VARIANT_RELEASE
818DEBUG_CLASSFILES
819FASTDEBUG
820VARIANT
821DEBUG_LEVEL
822MACOSX_UNIVERSAL
823INCLUDE_SA
824JVM_VARIANT_ZEROSHARK
825JVM_VARIANT_ZERO
826JVM_VARIANT_KERNEL
827JVM_VARIANT_MINIMAL1
828JVM_VARIANT_CLIENT
829JVM_VARIANT_SERVER
830JVM_VARIANTS
831JDK_VARIANT
832SET_OPENJDK
833BUILD_LOG_WRAPPER
834BUILD_LOG_PREVIOUS
835BUILD_LOG
836SYS_ROOT
837PATH_SEP
838SRC_ROOT
839ZERO_ARCHDEF
840DEFINE_CROSS_COMPILE_ARCH
841LP64
842OPENJDK_TARGET_OS_API_DIR
843OPENJDK_TARGET_CPU_JLI_CFLAGS
844OPENJDK_TARGET_CPU_OSARCH
845OPENJDK_TARGET_CPU_ISADIR
846OPENJDK_TARGET_CPU_LIBDIR
847OPENJDK_TARGET_CPU_LEGACY_LIB
848OPENJDK_TARGET_CPU_LEGACY
849REQUIRED_OS_VERSION
850REQUIRED_OS_NAME
851COMPILE_TYPE
852OPENJDK_TARGET_CPU_ENDIAN
853OPENJDK_TARGET_CPU_BITS
854OPENJDK_TARGET_CPU_ARCH
855OPENJDK_TARGET_CPU
856OPENJDK_TARGET_OS_API
857OPENJDK_TARGET_OS
858OPENJDK_BUILD_CPU_ENDIAN
859OPENJDK_BUILD_CPU_BITS
860OPENJDK_BUILD_CPU_ARCH
861OPENJDK_BUILD_CPU
862OPENJDK_BUILD_OS_API
863OPENJDK_BUILD_OS
864OPENJDK_BUILD_AUTOCONF_NAME
865OPENJDK_TARGET_AUTOCONF_NAME
866target_os
867target_vendor
868target_cpu
869target
870host_os
871host_vendor
872host_cpu
873host
874build_os
875build_vendor
876build_cpu
877build
878SETFILE
879DF
880READLINK
881CYGPATH
882NAWK
883SED
884FGREP
885EGREP
886GREP
887AWK
888XARGS
889WHICH
890WC
891UNIQ
892UNAME
893TR
894TOUCH
895TEE
896TAR
897TAIL
898SORT
899SH
900RM
901THEPWDCMD
902PRINTF
903MV
904MKTEMP
905MKDIR
906LS
907LN
908HEAD
909FIND
910FILE
911EXPR
912ECHO
913DIRNAME
914DIFF
915DATE
916CUT
917CPIO
918CP
919COMM
920CMP
921CHMOD
922CAT
923BASH
924BASENAME
925DATE_WHEN_CONFIGURED
926CONFIGURE_COMMAND_LINE
927CUSTOM_MAKE_DIR
928target_alias
929host_alias
930build_alias
931LIBS
932ECHO_T
933ECHO_N
934ECHO_C
935DEFS
936mandir
937localedir
938libdir
939psdir
940pdfdir
941dvidir
942htmldir
943infodir
944docdir
945oldincludedir
946includedir
947localstatedir
948sharedstatedir
949sysconfdir
950datadir
951datarootdir
952libexecdir
953sbindir
954bindir
955program_transform_name
956prefix
957exec_prefix
958PACKAGE_URL
959PACKAGE_BUGREPORT
960PACKAGE_STRING
961PACKAGE_VERSION
962PACKAGE_TARNAME
963PACKAGE_NAME
964PATH_SEPARATOR
965SHELL'
966ac_subst_files=''
967ac_user_opts='
968enable_option_checking
969with_custom_make_dir
970with_target_bits
971with_sys_root
972with_tools_dir
973with_devkit
974enable_openjdk_only
975with_jdk_variant
976with_jvm_variants
977enable_debug
978with_debug_level
979with_conf_name
980with_builddeps_conf
981with_builddeps_server
982with_builddeps_dir
983with_builddeps_group
984enable_headful
985enable_hotspot_test_in_build
986with_cacerts_file
987enable_unlimited_crypto
988with_milestone
989with_build_number
990with_user_release_suffix
991with_boot_jdk
992with_boot_jdk_jvmargs
993with_add_source_root
994with_override_source_root
995with_adds_and_overrides
996with_override_langtools
997with_override_corba
998with_override_jaxp
999with_override_jaxws
1000with_override_hotspot
1001with_override_jdk
1002with_import_hotspot
1003with_msvcr_dll
1004with_dxsdk
1005with_dxsdk_lib
1006with_dxsdk_include
1007with_extra_cflags
1008with_extra_cxxflags
1009with_extra_ldflags
1010enable_debug_symbols
1011enable_zip_debug_info
1012enable_macosx_runtime_support
1013with_x
1014with_cups
1015with_cups_include
1016with_freetype
1017with_alsa
1018with_alsa_include
1019with_alsa_lib
1020with_giflib
1021with_zlib
1022with_stdc__lib
1023with_num_cores
1024with_memory_size
1025with_jobs
1026with_sjavac_server_java
1027enable_sjavac
1028enable_precompiled_headers
1029enable_ccache
1030with_ccache_dir
1031'
1032      ac_precious_vars='build_alias
1033host_alias
1034target_alias
1035PKG_CONFIG
1036CC
1037CFLAGS
1038LDFLAGS
1039LIBS
1040CPPFLAGS
1041CXX
1042CXXFLAGS
1043CCC
1044OBJC
1045OBJCFLAGS
1046CPP
1047CXXCPP
1048XMKMF
1049FREETYPE2_CFLAGS
1050FREETYPE2_LIBS
1051ALSA_CFLAGS
1052ALSA_LIBS
1053LIBFFI_CFLAGS
1054LIBFFI_LIBS'
1055
1056
1057# Initialize some variables set by options.
1058ac_init_help=
1059ac_init_version=false
1060ac_unrecognized_opts=
1061ac_unrecognized_sep=
1062# The variables have the same names as the options, with
1063# dashes changed to underlines.
1064cache_file=/dev/null
1065exec_prefix=NONE
1066no_create=
1067no_recursion=
1068prefix=NONE
1069program_prefix=NONE
1070program_suffix=NONE
1071program_transform_name=s,x,x,
1072silent=
1073site=
1074srcdir=
1075verbose=
1076x_includes=NONE
1077x_libraries=NONE
1078
1079# Installation directory options.
1080# These are left unexpanded so users can "make install exec_prefix=/foo"
1081# and all the variables that are supposed to be based on exec_prefix
1082# by default will actually change.
1083# Use braces instead of parens because sh, perl, etc. also accept them.
1084# (The list follows the same order as the GNU Coding Standards.)
1085bindir='${exec_prefix}/bin'
1086sbindir='${exec_prefix}/sbin'
1087libexecdir='${exec_prefix}/libexec'
1088datarootdir='${prefix}/share'
1089datadir='${datarootdir}'
1090sysconfdir='${prefix}/etc'
1091sharedstatedir='${prefix}/com'
1092localstatedir='${prefix}/var'
1093includedir='${prefix}/include'
1094oldincludedir='/usr/include'
1095docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1096infodir='${datarootdir}/info'
1097htmldir='${docdir}'
1098dvidir='${docdir}'
1099pdfdir='${docdir}'
1100psdir='${docdir}'
1101libdir='${exec_prefix}/lib'
1102localedir='${datarootdir}/locale'
1103mandir='${datarootdir}/man'
1104
1105ac_prev=
1106ac_dashdash=
1107for ac_option
1108do
1109  # If the previous option needs an argument, assign it.
1110  if test -n "$ac_prev"; then
1111    eval $ac_prev=\$ac_option
1112    ac_prev=
1113    continue
1114  fi
1115
1116  case $ac_option in
1117  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1118  *=)   ac_optarg= ;;
1119  *)    ac_optarg=yes ;;
1120  esac
1121
1122  # Accept the important Cygnus configure options, so we can diagnose typos.
1123
1124  case $ac_dashdash$ac_option in
1125  --)
1126    ac_dashdash=yes ;;
1127
1128  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1129    ac_prev=bindir ;;
1130  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1131    bindir=$ac_optarg ;;
1132
1133  -build | --build | --buil | --bui | --bu)
1134    ac_prev=build_alias ;;
1135  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1136    build_alias=$ac_optarg ;;
1137
1138  -cache-file | --cache-file | --cache-fil | --cache-fi \
1139  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1140    ac_prev=cache_file ;;
1141  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1142  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1143    cache_file=$ac_optarg ;;
1144
1145  --config-cache | -C)
1146    cache_file=config.cache ;;
1147
1148  -datadir | --datadir | --datadi | --datad)
1149    ac_prev=datadir ;;
1150  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1151    datadir=$ac_optarg ;;
1152
1153  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1154  | --dataroo | --dataro | --datar)
1155    ac_prev=datarootdir ;;
1156  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1157  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1158    datarootdir=$ac_optarg ;;
1159
1160  -disable-* | --disable-*)
1161    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1162    # Reject names that are not valid shell variable names.
1163    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1164      as_fn_error $? "invalid feature name: $ac_useropt"
1165    ac_useropt_orig=$ac_useropt
1166    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1167    case $ac_user_opts in
1168      *"
1169"enable_$ac_useropt"
1170"*) ;;
1171      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1172	 ac_unrecognized_sep=', ';;
1173    esac
1174    eval enable_$ac_useropt=no ;;
1175
1176  -docdir | --docdir | --docdi | --doc | --do)
1177    ac_prev=docdir ;;
1178  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1179    docdir=$ac_optarg ;;
1180
1181  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1182    ac_prev=dvidir ;;
1183  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1184    dvidir=$ac_optarg ;;
1185
1186  -enable-* | --enable-*)
1187    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1188    # Reject names that are not valid shell variable names.
1189    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1190      as_fn_error $? "invalid feature name: $ac_useropt"
1191    ac_useropt_orig=$ac_useropt
1192    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1193    case $ac_user_opts in
1194      *"
1195"enable_$ac_useropt"
1196"*) ;;
1197      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1198	 ac_unrecognized_sep=', ';;
1199    esac
1200    eval enable_$ac_useropt=\$ac_optarg ;;
1201
1202  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1203  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1204  | --exec | --exe | --ex)
1205    ac_prev=exec_prefix ;;
1206  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1207  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1208  | --exec=* | --exe=* | --ex=*)
1209    exec_prefix=$ac_optarg ;;
1210
1211  -gas | --gas | --ga | --g)
1212    # Obsolete; use --with-gas.
1213    with_gas=yes ;;
1214
1215  -help | --help | --hel | --he | -h)
1216    ac_init_help=long ;;
1217  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1218    ac_init_help=recursive ;;
1219  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1220    ac_init_help=short ;;
1221
1222  -host | --host | --hos | --ho)
1223    ac_prev=host_alias ;;
1224  -host=* | --host=* | --hos=* | --ho=*)
1225    host_alias=$ac_optarg ;;
1226
1227  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1228    ac_prev=htmldir ;;
1229  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1230  | --ht=*)
1231    htmldir=$ac_optarg ;;
1232
1233  -includedir | --includedir | --includedi | --included | --include \
1234  | --includ | --inclu | --incl | --inc)
1235    ac_prev=includedir ;;
1236  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1237  | --includ=* | --inclu=* | --incl=* | --inc=*)
1238    includedir=$ac_optarg ;;
1239
1240  -infodir | --infodir | --infodi | --infod | --info | --inf)
1241    ac_prev=infodir ;;
1242  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1243    infodir=$ac_optarg ;;
1244
1245  -libdir | --libdir | --libdi | --libd)
1246    ac_prev=libdir ;;
1247  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1248    libdir=$ac_optarg ;;
1249
1250  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1251  | --libexe | --libex | --libe)
1252    ac_prev=libexecdir ;;
1253  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1254  | --libexe=* | --libex=* | --libe=*)
1255    libexecdir=$ac_optarg ;;
1256
1257  -localedir | --localedir | --localedi | --localed | --locale)
1258    ac_prev=localedir ;;
1259  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1260    localedir=$ac_optarg ;;
1261
1262  -localstatedir | --localstatedir | --localstatedi | --localstated \
1263  | --localstate | --localstat | --localsta | --localst | --locals)
1264    ac_prev=localstatedir ;;
1265  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1266  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1267    localstatedir=$ac_optarg ;;
1268
1269  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1270    ac_prev=mandir ;;
1271  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1272    mandir=$ac_optarg ;;
1273
1274  -nfp | --nfp | --nf)
1275    # Obsolete; use --without-fp.
1276    with_fp=no ;;
1277
1278  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1279  | --no-cr | --no-c | -n)
1280    no_create=yes ;;
1281
1282  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1283  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1284    no_recursion=yes ;;
1285
1286  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1287  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1288  | --oldin | --oldi | --old | --ol | --o)
1289    ac_prev=oldincludedir ;;
1290  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1291  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1292  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1293    oldincludedir=$ac_optarg ;;
1294
1295  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1296    ac_prev=prefix ;;
1297  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1298    prefix=$ac_optarg ;;
1299
1300  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1301  | --program-pre | --program-pr | --program-p)
1302    ac_prev=program_prefix ;;
1303  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1304  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1305    program_prefix=$ac_optarg ;;
1306
1307  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1308  | --program-suf | --program-su | --program-s)
1309    ac_prev=program_suffix ;;
1310  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1311  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1312    program_suffix=$ac_optarg ;;
1313
1314  -program-transform-name | --program-transform-name \
1315  | --program-transform-nam | --program-transform-na \
1316  | --program-transform-n | --program-transform- \
1317  | --program-transform | --program-transfor \
1318  | --program-transfo | --program-transf \
1319  | --program-trans | --program-tran \
1320  | --progr-tra | --program-tr | --program-t)
1321    ac_prev=program_transform_name ;;
1322  -program-transform-name=* | --program-transform-name=* \
1323  | --program-transform-nam=* | --program-transform-na=* \
1324  | --program-transform-n=* | --program-transform-=* \
1325  | --program-transform=* | --program-transfor=* \
1326  | --program-transfo=* | --program-transf=* \
1327  | --program-trans=* | --program-tran=* \
1328  | --progr-tra=* | --program-tr=* | --program-t=*)
1329    program_transform_name=$ac_optarg ;;
1330
1331  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1332    ac_prev=pdfdir ;;
1333  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1334    pdfdir=$ac_optarg ;;
1335
1336  -psdir | --psdir | --psdi | --psd | --ps)
1337    ac_prev=psdir ;;
1338  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1339    psdir=$ac_optarg ;;
1340
1341  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1342  | -silent | --silent | --silen | --sile | --sil)
1343    silent=yes ;;
1344
1345  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1346    ac_prev=sbindir ;;
1347  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1348  | --sbi=* | --sb=*)
1349    sbindir=$ac_optarg ;;
1350
1351  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1352  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1353  | --sharedst | --shareds | --shared | --share | --shar \
1354  | --sha | --sh)
1355    ac_prev=sharedstatedir ;;
1356  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1357  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1358  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1359  | --sha=* | --sh=*)
1360    sharedstatedir=$ac_optarg ;;
1361
1362  -site | --site | --sit)
1363    ac_prev=site ;;
1364  -site=* | --site=* | --sit=*)
1365    site=$ac_optarg ;;
1366
1367  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1368    ac_prev=srcdir ;;
1369  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1370    srcdir=$ac_optarg ;;
1371
1372  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1373  | --syscon | --sysco | --sysc | --sys | --sy)
1374    ac_prev=sysconfdir ;;
1375  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1376  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1377    sysconfdir=$ac_optarg ;;
1378
1379  -target | --target | --targe | --targ | --tar | --ta | --t)
1380    ac_prev=target_alias ;;
1381  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1382    target_alias=$ac_optarg ;;
1383
1384  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1385    verbose=yes ;;
1386
1387  -version | --version | --versio | --versi | --vers | -V)
1388    ac_init_version=: ;;
1389
1390  -with-* | --with-*)
1391    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1392    # Reject names that are not valid shell variable names.
1393    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1394      as_fn_error $? "invalid package name: $ac_useropt"
1395    ac_useropt_orig=$ac_useropt
1396    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1397    case $ac_user_opts in
1398      *"
1399"with_$ac_useropt"
1400"*) ;;
1401      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1402	 ac_unrecognized_sep=', ';;
1403    esac
1404    eval with_$ac_useropt=\$ac_optarg ;;
1405
1406  -without-* | --without-*)
1407    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1408    # Reject names that are not valid shell variable names.
1409    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1410      as_fn_error $? "invalid package name: $ac_useropt"
1411    ac_useropt_orig=$ac_useropt
1412    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1413    case $ac_user_opts in
1414      *"
1415"with_$ac_useropt"
1416"*) ;;
1417      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1418	 ac_unrecognized_sep=', ';;
1419    esac
1420    eval with_$ac_useropt=no ;;
1421
1422  --x)
1423    # Obsolete; use --with-x.
1424    with_x=yes ;;
1425
1426  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1427  | --x-incl | --x-inc | --x-in | --x-i)
1428    ac_prev=x_includes ;;
1429  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1430  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1431    x_includes=$ac_optarg ;;
1432
1433  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1434  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1435    ac_prev=x_libraries ;;
1436  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1437  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1438    x_libraries=$ac_optarg ;;
1439
1440  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1441Try \`$0 --help' for more information"
1442    ;;
1443
1444  *=*)
1445    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1446    # Reject names that are not valid shell variable names.
1447    case $ac_envvar in #(
1448      '' | [0-9]* | *[!_$as_cr_alnum]* )
1449      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1450    esac
1451    eval $ac_envvar=\$ac_optarg
1452    export $ac_envvar ;;
1453
1454  *)
1455    # FIXME: should be removed in autoconf 3.0.
1456    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1457    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1458      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1459    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1460    ;;
1461
1462  esac
1463done
1464
1465if test -n "$ac_prev"; then
1466  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1467  as_fn_error $? "missing argument to $ac_option"
1468fi
1469
1470if test -n "$ac_unrecognized_opts"; then
1471  case $enable_option_checking in
1472    no) ;;
1473    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1474    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1475  esac
1476fi
1477
1478# Check all directory arguments for consistency.
1479for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1480		datadir sysconfdir sharedstatedir localstatedir includedir \
1481		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1482		libdir localedir mandir
1483do
1484  eval ac_val=\$$ac_var
1485  # Remove trailing slashes.
1486  case $ac_val in
1487    */ )
1488      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1489      eval $ac_var=\$ac_val;;
1490  esac
1491  # Be sure to have absolute directory names.
1492  case $ac_val in
1493    [\\/$]* | ?:[\\/]* )  continue;;
1494    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1495  esac
1496  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1497done
1498
1499# There might be people who depend on the old broken behavior: `$host'
1500# used to hold the argument of --host etc.
1501# FIXME: To remove some day.
1502build=$build_alias
1503host=$host_alias
1504target=$target_alias
1505
1506# FIXME: To remove some day.
1507if test "x$host_alias" != x; then
1508  if test "x$build_alias" = x; then
1509    cross_compiling=maybe
1510    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1511    If a cross compiler is detected then cross compile mode will be used" >&2
1512  elif test "x$build_alias" != "x$host_alias"; then
1513    cross_compiling=yes
1514  fi
1515fi
1516
1517ac_tool_prefix=
1518test -n "$host_alias" && ac_tool_prefix=$host_alias-
1519
1520test "$silent" = yes && exec 6>/dev/null
1521
1522
1523ac_pwd=`pwd` && test -n "$ac_pwd" &&
1524ac_ls_di=`ls -di .` &&
1525ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1526  as_fn_error $? "working directory cannot be determined"
1527test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1528  as_fn_error $? "pwd does not report name of working directory"
1529
1530
1531# Find the source files, if location was not specified.
1532if test -z "$srcdir"; then
1533  ac_srcdir_defaulted=yes
1534  # Try the directory containing this script, then the parent directory.
1535  ac_confdir=`$as_dirname -- "$as_myself" ||
1536$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1537	 X"$as_myself" : 'X\(//\)[^/]' \| \
1538	 X"$as_myself" : 'X\(//\)$' \| \
1539	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1540$as_echo X"$as_myself" |
1541    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1542	    s//\1/
1543	    q
1544	  }
1545	  /^X\(\/\/\)[^/].*/{
1546	    s//\1/
1547	    q
1548	  }
1549	  /^X\(\/\/\)$/{
1550	    s//\1/
1551	    q
1552	  }
1553	  /^X\(\/\).*/{
1554	    s//\1/
1555	    q
1556	  }
1557	  s/.*/./; q'`
1558  srcdir=$ac_confdir
1559  if test ! -r "$srcdir/$ac_unique_file"; then
1560    srcdir=..
1561  fi
1562else
1563  ac_srcdir_defaulted=no
1564fi
1565if test ! -r "$srcdir/$ac_unique_file"; then
1566  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1567  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1568fi
1569ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1570ac_abs_confdir=`(
1571	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1572	pwd)`
1573# When building in place, set srcdir=.
1574if test "$ac_abs_confdir" = "$ac_pwd"; then
1575  srcdir=.
1576fi
1577# Remove unnecessary trailing slashes from srcdir.
1578# Double slashes in file names in object file debugging info
1579# mess up M-x gdb in Emacs.
1580case $srcdir in
1581*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1582esac
1583for ac_var in $ac_precious_vars; do
1584  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1585  eval ac_env_${ac_var}_value=\$${ac_var}
1586  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1587  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1588done
1589
1590#
1591# Report the --help message.
1592#
1593if test "$ac_init_help" = "long"; then
1594  # Omit some internal or obsolete options to make the list less imposing.
1595  # This message is too long to be a string in the A/UX 3.1 sh.
1596  cat <<_ACEOF
1597\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1598
1599Usage: $0 [OPTION]... [VAR=VALUE]...
1600
1601To assign environment variables (e.g., CC, CFLAGS...), specify them as
1602VAR=VALUE.  See below for descriptions of some of the useful variables.
1603
1604Defaults for the options are specified in brackets.
1605
1606Configuration:
1607  -h, --help              display this help and exit
1608      --help=short        display options specific to this package
1609      --help=recursive    display the short help of all the included packages
1610  -V, --version           display version information and exit
1611  -q, --quiet, --silent   do not print \`checking ...' messages
1612      --cache-file=FILE   cache test results in FILE [disabled]
1613  -C, --config-cache      alias for \`--cache-file=config.cache'
1614  -n, --no-create         do not create output files
1615      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1616
1617Installation directories:
1618  --prefix=PREFIX         install architecture-independent files in PREFIX
1619                          [$ac_default_prefix]
1620  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1621                          [PREFIX]
1622
1623By default, \`make install' will install all the files in
1624\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1625an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1626for instance \`--prefix=\$HOME'.
1627
1628For better control, use the options below.
1629
1630Fine tuning of the installation directories:
1631  --bindir=DIR            user executables [EPREFIX/bin]
1632  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1633  --libexecdir=DIR        program executables [EPREFIX/libexec]
1634  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1635  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1636  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1637  --libdir=DIR            object code libraries [EPREFIX/lib]
1638  --includedir=DIR        C header files [PREFIX/include]
1639  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1640  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1641  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1642  --infodir=DIR           info documentation [DATAROOTDIR/info]
1643  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1644  --mandir=DIR            man documentation [DATAROOTDIR/man]
1645  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1646  --htmldir=DIR           html documentation [DOCDIR]
1647  --dvidir=DIR            dvi documentation [DOCDIR]
1648  --pdfdir=DIR            pdf documentation [DOCDIR]
1649  --psdir=DIR             ps documentation [DOCDIR]
1650_ACEOF
1651
1652  cat <<\_ACEOF
1653
1654X features:
1655  --x-includes=DIR    X include files are in DIR
1656  --x-libraries=DIR   X library files are in DIR
1657
1658System types:
1659  --build=BUILD     configure for building on BUILD [guessed]
1660  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1661  --target=TARGET   configure for building compilers for TARGET [HOST]
1662_ACEOF
1663fi
1664
1665if test -n "$ac_init_help"; then
1666  case $ac_init_help in
1667     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1668   esac
1669  cat <<\_ACEOF
1670
1671Optional Features:
1672  --disable-option-checking  ignore unrecognized --enable/--with options
1673  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1674  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1675  --enable-openjdk-only   suppress building custom source even if present
1676                          [disabled]
1677  --enable-debug          set the debug level to fastdebug (shorthand for
1678                          --with-debug-level=fastdebug) [disabled]
1679  --disable-headful       disable building headful support (graphical UI
1680                          support) [enabled]
1681  --enable-hotspot-test-in-build
1682                          run the Queens test after Hotspot build [disabled]
1683  --enable-unlimited-crypto
1684                          Enable unlimited crypto policy [disabled]
1685  --disable-debug-symbols disable generation of debug symbols [enabled]
1686  --disable-zip-debug-info
1687                          disable zipping of debug-info files [enabled]
1688  --disable-macosx-runtime-support
1689                          disable the use of MacOSX Java runtime support
1690                          framework [enabled]
1691  --enable-sjavac         use sjavac to do fast incremental compiles
1692                          [disabled]
1693  --disable-precompiled-headers
1694                          disable using precompiled headers when compiling C++
1695                          [enabled]
1696  --disable-ccache        disable using ccache to speed up recompilations
1697                          [enabled]
1698
1699Optional Packages:
1700  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1701  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1702  --with-custom-make-dir  use this directory for custom build/make files
1703  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1704                          support it), e.g. --with-target-bits=32 [guessed]
1705  --with-sys-root         pass this sys-root to the compilers and tools (for
1706                          cross-compiling)
1707  --with-tools-dir        search this directory for compilers and tools (for
1708                          cross-compiling)
1709  --with-devkit           use this directory as base for tools-dir and
1710                          sys-root (for cross-compiling)
1711  --with-jdk-variant      JDK variant to build (normal) [normal]
1712  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1713                          client, minimal1, kernel, zero, zeroshark) [server]
1714  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1715                          [release]
1716  --with-conf-name        use this as the name of the configuration [generated
1717                          from important configuration options]
1718  --with-builddeps-conf   use this configuration file for the builddeps
1719  --with-builddeps-server download and use build dependencies from this server
1720                          url
1721  --with-builddeps-dir    store downloaded build dependencies here
1722                          [/localhome/builddeps]
1723  --with-builddeps-group  chgrp the downloaded build dependencies to this
1724                          group
1725  --with-cacerts-file     specify alternative cacerts file
1726  --with-milestone        Set milestone value for build [internal]
1727  --with-build-number     Set build number value for build [b00]
1728  --with-user-release-suffix
1729                          Add a custom string to the version string if build
1730                          number isn't set.[username_builddateb00]
1731  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1732  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1733                          invocations of the Boot JDK, overriding the default
1734                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1735                          -enableassertions"
1736  --with-add-source-root  for each and every source directory, look in this
1737                          additional source root for the same directory; if it
1738                          exists and have files in it, include it in the build
1739  --with-override-source-root
1740                          for each and every source directory, look in this
1741                          override source root for the same directory; if it
1742                          exists, use that directory instead and ignore the
1743                          directory in the original source root
1744  --with-adds-and-overrides
1745                          use the subdirs 'adds' and 'overrides' in the
1746                          specified directory as add-source-root and
1747                          override-source-root
1748  --with-override-langtools
1749                          use this langtools dir for the build
1750  --with-override-corba   use this corba dir for the build
1751  --with-override-jaxp    use this jaxp dir for the build
1752  --with-override-jaxws   use this jaxws dir for the build
1753  --with-override-hotspot use this hotspot dir for the build
1754  --with-override-jdk     use this jdk dir for the build
1755  --with-import-hotspot   import hotspot binaries from this jdk image or
1756                          hotspot build dist dir instead of building from
1757                          source
1758  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1759                          only) [probed]
1760  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1761  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1762                          [probed]
1763  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1764                          [probed]
1765  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1766  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1767  --with-extra-ldflags    extra flags to be used when linking jdk
1768  --with-x                use the X Window System
1769  --with-cups             specify prefix directory for the cups package
1770                          (expecting the headers under PATH/include)
1771  --with-cups-include     specify directory for the cups include files
1772  --with-freetype         specify prefix directory for the freetype2 package
1773                          (expecting the libraries under PATH/lib and the
1774                          headers under PATH/include)
1775  --with-alsa             specify prefix directory for the alsa package
1776                          (expecting the libraries under PATH/lib and the
1777                          headers under PATH/include)
1778  --with-alsa-include     specify directory for the alsa include files
1779  --with-alsa-lib         specify directory for the alsa library
1780  --with-giflib           use giflib from build system or OpenJDK source
1781                          (system, bundled) [bundled]
1782  --with-zlib             use zlib from build system or OpenJDK source
1783                          (system, bundled) [bundled]
1784  --with-stdc++lib=<static>,<dynamic>,<default>
1785                          force linking of the C++ runtime on Linux to either
1786                          static or dynamic, default is static with dynamic as
1787                          fallback
1788  --with-num-cores        number of cores in the build system, e.g.
1789                          --with-num-cores=8 [probed]
1790  --with-memory-size      memory (in MB) available in the build system, e.g.
1791                          --with-memory-size=1024 [probed]
1792  --with-jobs             number of parallel jobs to let make run [calculated
1793                          based on cores and memory]
1794  --with-sjavac-server-java
1795                          use this java binary for running the sjavac
1796                          background server [Boot JDK java]
1797  --with-ccache-dir       where to store ccache files [~/.ccache]
1798
1799Some influential environment variables:
1800  PKG_CONFIG  path to pkg-config utility
1801  CC          C compiler command
1802  CFLAGS      C compiler flags
1803  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1804              nonstandard directory <lib dir>
1805  LIBS        libraries to pass to the linker, e.g. -l<library>
1806  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1807              you have headers in a nonstandard directory <include dir>
1808  CXX         C++ compiler command
1809  CXXFLAGS    C++ compiler flags
1810  OBJC        Objective C compiler command
1811  OBJCFLAGS   Objective C compiler flags
1812  CPP         C preprocessor
1813  CXXCPP      C++ preprocessor
1814  XMKMF       Path to xmkmf, Makefile generator for X Window System
1815  FREETYPE2_CFLAGS
1816              C compiler flags for FREETYPE2, overriding pkg-config
1817  FREETYPE2_LIBS
1818              linker flags for FREETYPE2, overriding pkg-config
1819  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1820  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1821  LIBFFI_CFLAGS
1822              C compiler flags for LIBFFI, overriding pkg-config
1823  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1824
1825Use these variables to override the choices made by `configure' or to help
1826it to find libraries and programs with nonstandard names/locations.
1827
1828Report bugs to <build-dev@openjdk.java.net>.
1829OpenJDK home page: <http://openjdk.java.net>.
1830_ACEOF
1831ac_status=$?
1832fi
1833
1834if test "$ac_init_help" = "recursive"; then
1835  # If there are subdirs, report their specific --help.
1836  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1837    test -d "$ac_dir" ||
1838      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1839      continue
1840    ac_builddir=.
1841
1842case "$ac_dir" in
1843.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1844*)
1845  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1846  # A ".." for each directory in $ac_dir_suffix.
1847  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1848  case $ac_top_builddir_sub in
1849  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1850  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1851  esac ;;
1852esac
1853ac_abs_top_builddir=$ac_pwd
1854ac_abs_builddir=$ac_pwd$ac_dir_suffix
1855# for backward compatibility:
1856ac_top_builddir=$ac_top_build_prefix
1857
1858case $srcdir in
1859  .)  # We are building in place.
1860    ac_srcdir=.
1861    ac_top_srcdir=$ac_top_builddir_sub
1862    ac_abs_top_srcdir=$ac_pwd ;;
1863  [\\/]* | ?:[\\/]* )  # Absolute name.
1864    ac_srcdir=$srcdir$ac_dir_suffix;
1865    ac_top_srcdir=$srcdir
1866    ac_abs_top_srcdir=$srcdir ;;
1867  *) # Relative name.
1868    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1869    ac_top_srcdir=$ac_top_build_prefix$srcdir
1870    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1871esac
1872ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1873
1874    cd "$ac_dir" || { ac_status=$?; continue; }
1875    # Check for guested configure.
1876    if test -f "$ac_srcdir/configure.gnu"; then
1877      echo &&
1878      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1879    elif test -f "$ac_srcdir/configure"; then
1880      echo &&
1881      $SHELL "$ac_srcdir/configure" --help=recursive
1882    else
1883      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1884    fi || ac_status=$?
1885    cd "$ac_pwd" || { ac_status=$?; break; }
1886  done
1887fi
1888
1889test -n "$ac_init_help" && exit $ac_status
1890if $ac_init_version; then
1891  cat <<\_ACEOF
1892OpenJDK configure jdk8
1893generated by GNU Autoconf 2.67
1894
1895Copyright (C) 2010 Free Software Foundation, Inc.
1896This configure script is free software; the Free Software Foundation
1897gives unlimited permission to copy, distribute and modify it.
1898_ACEOF
1899  exit
1900fi
1901
1902## ------------------------ ##
1903## Autoconf initialization. ##
1904## ------------------------ ##
1905
1906# ac_fn_c_try_compile LINENO
1907# --------------------------
1908# Try to compile conftest.$ac_ext, and return whether this succeeded.
1909ac_fn_c_try_compile ()
1910{
1911  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1912  rm -f conftest.$ac_objext
1913  if { { ac_try="$ac_compile"
1914case "(($ac_try" in
1915  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1916  *) ac_try_echo=$ac_try;;
1917esac
1918eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1919$as_echo "$ac_try_echo"; } >&5
1920  (eval "$ac_compile") 2>conftest.err
1921  ac_status=$?
1922  if test -s conftest.err; then
1923    grep -v '^ *+' conftest.err >conftest.er1
1924    cat conftest.er1 >&5
1925    mv -f conftest.er1 conftest.err
1926  fi
1927  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1928  test $ac_status = 0; } && {
1929	 test -z "$ac_c_werror_flag" ||
1930	 test ! -s conftest.err
1931       } && test -s conftest.$ac_objext; then :
1932  ac_retval=0
1933else
1934  $as_echo "$as_me: failed program was:" >&5
1935sed 's/^/| /' conftest.$ac_ext >&5
1936
1937	ac_retval=1
1938fi
1939  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1940  as_fn_set_status $ac_retval
1941
1942} # ac_fn_c_try_compile
1943
1944# ac_fn_cxx_try_compile LINENO
1945# ----------------------------
1946# Try to compile conftest.$ac_ext, and return whether this succeeded.
1947ac_fn_cxx_try_compile ()
1948{
1949  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1950  rm -f conftest.$ac_objext
1951  if { { ac_try="$ac_compile"
1952case "(($ac_try" in
1953  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1954  *) ac_try_echo=$ac_try;;
1955esac
1956eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1957$as_echo "$ac_try_echo"; } >&5
1958  (eval "$ac_compile") 2>conftest.err
1959  ac_status=$?
1960  if test -s conftest.err; then
1961    grep -v '^ *+' conftest.err >conftest.er1
1962    cat conftest.er1 >&5
1963    mv -f conftest.er1 conftest.err
1964  fi
1965  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1966  test $ac_status = 0; } && {
1967	 test -z "$ac_cxx_werror_flag" ||
1968	 test ! -s conftest.err
1969       } && test -s conftest.$ac_objext; then :
1970  ac_retval=0
1971else
1972  $as_echo "$as_me: failed program was:" >&5
1973sed 's/^/| /' conftest.$ac_ext >&5
1974
1975	ac_retval=1
1976fi
1977  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1978  as_fn_set_status $ac_retval
1979
1980} # ac_fn_cxx_try_compile
1981
1982# ac_fn_objc_try_compile LINENO
1983# -----------------------------
1984# Try to compile conftest.$ac_ext, and return whether this succeeded.
1985ac_fn_objc_try_compile ()
1986{
1987  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1988  rm -f conftest.$ac_objext
1989  if { { ac_try="$ac_compile"
1990case "(($ac_try" in
1991  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1992  *) ac_try_echo=$ac_try;;
1993esac
1994eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1995$as_echo "$ac_try_echo"; } >&5
1996  (eval "$ac_compile") 2>conftest.err
1997  ac_status=$?
1998  if test -s conftest.err; then
1999    grep -v '^ *+' conftest.err >conftest.er1
2000    cat conftest.er1 >&5
2001    mv -f conftest.er1 conftest.err
2002  fi
2003  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2004  test $ac_status = 0; } && {
2005	 test -z "$ac_objc_werror_flag" ||
2006	 test ! -s conftest.err
2007       } && test -s conftest.$ac_objext; then :
2008  ac_retval=0
2009else
2010  $as_echo "$as_me: failed program was:" >&5
2011sed 's/^/| /' conftest.$ac_ext >&5
2012
2013	ac_retval=1
2014fi
2015  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2016  as_fn_set_status $ac_retval
2017
2018} # ac_fn_objc_try_compile
2019
2020# ac_fn_c_try_cpp LINENO
2021# ----------------------
2022# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2023ac_fn_c_try_cpp ()
2024{
2025  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2026  if { { ac_try="$ac_cpp conftest.$ac_ext"
2027case "(($ac_try" in
2028  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2029  *) ac_try_echo=$ac_try;;
2030esac
2031eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2032$as_echo "$ac_try_echo"; } >&5
2033  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2034  ac_status=$?
2035  if test -s conftest.err; then
2036    grep -v '^ *+' conftest.err >conftest.er1
2037    cat conftest.er1 >&5
2038    mv -f conftest.er1 conftest.err
2039  fi
2040  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2041  test $ac_status = 0; } > conftest.i && {
2042	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2043	 test ! -s conftest.err
2044       }; then :
2045  ac_retval=0
2046else
2047  $as_echo "$as_me: failed program was:" >&5
2048sed 's/^/| /' conftest.$ac_ext >&5
2049
2050    ac_retval=1
2051fi
2052  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2053  as_fn_set_status $ac_retval
2054
2055} # ac_fn_c_try_cpp
2056
2057# ac_fn_cxx_try_cpp LINENO
2058# ------------------------
2059# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2060ac_fn_cxx_try_cpp ()
2061{
2062  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2063  if { { ac_try="$ac_cpp conftest.$ac_ext"
2064case "(($ac_try" in
2065  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2066  *) ac_try_echo=$ac_try;;
2067esac
2068eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2069$as_echo "$ac_try_echo"; } >&5
2070  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2071  ac_status=$?
2072  if test -s conftest.err; then
2073    grep -v '^ *+' conftest.err >conftest.er1
2074    cat conftest.er1 >&5
2075    mv -f conftest.er1 conftest.err
2076  fi
2077  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2078  test $ac_status = 0; } > conftest.i && {
2079	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2080	 test ! -s conftest.err
2081       }; then :
2082  ac_retval=0
2083else
2084  $as_echo "$as_me: failed program was:" >&5
2085sed 's/^/| /' conftest.$ac_ext >&5
2086
2087    ac_retval=1
2088fi
2089  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2090  as_fn_set_status $ac_retval
2091
2092} # ac_fn_cxx_try_cpp
2093
2094# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2095# ---------------------------------------------------------
2096# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2097# the include files in INCLUDES and setting the cache variable VAR
2098# accordingly.
2099ac_fn_cxx_check_header_mongrel ()
2100{
2101  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2102  if eval "test \"\${$3+set}\"" = set; then :
2103  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2104$as_echo_n "checking for $2... " >&6; }
2105if eval "test \"\${$3+set}\"" = set; then :
2106  $as_echo_n "(cached) " >&6
2107fi
2108eval ac_res=\$$3
2109	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2110$as_echo "$ac_res" >&6; }
2111else
2112  # Is the header compilable?
2113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2114$as_echo_n "checking $2 usability... " >&6; }
2115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h.  */
2117$4
2118#include <$2>
2119_ACEOF
2120if ac_fn_cxx_try_compile "$LINENO"; then :
2121  ac_header_compiler=yes
2122else
2123  ac_header_compiler=no
2124fi
2125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2127$as_echo "$ac_header_compiler" >&6; }
2128
2129# Is the header present?
2130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2131$as_echo_n "checking $2 presence... " >&6; }
2132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2133/* end confdefs.h.  */
2134#include <$2>
2135_ACEOF
2136if ac_fn_cxx_try_cpp "$LINENO"; then :
2137  ac_header_preproc=yes
2138else
2139  ac_header_preproc=no
2140fi
2141rm -f conftest.err conftest.i conftest.$ac_ext
2142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2143$as_echo "$ac_header_preproc" >&6; }
2144
2145# So?  What about this header?
2146case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2147  yes:no: )
2148    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2149$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&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    ;;
2153  no:yes:* )
2154    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2155$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2156    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2157$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2158    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2159$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2160    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2161$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2162    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2163$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2164( $as_echo "## ----------------------------------------- ##
2165## Report this to build-dev@openjdk.java.net ##
2166## ----------------------------------------- ##"
2167     ) | sed "s/^/$as_me: WARNING:     /" >&2
2168    ;;
2169esac
2170  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2171$as_echo_n "checking for $2... " >&6; }
2172if eval "test \"\${$3+set}\"" = set; then :
2173  $as_echo_n "(cached) " >&6
2174else
2175  eval "$3=\$ac_header_compiler"
2176fi
2177eval ac_res=\$$3
2178	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2179$as_echo "$ac_res" >&6; }
2180fi
2181  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2182
2183} # ac_fn_cxx_check_header_mongrel
2184
2185# ac_fn_cxx_try_run LINENO
2186# ------------------------
2187# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2188# that executables *can* be run.
2189ac_fn_cxx_try_run ()
2190{
2191  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2192  if { { ac_try="$ac_link"
2193case "(($ac_try" in
2194  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2195  *) ac_try_echo=$ac_try;;
2196esac
2197eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2198$as_echo "$ac_try_echo"; } >&5
2199  (eval "$ac_link") 2>&5
2200  ac_status=$?
2201  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2202  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2203  { { case "(($ac_try" in
2204  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2205  *) ac_try_echo=$ac_try;;
2206esac
2207eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2208$as_echo "$ac_try_echo"; } >&5
2209  (eval "$ac_try") 2>&5
2210  ac_status=$?
2211  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2212  test $ac_status = 0; }; }; then :
2213  ac_retval=0
2214else
2215  $as_echo "$as_me: program exited with status $ac_status" >&5
2216       $as_echo "$as_me: failed program was:" >&5
2217sed 's/^/| /' conftest.$ac_ext >&5
2218
2219       ac_retval=$ac_status
2220fi
2221  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2222  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2223  as_fn_set_status $ac_retval
2224
2225} # ac_fn_cxx_try_run
2226
2227# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2228# ---------------------------------------------------------
2229# Tests whether HEADER exists and can be compiled using the include files in
2230# INCLUDES, setting the cache variable VAR accordingly.
2231ac_fn_cxx_check_header_compile ()
2232{
2233  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2235$as_echo_n "checking for $2... " >&6; }
2236if eval "test \"\${$3+set}\"" = set; then :
2237  $as_echo_n "(cached) " >&6
2238else
2239  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2240/* end confdefs.h.  */
2241$4
2242#include <$2>
2243_ACEOF
2244if ac_fn_cxx_try_compile "$LINENO"; then :
2245  eval "$3=yes"
2246else
2247  eval "$3=no"
2248fi
2249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2250fi
2251eval ac_res=\$$3
2252	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2253$as_echo "$ac_res" >&6; }
2254  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2255
2256} # ac_fn_cxx_check_header_compile
2257
2258# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2259# ----------------------------------------------
2260# Tries to find the compile-time value of EXPR in a program that includes
2261# INCLUDES, setting VAR accordingly. Returns whether the value could be
2262# computed
2263ac_fn_cxx_compute_int ()
2264{
2265  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2266  if test "$cross_compiling" = yes; then
2267    # Depending upon the size, compute the lo and hi bounds.
2268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2269/* end confdefs.h.  */
2270$4
2271int
2272main ()
2273{
2274static int test_array [1 - 2 * !(($2) >= 0)];
2275test_array [0] = 0
2276
2277  ;
2278  return 0;
2279}
2280_ACEOF
2281if ac_fn_cxx_try_compile "$LINENO"; then :
2282  ac_lo=0 ac_mid=0
2283  while :; do
2284    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285/* end confdefs.h.  */
2286$4
2287int
2288main ()
2289{
2290static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2291test_array [0] = 0
2292
2293  ;
2294  return 0;
2295}
2296_ACEOF
2297if ac_fn_cxx_try_compile "$LINENO"; then :
2298  ac_hi=$ac_mid; break
2299else
2300  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2301			if test $ac_lo -le $ac_mid; then
2302			  ac_lo= ac_hi=
2303			  break
2304			fi
2305			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2306fi
2307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2308  done
2309else
2310  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311/* end confdefs.h.  */
2312$4
2313int
2314main ()
2315{
2316static int test_array [1 - 2 * !(($2) < 0)];
2317test_array [0] = 0
2318
2319  ;
2320  return 0;
2321}
2322_ACEOF
2323if ac_fn_cxx_try_compile "$LINENO"; then :
2324  ac_hi=-1 ac_mid=-1
2325  while :; do
2326    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2327/* end confdefs.h.  */
2328$4
2329int
2330main ()
2331{
2332static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2333test_array [0] = 0
2334
2335  ;
2336  return 0;
2337}
2338_ACEOF
2339if ac_fn_cxx_try_compile "$LINENO"; then :
2340  ac_lo=$ac_mid; break
2341else
2342  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2343			if test $ac_mid -le $ac_hi; then
2344			  ac_lo= ac_hi=
2345			  break
2346			fi
2347			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2348fi
2349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2350  done
2351else
2352  ac_lo= ac_hi=
2353fi
2354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2355fi
2356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2357# Binary search between lo and hi bounds.
2358while test "x$ac_lo" != "x$ac_hi"; do
2359  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361/* end confdefs.h.  */
2362$4
2363int
2364main ()
2365{
2366static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2367test_array [0] = 0
2368
2369  ;
2370  return 0;
2371}
2372_ACEOF
2373if ac_fn_cxx_try_compile "$LINENO"; then :
2374  ac_hi=$ac_mid
2375else
2376  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2377fi
2378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2379done
2380case $ac_lo in #((
2381?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2382'') ac_retval=1 ;;
2383esac
2384  else
2385    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386/* end confdefs.h.  */
2387$4
2388static long int longval () { return $2; }
2389static unsigned long int ulongval () { return $2; }
2390#include <stdio.h>
2391#include <stdlib.h>
2392int
2393main ()
2394{
2395
2396  FILE *f = fopen ("conftest.val", "w");
2397  if (! f)
2398    return 1;
2399  if (($2) < 0)
2400    {
2401      long int i = longval ();
2402      if (i != ($2))
2403	return 1;
2404      fprintf (f, "%ld", i);
2405    }
2406  else
2407    {
2408      unsigned long int i = ulongval ();
2409      if (i != ($2))
2410	return 1;
2411      fprintf (f, "%lu", i);
2412    }
2413  /* Do not output a trailing newline, as this causes \r\n confusion
2414     on some platforms.  */
2415  return ferror (f) || fclose (f) != 0;
2416
2417  ;
2418  return 0;
2419}
2420_ACEOF
2421if ac_fn_cxx_try_run "$LINENO"; then :
2422  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2423else
2424  ac_retval=1
2425fi
2426rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2427  conftest.$ac_objext conftest.beam conftest.$ac_ext
2428rm -f conftest.val
2429
2430  fi
2431  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2432  as_fn_set_status $ac_retval
2433
2434} # ac_fn_cxx_compute_int
2435
2436# ac_fn_cxx_try_link LINENO
2437# -------------------------
2438# Try to link conftest.$ac_ext, and return whether this succeeded.
2439ac_fn_cxx_try_link ()
2440{
2441  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2442  rm -f conftest.$ac_objext conftest$ac_exeext
2443  if { { ac_try="$ac_link"
2444case "(($ac_try" in
2445  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2446  *) ac_try_echo=$ac_try;;
2447esac
2448eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2449$as_echo "$ac_try_echo"; } >&5
2450  (eval "$ac_link") 2>conftest.err
2451  ac_status=$?
2452  if test -s conftest.err; then
2453    grep -v '^ *+' conftest.err >conftest.er1
2454    cat conftest.er1 >&5
2455    mv -f conftest.er1 conftest.err
2456  fi
2457  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2458  test $ac_status = 0; } && {
2459	 test -z "$ac_cxx_werror_flag" ||
2460	 test ! -s conftest.err
2461       } && test -s conftest$ac_exeext && {
2462	 test "$cross_compiling" = yes ||
2463	 $as_test_x conftest$ac_exeext
2464       }; then :
2465  ac_retval=0
2466else
2467  $as_echo "$as_me: failed program was:" >&5
2468sed 's/^/| /' conftest.$ac_ext >&5
2469
2470	ac_retval=1
2471fi
2472  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2473  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2474  # interfere with the next link command; also delete a directory that is
2475  # left behind by Apple's compiler.  We do this before executing the actions.
2476  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2477  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2478  as_fn_set_status $ac_retval
2479
2480} # ac_fn_cxx_try_link
2481
2482# ac_fn_cxx_check_func LINENO FUNC VAR
2483# ------------------------------------
2484# Tests whether FUNC exists, setting the cache variable VAR accordingly
2485ac_fn_cxx_check_func ()
2486{
2487  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2489$as_echo_n "checking for $2... " >&6; }
2490if eval "test \"\${$3+set}\"" = set; then :
2491  $as_echo_n "(cached) " >&6
2492else
2493  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2494/* end confdefs.h.  */
2495/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2496   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2497#define $2 innocuous_$2
2498
2499/* System header to define __stub macros and hopefully few prototypes,
2500    which can conflict with char $2 (); below.
2501    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2502    <limits.h> exists even on freestanding compilers.  */
2503
2504#ifdef __STDC__
2505# include <limits.h>
2506#else
2507# include <assert.h>
2508#endif
2509
2510#undef $2
2511
2512/* Override any GCC internal prototype to avoid an error.
2513   Use char because int might match the return type of a GCC
2514   builtin and then its argument prototype would still apply.  */
2515#ifdef __cplusplus
2516extern "C"
2517#endif
2518char $2 ();
2519/* The GNU C library defines this for functions which it implements
2520    to always fail with ENOSYS.  Some functions are actually named
2521    something starting with __ and the normal name is an alias.  */
2522#if defined __stub_$2 || defined __stub___$2
2523choke me
2524#endif
2525
2526int
2527main ()
2528{
2529return $2 ();
2530  ;
2531  return 0;
2532}
2533_ACEOF
2534if ac_fn_cxx_try_link "$LINENO"; then :
2535  eval "$3=yes"
2536else
2537  eval "$3=no"
2538fi
2539rm -f core conftest.err conftest.$ac_objext \
2540    conftest$ac_exeext conftest.$ac_ext
2541fi
2542eval ac_res=\$$3
2543	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2544$as_echo "$ac_res" >&6; }
2545  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2546
2547} # ac_fn_cxx_check_func
2548
2549# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2550# -------------------------------------------------------
2551# Tests whether HEADER exists and can be compiled using the include files in
2552# INCLUDES, setting the cache variable VAR accordingly.
2553ac_fn_c_check_header_compile ()
2554{
2555  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2557$as_echo_n "checking for $2... " >&6; }
2558if eval "test \"\${$3+set}\"" = set; then :
2559  $as_echo_n "(cached) " >&6
2560else
2561  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2562/* end confdefs.h.  */
2563$4
2564#include <$2>
2565_ACEOF
2566if ac_fn_c_try_compile "$LINENO"; then :
2567  eval "$3=yes"
2568else
2569  eval "$3=no"
2570fi
2571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2572fi
2573eval ac_res=\$$3
2574	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2575$as_echo "$ac_res" >&6; }
2576  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2577
2578} # ac_fn_c_check_header_compile
2579cat >config.log <<_ACEOF
2580This file contains any messages produced by compilers while
2581running configure, to aid debugging if configure makes a mistake.
2582
2583It was created by OpenJDK $as_me jdk8, which was
2584generated by GNU Autoconf 2.67.  Invocation command line was
2585
2586  $ $0 $@
2587
2588_ACEOF
2589exec 5>>config.log
2590{
2591cat <<_ASUNAME
2592## --------- ##
2593## Platform. ##
2594## --------- ##
2595
2596hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2597uname -m = `(uname -m) 2>/dev/null || echo unknown`
2598uname -r = `(uname -r) 2>/dev/null || echo unknown`
2599uname -s = `(uname -s) 2>/dev/null || echo unknown`
2600uname -v = `(uname -v) 2>/dev/null || echo unknown`
2601
2602/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2603/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2604
2605/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2606/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2607/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2608/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2609/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2610/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2611/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2612
2613_ASUNAME
2614
2615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2616for as_dir in $PATH
2617do
2618  IFS=$as_save_IFS
2619  test -z "$as_dir" && as_dir=.
2620    $as_echo "PATH: $as_dir"
2621  done
2622IFS=$as_save_IFS
2623
2624} >&5
2625
2626cat >&5 <<_ACEOF
2627
2628
2629## ----------- ##
2630## Core tests. ##
2631## ----------- ##
2632
2633_ACEOF
2634
2635
2636# Keep a trace of the command line.
2637# Strip out --no-create and --no-recursion so they do not pile up.
2638# Strip out --silent because we don't want to record it for future runs.
2639# Also quote any args containing shell meta-characters.
2640# Make two passes to allow for proper duplicate-argument suppression.
2641ac_configure_args=
2642ac_configure_args0=
2643ac_configure_args1=
2644ac_must_keep_next=false
2645for ac_pass in 1 2
2646do
2647  for ac_arg
2648  do
2649    case $ac_arg in
2650    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2651    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2652    | -silent | --silent | --silen | --sile | --sil)
2653      continue ;;
2654    *\'*)
2655      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2656    esac
2657    case $ac_pass in
2658    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2659    2)
2660      as_fn_append ac_configure_args1 " '$ac_arg'"
2661      if test $ac_must_keep_next = true; then
2662	ac_must_keep_next=false # Got value, back to normal.
2663      else
2664	case $ac_arg in
2665	  *=* | --config-cache | -C | -disable-* | --disable-* \
2666	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2667	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2668	  | -with-* | --with-* | -without-* | --without-* | --x)
2669	    case "$ac_configure_args0 " in
2670	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2671	    esac
2672	    ;;
2673	  -* ) ac_must_keep_next=true ;;
2674	esac
2675      fi
2676      as_fn_append ac_configure_args " '$ac_arg'"
2677      ;;
2678    esac
2679  done
2680done
2681{ ac_configure_args0=; unset ac_configure_args0;}
2682{ ac_configure_args1=; unset ac_configure_args1;}
2683
2684# When interrupted or exit'd, cleanup temporary files, and complete
2685# config.log.  We remove comments because anyway the quotes in there
2686# would cause problems or look ugly.
2687# WARNING: Use '\'' to represent an apostrophe within the trap.
2688# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2689trap 'exit_status=$?
2690  # Save into config.log some information that might help in debugging.
2691  {
2692    echo
2693
2694    $as_echo "## ---------------- ##
2695## Cache variables. ##
2696## ---------------- ##"
2697    echo
2698    # The following way of writing the cache mishandles newlines in values,
2699(
2700  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2701    eval ac_val=\$$ac_var
2702    case $ac_val in #(
2703    *${as_nl}*)
2704      case $ac_var in #(
2705      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2706$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2707      esac
2708      case $ac_var in #(
2709      _ | IFS | as_nl) ;; #(
2710      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2711      *) { eval $ac_var=; unset $ac_var;} ;;
2712      esac ;;
2713    esac
2714  done
2715  (set) 2>&1 |
2716    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2717    *${as_nl}ac_space=\ *)
2718      sed -n \
2719	"s/'\''/'\''\\\\'\'''\''/g;
2720	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2721      ;; #(
2722    *)
2723      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2724      ;;
2725    esac |
2726    sort
2727)
2728    echo
2729
2730    $as_echo "## ----------------- ##
2731## Output variables. ##
2732## ----------------- ##"
2733    echo
2734    for ac_var in $ac_subst_vars
2735    do
2736      eval ac_val=\$$ac_var
2737      case $ac_val in
2738      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2739      esac
2740      $as_echo "$ac_var='\''$ac_val'\''"
2741    done | sort
2742    echo
2743
2744    if test -n "$ac_subst_files"; then
2745      $as_echo "## ------------------- ##
2746## File substitutions. ##
2747## ------------------- ##"
2748      echo
2749      for ac_var in $ac_subst_files
2750      do
2751	eval ac_val=\$$ac_var
2752	case $ac_val in
2753	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2754	esac
2755	$as_echo "$ac_var='\''$ac_val'\''"
2756      done | sort
2757      echo
2758    fi
2759
2760    if test -s confdefs.h; then
2761      $as_echo "## ----------- ##
2762## confdefs.h. ##
2763## ----------- ##"
2764      echo
2765      cat confdefs.h
2766      echo
2767    fi
2768    test "$ac_signal" != 0 &&
2769      $as_echo "$as_me: caught signal $ac_signal"
2770    $as_echo "$as_me: exit $exit_status"
2771  } >&5
2772  rm -f core *.core core.conftest.* &&
2773    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2774    exit $exit_status
2775' 0
2776for ac_signal in 1 2 13 15; do
2777  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2778done
2779ac_signal=0
2780
2781# confdefs.h avoids OS command line length limits that DEFS can exceed.
2782rm -f -r conftest* confdefs.h
2783
2784$as_echo "/* confdefs.h */" > confdefs.h
2785
2786# Predefined preprocessor variables.
2787
2788cat >>confdefs.h <<_ACEOF
2789#define PACKAGE_NAME "$PACKAGE_NAME"
2790_ACEOF
2791
2792cat >>confdefs.h <<_ACEOF
2793#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2794_ACEOF
2795
2796cat >>confdefs.h <<_ACEOF
2797#define PACKAGE_VERSION "$PACKAGE_VERSION"
2798_ACEOF
2799
2800cat >>confdefs.h <<_ACEOF
2801#define PACKAGE_STRING "$PACKAGE_STRING"
2802_ACEOF
2803
2804cat >>confdefs.h <<_ACEOF
2805#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2806_ACEOF
2807
2808cat >>confdefs.h <<_ACEOF
2809#define PACKAGE_URL "$PACKAGE_URL"
2810_ACEOF
2811
2812
2813# Let the site file select an alternate cache file if it wants to.
2814# Prefer an explicitly selected file to automatically selected ones.
2815ac_site_file1=NONE
2816ac_site_file2=NONE
2817if test -n "$CONFIG_SITE"; then
2818  # We do not want a PATH search for config.site.
2819  case $CONFIG_SITE in #((
2820    -*)  ac_site_file1=./$CONFIG_SITE;;
2821    */*) ac_site_file1=$CONFIG_SITE;;
2822    *)   ac_site_file1=./$CONFIG_SITE;;
2823  esac
2824elif test "x$prefix" != xNONE; then
2825  ac_site_file1=$prefix/share/config.site
2826  ac_site_file2=$prefix/etc/config.site
2827else
2828  ac_site_file1=$ac_default_prefix/share/config.site
2829  ac_site_file2=$ac_default_prefix/etc/config.site
2830fi
2831for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2832do
2833  test "x$ac_site_file" = xNONE && continue
2834  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2835    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2836$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2837    sed 's/^/| /' "$ac_site_file" >&5
2838    . "$ac_site_file" \
2839      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2840$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2841as_fn_error $? "failed to load site script $ac_site_file
2842See \`config.log' for more details" "$LINENO" 5 ; }
2843  fi
2844done
2845
2846if test -r "$cache_file"; then
2847  # Some versions of bash will fail to source /dev/null (special files
2848  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2849  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2850    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2851$as_echo "$as_me: loading cache $cache_file" >&6;}
2852    case $cache_file in
2853      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2854      *)                      . "./$cache_file";;
2855    esac
2856  fi
2857else
2858  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2859$as_echo "$as_me: creating cache $cache_file" >&6;}
2860  >$cache_file
2861fi
2862
2863# Check that the precious variables saved in the cache have kept the same
2864# value.
2865ac_cache_corrupted=false
2866for ac_var in $ac_precious_vars; do
2867  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2868  eval ac_new_set=\$ac_env_${ac_var}_set
2869  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2870  eval ac_new_val=\$ac_env_${ac_var}_value
2871  case $ac_old_set,$ac_new_set in
2872    set,)
2873      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2874$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2875      ac_cache_corrupted=: ;;
2876    ,set)
2877      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2878$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2879      ac_cache_corrupted=: ;;
2880    ,);;
2881    *)
2882      if test "x$ac_old_val" != "x$ac_new_val"; then
2883	# differences in whitespace do not lead to failure.
2884	ac_old_val_w=`echo x $ac_old_val`
2885	ac_new_val_w=`echo x $ac_new_val`
2886	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2887	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2888$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2889	  ac_cache_corrupted=:
2890	else
2891	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2892$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2893	  eval $ac_var=\$ac_old_val
2894	fi
2895	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2896$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2897	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2898$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2899      fi;;
2900  esac
2901  # Pass precious variables to config.status.
2902  if test "$ac_new_set" = set; then
2903    case $ac_new_val in
2904    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2905    *) ac_arg=$ac_var=$ac_new_val ;;
2906    esac
2907    case " $ac_configure_args " in
2908      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2909      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2910    esac
2911  fi
2912done
2913if $ac_cache_corrupted; then
2914  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2915$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2916  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2917$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2918  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2919fi
2920## -------------------- ##
2921## Main body of script. ##
2922## -------------------- ##
2923
2924ac_ext=c
2925ac_cpp='$CPP $CPPFLAGS'
2926ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2927ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2928ac_compiler_gnu=$ac_cv_c_compiler_gnu
2929
2930
2931
2932ac_aux_dir=
2933for ac_dir in build-aux "$srcdir"/build-aux; do
2934  if test -f "$ac_dir/install-sh"; then
2935    ac_aux_dir=$ac_dir
2936    ac_install_sh="$ac_aux_dir/install-sh -c"
2937    break
2938  elif test -f "$ac_dir/install.sh"; then
2939    ac_aux_dir=$ac_dir
2940    ac_install_sh="$ac_aux_dir/install.sh -c"
2941    break
2942  elif test -f "$ac_dir/shtool"; then
2943    ac_aux_dir=$ac_dir
2944    ac_install_sh="$ac_aux_dir/shtool install -c"
2945    break
2946  fi
2947done
2948if test -z "$ac_aux_dir"; then
2949  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2950fi
2951
2952# These three variables are undocumented and unsupported,
2953# and are intended to be withdrawn in a future Autoconf release.
2954# They can cause serious problems if a builder's source tree is in a directory
2955# whose full name contains unusual characters.
2956ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2957ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2958ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2959
2960
2961# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2962
2963#
2964# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2965# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2966#
2967# This code is free software; you can redistribute it and/or modify it
2968# under the terms of the GNU General Public License version 2 only, as
2969# published by the Free Software Foundation.  Oracle designates this
2970# particular file as subject to the "Classpath" exception as provided
2971# by Oracle in the LICENSE file that accompanied this code.
2972#
2973# This code is distributed in the hope that it will be useful, but WITHOUT
2974# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2975# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2976# version 2 for more details (a copy is included in the LICENSE file that
2977# accompanied this code).
2978#
2979# You should have received a copy of the GNU General Public License version
2980# 2 along with this work; if not, write to the Free Software Foundation,
2981# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2982#
2983# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2984# or visit www.oracle.com if you need additional information or have any
2985# questions.
2986#
2987
2988#
2989# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2990#
2991# This program is free software; you can redistribute it and/or modify
2992# it under the terms of the GNU General Public License as published by
2993# the Free Software Foundation; either version 2 of the License, or
2994# (at your option) any later version.
2995#
2996# This program is distributed in the hope that it will be useful, but
2997# WITHOUT ANY WARRANTY; without even the implied warranty of
2998# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2999# General Public License for more details.
3000#
3001# You should have received a copy of the GNU General Public License
3002# along with this program; if not, write to the Free Software
3003# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3004#
3005# As a special exception to the GNU General Public License, if you
3006# distribute this file as part of a program that contains a
3007# configuration script generated by Autoconf, you may include it under
3008# the same distribution terms that you use for the rest of that program.
3009
3010# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3011# ----------------------------------
3012# PKG_PROG_PKG_CONFIG
3013
3014# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3015#
3016# Check to see whether a particular set of modules exists.  Similar
3017# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3018#
3019#
3020# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3021# this or PKG_CHECK_MODULES is called, or make sure to call
3022# PKG_CHECK_EXISTS manually
3023# --------------------------------------------------------------
3024
3025
3026
3027# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3028# ---------------------------------------------
3029# _PKG_CONFIG
3030
3031# _PKG_SHORT_ERRORS_SUPPORTED
3032# -----------------------------
3033# _PKG_SHORT_ERRORS_SUPPORTED
3034
3035
3036# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3037# [ACTION-IF-NOT-FOUND])
3038#
3039#
3040# Note that if there is a possibility the first call to
3041# PKG_CHECK_MODULES might not happen, you should be sure to include an
3042# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3043#
3044#
3045# --------------------------------------------------------------
3046# PKG_CHECK_MODULES
3047
3048
3049# Include these first...
3050#
3051# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3052# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3053#
3054# This code is free software; you can redistribute it and/or modify it
3055# under the terms of the GNU General Public License version 2 only, as
3056# published by the Free Software Foundation.  Oracle designates this
3057# particular file as subject to the "Classpath" exception as provided
3058# by Oracle in the LICENSE file that accompanied this code.
3059#
3060# This code is distributed in the hope that it will be useful, but WITHOUT
3061# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3062# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3063# version 2 for more details (a copy is included in the LICENSE file that
3064# accompanied this code).
3065#
3066# You should have received a copy of the GNU General Public License version
3067# 2 along with this work; if not, write to the Free Software Foundation,
3068# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3069#
3070# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3071# or visit www.oracle.com if you need additional information or have any
3072# questions.
3073#
3074
3075# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3076# If so, then append $1 to $2\
3077# Also set JVM_ARG_OK to true/false depending on outcome.
3078
3079
3080# This will make sure the given variable points to a full and proper
3081# path. This means:
3082# 1) There will be no spaces in the path. On posix platforms,
3083#    spaces in the path will result in an error. On Windows,
3084#    the path will be rewritten using short-style to be space-free.
3085# 2) The path will be absolute, and it will be in unix-style (on
3086#     cygwin).
3087# $1: The name of the variable to fix
3088
3089
3090# This will make sure the given variable points to a executable
3091# with a full and proper path. This means:
3092# 1) There will be no spaces in the path. On posix platforms,
3093#    spaces in the path will result in an error. On Windows,
3094#    the path will be rewritten using short-style to be space-free.
3095# 2) The path will be absolute, and it will be in unix-style (on
3096#     cygwin).
3097# Any arguments given to the executable is preserved.
3098# If the input variable does not have a directory specification, then
3099# it need to be in the PATH.
3100# $1: The name of the variable to fix
3101
3102
3103
3104
3105
3106
3107# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3108# $1: variable to check
3109# $2: executable name to print in warning (optional)
3110
3111
3112# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3113# Arguments as AC_PATH_PROG:
3114# $1: variable to set
3115# $2: executable name to look for
3116
3117
3118# Setup the most fundamental tools that relies on not much else to set up,
3119# but is used by much of the early bootstrap code.
3120
3121
3122# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3123
3124
3125
3126
3127
3128
3129
3130#%%% Simple tools %%%
3131
3132# Check if we have found a usable version of make
3133# $1: the path to a potential make binary (or empty)
3134# $2: the description on how we found this
3135
3136
3137# Goes looking for a usable version of GNU make.
3138
3139
3140
3141
3142
3143
3144# Check if build directory is on local disk. If not possible to determine,
3145# we prefer to claim it's local.
3146# Argument 1: directory to test
3147# Argument 2: what to do if it is on local disk
3148# Argument 3: what to do otherwise (remote disk or failure)
3149
3150
3151# Check that source files have basic read permissions set. This might
3152# not be the case in cygwin in certain conditions.
3153
3154
3155
3156
3157#
3158# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3159# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3160#
3161# This code is free software; you can redistribute it and/or modify it
3162# under the terms of the GNU General Public License version 2 only, as
3163# published by the Free Software Foundation.  Oracle designates this
3164# particular file as subject to the "Classpath" exception as provided
3165# by Oracle in the LICENSE file that accompanied this code.
3166#
3167# This code is distributed in the hope that it will be useful, but WITHOUT
3168# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3169# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3170# version 2 for more details (a copy is included in the LICENSE file that
3171# accompanied this code).
3172#
3173# You should have received a copy of the GNU General Public License version
3174# 2 along with this work; if not, write to the Free Software Foundation,
3175# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3176#
3177# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3178# or visit www.oracle.com if you need additional information or have any
3179# questions.
3180#
3181
3182
3183
3184
3185
3186# Helper function which possibly converts a path using DOS-style short mode.
3187# If so, the updated path is stored in $new_path.
3188# $1: The path to check
3189
3190
3191# Helper function which possibly converts a path using DOS-style short mode.
3192# If so, the updated path is stored in $new_path.
3193# $1: The path to check
3194
3195
3196# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3197# and could probably be heavily simplified. However, all changes in this
3198# area tend to need lot of testing in different scenarios, and in lack of
3199# proper unit testing, cleaning this up has not been deemed worth the effort
3200# at the moment.
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3211
3212
3213
3214
3215#
3216# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3217# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3218#
3219# This code is free software; you can redistribute it and/or modify it
3220# under the terms of the GNU General Public License version 2 only, as
3221# published by the Free Software Foundation.  Oracle designates this
3222# particular file as subject to the "Classpath" exception as provided
3223# by Oracle in the LICENSE file that accompanied this code.
3224#
3225# This code is distributed in the hope that it will be useful, but WITHOUT
3226# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3227# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3228# version 2 for more details (a copy is included in the LICENSE file that
3229# accompanied this code).
3230#
3231# You should have received a copy of the GNU General Public License version
3232# 2 along with this work; if not, write to the Free Software Foundation,
3233# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3234#
3235# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3236# or visit www.oracle.com if you need additional information or have any
3237# questions.
3238#
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250# ... then the rest
3251#
3252# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3253# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3254#
3255# This code is free software; you can redistribute it and/or modify it
3256# under the terms of the GNU General Public License version 2 only, as
3257# published by the Free Software Foundation.  Oracle designates this
3258# particular file as subject to the "Classpath" exception as provided
3259# by Oracle in the LICENSE file that accompanied this code.
3260#
3261# This code is distributed in the hope that it will be useful, but WITHOUT
3262# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3263# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3264# version 2 for more details (a copy is included in the LICENSE file that
3265# accompanied this code).
3266#
3267# You should have received a copy of the GNU General Public License version
3268# 2 along with this work; if not, write to the Free Software Foundation,
3269# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3270#
3271# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3272# or visit www.oracle.com if you need additional information or have any
3273# questions.
3274#
3275
3276# Execute the check given as argument, and verify the result
3277# If the Boot JDK was previously found, do nothing
3278# $1 A command line (typically autoconf macro) to execute
3279
3280
3281# Test: Is bootjdk explicitely set by command line arguments?
3282
3283
3284# Test: Is bootjdk available from builddeps?
3285
3286
3287# Test: Is $JAVA_HOME set?
3288
3289
3290# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3291
3292
3293# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3294
3295
3296# Look for a jdk in the given path. If there are multiple, try to select the newest.
3297# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3298# $1 = Path to directory containing jdk installations.
3299# $2 = String to append to the found JDK directory to get the proper JDK home
3300
3301
3302# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3303# environmental variable as base for where to look.
3304# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3305
3306
3307# Test: Is there a JDK installed in default, well-known locations?
3308
3309
3310# Check that a command-line tool in the Boot JDK is correct
3311# $1 = name of variable to assign
3312# $2 = name of binary
3313
3314
3315###############################################################################
3316#
3317# We need a Boot JDK to bootstrap the build.
3318#
3319
3320
3321
3322
3323
3324#
3325# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3326# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3327#
3328# This code is free software; you can redistribute it and/or modify it
3329# under the terms of the GNU General Public License version 2 only, as
3330# published by the Free Software Foundation.  Oracle designates this
3331# particular file as subject to the "Classpath" exception as provided
3332# by Oracle in the LICENSE file that accompanied this code.
3333#
3334# This code is distributed in the hope that it will be useful, but WITHOUT
3335# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3336# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3337# version 2 for more details (a copy is included in the LICENSE file that
3338# accompanied this code).
3339#
3340# You should have received a copy of the GNU General Public License version
3341# 2 along with this work; if not, write to the Free Software Foundation,
3342# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3343#
3344# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3345# or visit www.oracle.com if you need additional information or have any
3346# questions.
3347#
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368#
3369# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3370# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3371#
3372# This code is free software; you can redistribute it and/or modify it
3373# under the terms of the GNU General Public License version 2 only, as
3374# published by the Free Software Foundation.  Oracle designates this
3375# particular file as subject to the "Classpath" exception as provided
3376# by Oracle in the LICENSE file that accompanied this code.
3377#
3378# This code is distributed in the hope that it will be useful, but WITHOUT
3379# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3380# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3381# version 2 for more details (a copy is included in the LICENSE file that
3382# accompanied this code).
3383#
3384# You should have received a copy of the GNU General Public License version
3385# 2 along with this work; if not, write to the Free Software Foundation,
3386# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3387#
3388# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3389# or visit www.oracle.com if you need additional information or have any
3390# questions.
3391#
3392
3393
3394
3395
3396
3397cygwin_help() {
3398    case $1 in
3399    unzip)
3400        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3401    zip)
3402        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3403    make)
3404        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3405    * )
3406       break ;;
3407    esac
3408}
3409
3410apt_help() {
3411    case $1 in
3412    devkit)
3413        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3414    openjdk)
3415        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3416    alsa)
3417        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3418    cups)
3419        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3420    freetype2)
3421        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3422    pulse)
3423        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3424    x11)
3425        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3426    ccache)
3427        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3428    * )
3429       break ;;
3430    esac
3431}
3432
3433yum_help() {
3434    case $1 in
3435    devkit)
3436        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3437    openjdk)
3438        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3439    alsa)
3440        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3441    cups)
3442        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3443    freetype2)
3444        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3445    pulse)
3446        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3447    x11)
3448        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3449    ccache)
3450        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3451    * )
3452       break ;;
3453    esac
3454}
3455
3456port_help() {
3457    PKGHANDLER_COMMAND=""
3458}
3459
3460pkgutil_help() {
3461    PKGHANDLER_COMMAND=""
3462}
3463
3464pkgadd_help() {
3465    PKGHANDLER_COMMAND=""
3466}
3467
3468
3469
3470#
3471# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3472# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3473#
3474# This code is free software; you can redistribute it and/or modify it
3475# under the terms of the GNU General Public License version 2 only, as
3476# published by the Free Software Foundation.  Oracle designates this
3477# particular file as subject to the "Classpath" exception as provided
3478# by Oracle in the LICENSE file that accompanied this code.
3479#
3480# This code is distributed in the hope that it will be useful, but WITHOUT
3481# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3482# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3483# version 2 for more details (a copy is included in the LICENSE file that
3484# accompanied this code).
3485#
3486# You should have received a copy of the GNU General Public License version
3487# 2 along with this work; if not, write to the Free Software Foundation,
3488# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3489#
3490# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3491# or visit www.oracle.com if you need additional information or have any
3492# questions.
3493#
3494
3495
3496
3497
3498
3499
3500
3501
3502###############################################################################
3503#
3504# Should we build only OpenJDK even if closed sources are present?
3505#
3506
3507
3508
3509
3510###############################################################################
3511#
3512# Setup version numbers
3513#
3514
3515
3516
3517
3518
3519
3520# Support for customization of the build process. Some build files
3521# will include counterparts from this location, if they exist. This allows
3522# for a degree of customization of the build targets and the rules/recipes
3523# to create them
3524
3525# Check whether --with-custom-make-dir was given.
3526if test "${with_custom_make_dir+set}" = set; then :
3527  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3528fi
3529
3530
3531
3532#
3533# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3534# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3535#
3536# This code is free software; you can redistribute it and/or modify it
3537# under the terms of the GNU General Public License version 2 only, as
3538# published by the Free Software Foundation.  Oracle designates this
3539# particular file as subject to the "Classpath" exception as provided
3540# by Oracle in the LICENSE file that accompanied this code.
3541#
3542# This code is distributed in the hope that it will be useful, but WITHOUT
3543# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3544# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3545# version 2 for more details (a copy is included in the LICENSE file that
3546# accompanied this code).
3547#
3548# You should have received a copy of the GNU General Public License version
3549# 2 along with this work; if not, write to the Free Software Foundation,
3550# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3551#
3552# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3553# or visit www.oracle.com if you need additional information or have any
3554# questions.
3555#
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571#
3572# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3573# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3574#
3575# This code is free software; you can redistribute it and/or modify it
3576# under the terms of the GNU General Public License version 2 only, as
3577# published by the Free Software Foundation.  Oracle designates this
3578# particular file as subject to the "Classpath" exception as provided
3579# by Oracle in the LICENSE file that accompanied this code.
3580#
3581# This code is distributed in the hope that it will be useful, but WITHOUT
3582# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3583# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3584# version 2 for more details (a copy is included in the LICENSE file that
3585# accompanied this code).
3586#
3587# You should have received a copy of the GNU General Public License version
3588# 2 along with this work; if not, write to the Free Software Foundation,
3589# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3590#
3591# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3592# or visit www.oracle.com if you need additional information or have any
3593# questions.
3594#
3595
3596# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3597# Converts autoconf style CPU name to OpenJDK style, into
3598# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3599
3600
3601# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3602# Converts autoconf style OS name to OpenJDK style, into
3603# VAR_OS and VAR_OS_API.
3604
3605
3606# Expects $host_os $host_cpu $build_os and $build_cpu
3607# and $with_target_bits to have been setup!
3608#
3609# Translate the standard triplet(quadruplet) definition
3610# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3611# OPENJDK_BUILD_OS, etc.
3612
3613
3614# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3615# accordingly. Must be done after setting up build and target system, but before
3616# doing anything else with these values.
3617
3618
3619    # Setup the legacy variables, for controlling the old makefiles.
3620    #
3621
3622
3623
3624
3625#%%% Build and target systems %%%
3626
3627
3628
3629
3630# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3631# Add -mX to various FLAGS variables.
3632
3633
3634
3635
3636
3637
3638#
3639# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3640# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3641#
3642# This code is free software; you can redistribute it and/or modify it
3643# under the terms of the GNU General Public License version 2 only, as
3644# published by the Free Software Foundation.  Oracle designates this
3645# particular file as subject to the "Classpath" exception as provided
3646# by Oracle in the LICENSE file that accompanied this code.
3647#
3648# This code is distributed in the hope that it will be useful, but WITHOUT
3649# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3650# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3651# version 2 for more details (a copy is included in the LICENSE file that
3652# accompanied this code).
3653#
3654# You should have received a copy of the GNU General Public License version
3655# 2 along with this work; if not, write to the Free Software Foundation,
3656# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3657#
3658# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3659# or visit www.oracle.com if you need additional information or have any
3660# questions.
3661#
3662
3663
3664
3665
3666
3667
3668
3669
3670#
3671# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3672# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3673#
3674# This code is free software; you can redistribute it and/or modify it
3675# under the terms of the GNU General Public License version 2 only, as
3676# published by the Free Software Foundation.  Oracle designates this
3677# particular file as subject to the "Classpath" exception as provided
3678# by Oracle in the LICENSE file that accompanied this code.
3679#
3680# This code is distributed in the hope that it will be useful, but WITHOUT
3681# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3682# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3683# version 2 for more details (a copy is included in the LICENSE file that
3684# accompanied this code).
3685#
3686# You should have received a copy of the GNU General Public License version
3687# 2 along with this work; if not, write to the Free Software Foundation,
3688# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3689#
3690# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3691# or visit www.oracle.com if you need additional information or have any
3692# questions.
3693#
3694
3695# $1 = compiler to test (CC or CXX)
3696# $2 = human readable name of compiler (C or C++)
3697
3698
3699
3700
3701
3702# $1 = compiler to test (CC or CXX)
3703# $2 = human readable name of compiler (C or C++)
3704# $3 = list of compiler names to search for
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3719#                                   [RUN-IF-FALSE])
3720# ------------------------------------------------------------
3721# Check that the c and c++ compilers support an argument
3722
3723
3724
3725
3726#
3727# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3728# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3729#
3730# This code is free software; you can redistribute it and/or modify it
3731# under the terms of the GNU General Public License version 2 only, as
3732# published by the Free Software Foundation.  Oracle designates this
3733# particular file as subject to the "Classpath" exception as provided
3734# by Oracle in the LICENSE file that accompanied this code.
3735#
3736# This code is distributed in the hope that it will be useful, but WITHOUT
3737# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3738# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3739# version 2 for more details (a copy is included in the LICENSE file that
3740# accompanied this code).
3741#
3742# You should have received a copy of the GNU General Public License version
3743# 2 along with this work; if not, write to the Free Software Foundation,
3744# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3745#
3746# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3747# or visit www.oracle.com if you need additional information or have any
3748# questions.
3749#
3750
3751
3752
3753
3754
3755
3756
3757# Check if the VS env variables were setup prior to running configure.
3758# If not, then find vcvarsall.bat and run it automatically, and integrate
3759# the set env variables into the spec file.
3760
3761
3762
3763# Setup the DXSDK paths
3764
3765
3766
3767
3768
3769
3770# This line needs to be here, verbatim, after all includes and the dummy hook
3771# definitions. It is replaced with custom functionality when building
3772# custom sources.
3773#CUSTOM_AUTOCONF_INCLUDE
3774
3775# Do not change or remove the following line, it is needed for consistency checks:
3776DATE_WHEN_GENERATED=1369236348
3777
3778###############################################################################
3779#
3780# Initialization / Boot-strapping
3781#
3782# The bootstrapping process needs to solve the "chicken or the egg" problem,
3783# thus it jumps back and forth, each time gaining something needed later on.
3784#
3785###############################################################################
3786
3787# Basic initialization that must happen first of all
3788
3789# Save the original command line. This is passed to us by the wrapper configure script.
3790
3791DATE_WHEN_CONFIGURED=`LANG=C date`
3792
3793{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3794$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3795{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3796$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3797
3798
3799
3800# Start with tools that do not need have cross compilation support
3801# and can be expected to be found in the default PATH. These tools are
3802# used by configure. Nor are these tools expected to be found in the
3803# devkit from the builddeps server either, since they are
3804# needed to download the devkit.
3805
3806# First are all the simple required tools.
3807
3808    for ac_prog in basename
3809do
3810  # Extract the first word of "$ac_prog", so it can be a program name with args.
3811set dummy $ac_prog; ac_word=$2
3812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3813$as_echo_n "checking for $ac_word... " >&6; }
3814if test "${ac_cv_path_BASENAME+set}" = set; then :
3815  $as_echo_n "(cached) " >&6
3816else
3817  case $BASENAME in
3818  [\\/]* | ?:[\\/]*)
3819  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3820  ;;
3821  *)
3822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3823for as_dir in $PATH
3824do
3825  IFS=$as_save_IFS
3826  test -z "$as_dir" && as_dir=.
3827    for ac_exec_ext in '' $ac_executable_extensions; do
3828  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3829    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3831    break 2
3832  fi
3833done
3834  done
3835IFS=$as_save_IFS
3836
3837  ;;
3838esac
3839fi
3840BASENAME=$ac_cv_path_BASENAME
3841if test -n "$BASENAME"; then
3842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3843$as_echo "$BASENAME" >&6; }
3844else
3845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3846$as_echo "no" >&6; }
3847fi
3848
3849
3850  test -n "$BASENAME" && break
3851done
3852
3853
3854    if test "x$BASENAME" = x; then
3855        if test "xbasename" = x; then
3856          PROG_NAME=basename
3857        else
3858          PROG_NAME=basename
3859        fi
3860        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3861$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3862        as_fn_error $? "Cannot continue" "$LINENO" 5
3863    fi
3864
3865
3866
3867    for ac_prog in bash
3868do
3869  # Extract the first word of "$ac_prog", so it can be a program name with args.
3870set dummy $ac_prog; ac_word=$2
3871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3872$as_echo_n "checking for $ac_word... " >&6; }
3873if test "${ac_cv_path_BASH+set}" = set; then :
3874  $as_echo_n "(cached) " >&6
3875else
3876  case $BASH in
3877  [\\/]* | ?:[\\/]*)
3878  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3879  ;;
3880  *)
3881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3882for as_dir in $PATH
3883do
3884  IFS=$as_save_IFS
3885  test -z "$as_dir" && as_dir=.
3886    for ac_exec_ext in '' $ac_executable_extensions; do
3887  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3888    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3890    break 2
3891  fi
3892done
3893  done
3894IFS=$as_save_IFS
3895
3896  ;;
3897esac
3898fi
3899BASH=$ac_cv_path_BASH
3900if test -n "$BASH"; then
3901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3902$as_echo "$BASH" >&6; }
3903else
3904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3905$as_echo "no" >&6; }
3906fi
3907
3908
3909  test -n "$BASH" && break
3910done
3911
3912
3913    if test "x$BASH" = x; then
3914        if test "xbash" = x; then
3915          PROG_NAME=bash
3916        else
3917          PROG_NAME=bash
3918        fi
3919        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3920$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3921        as_fn_error $? "Cannot continue" "$LINENO" 5
3922    fi
3923
3924
3925
3926    for ac_prog in cat
3927do
3928  # Extract the first word of "$ac_prog", so it can be a program name with args.
3929set dummy $ac_prog; ac_word=$2
3930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3931$as_echo_n "checking for $ac_word... " >&6; }
3932if test "${ac_cv_path_CAT+set}" = set; then :
3933  $as_echo_n "(cached) " >&6
3934else
3935  case $CAT in
3936  [\\/]* | ?:[\\/]*)
3937  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3938  ;;
3939  *)
3940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3941for as_dir in $PATH
3942do
3943  IFS=$as_save_IFS
3944  test -z "$as_dir" && as_dir=.
3945    for ac_exec_ext in '' $ac_executable_extensions; do
3946  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3947    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3949    break 2
3950  fi
3951done
3952  done
3953IFS=$as_save_IFS
3954
3955  ;;
3956esac
3957fi
3958CAT=$ac_cv_path_CAT
3959if test -n "$CAT"; then
3960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3961$as_echo "$CAT" >&6; }
3962else
3963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3964$as_echo "no" >&6; }
3965fi
3966
3967
3968  test -n "$CAT" && break
3969done
3970
3971
3972    if test "x$CAT" = x; then
3973        if test "xcat" = x; then
3974          PROG_NAME=cat
3975        else
3976          PROG_NAME=cat
3977        fi
3978        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3979$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3980        as_fn_error $? "Cannot continue" "$LINENO" 5
3981    fi
3982
3983
3984
3985    for ac_prog in chmod
3986do
3987  # Extract the first word of "$ac_prog", so it can be a program name with args.
3988set dummy $ac_prog; ac_word=$2
3989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3990$as_echo_n "checking for $ac_word... " >&6; }
3991if test "${ac_cv_path_CHMOD+set}" = set; then :
3992  $as_echo_n "(cached) " >&6
3993else
3994  case $CHMOD in
3995  [\\/]* | ?:[\\/]*)
3996  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3997  ;;
3998  *)
3999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4000for as_dir in $PATH
4001do
4002  IFS=$as_save_IFS
4003  test -z "$as_dir" && as_dir=.
4004    for ac_exec_ext in '' $ac_executable_extensions; do
4005  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4006    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4008    break 2
4009  fi
4010done
4011  done
4012IFS=$as_save_IFS
4013
4014  ;;
4015esac
4016fi
4017CHMOD=$ac_cv_path_CHMOD
4018if test -n "$CHMOD"; then
4019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4020$as_echo "$CHMOD" >&6; }
4021else
4022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4023$as_echo "no" >&6; }
4024fi
4025
4026
4027  test -n "$CHMOD" && break
4028done
4029
4030
4031    if test "x$CHMOD" = x; then
4032        if test "xchmod" = x; then
4033          PROG_NAME=chmod
4034        else
4035          PROG_NAME=chmod
4036        fi
4037        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4038$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4039        as_fn_error $? "Cannot continue" "$LINENO" 5
4040    fi
4041
4042
4043
4044    for ac_prog in cmp
4045do
4046  # Extract the first word of "$ac_prog", so it can be a program name with args.
4047set dummy $ac_prog; ac_word=$2
4048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4049$as_echo_n "checking for $ac_word... " >&6; }
4050if test "${ac_cv_path_CMP+set}" = set; then :
4051  $as_echo_n "(cached) " >&6
4052else
4053  case $CMP in
4054  [\\/]* | ?:[\\/]*)
4055  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4056  ;;
4057  *)
4058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4059for as_dir in $PATH
4060do
4061  IFS=$as_save_IFS
4062  test -z "$as_dir" && as_dir=.
4063    for ac_exec_ext in '' $ac_executable_extensions; do
4064  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4065    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4067    break 2
4068  fi
4069done
4070  done
4071IFS=$as_save_IFS
4072
4073  ;;
4074esac
4075fi
4076CMP=$ac_cv_path_CMP
4077if test -n "$CMP"; then
4078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4079$as_echo "$CMP" >&6; }
4080else
4081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4082$as_echo "no" >&6; }
4083fi
4084
4085
4086  test -n "$CMP" && break
4087done
4088
4089
4090    if test "x$CMP" = x; then
4091        if test "xcmp" = x; then
4092          PROG_NAME=cmp
4093        else
4094          PROG_NAME=cmp
4095        fi
4096        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4097$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4098        as_fn_error $? "Cannot continue" "$LINENO" 5
4099    fi
4100
4101
4102
4103    for ac_prog in comm
4104do
4105  # Extract the first word of "$ac_prog", so it can be a program name with args.
4106set dummy $ac_prog; ac_word=$2
4107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4108$as_echo_n "checking for $ac_word... " >&6; }
4109if test "${ac_cv_path_COMM+set}" = set; then :
4110  $as_echo_n "(cached) " >&6
4111else
4112  case $COMM in
4113  [\\/]* | ?:[\\/]*)
4114  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4115  ;;
4116  *)
4117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4118for as_dir in $PATH
4119do
4120  IFS=$as_save_IFS
4121  test -z "$as_dir" && as_dir=.
4122    for ac_exec_ext in '' $ac_executable_extensions; do
4123  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4124    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4126    break 2
4127  fi
4128done
4129  done
4130IFS=$as_save_IFS
4131
4132  ;;
4133esac
4134fi
4135COMM=$ac_cv_path_COMM
4136if test -n "$COMM"; then
4137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4138$as_echo "$COMM" >&6; }
4139else
4140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4141$as_echo "no" >&6; }
4142fi
4143
4144
4145  test -n "$COMM" && break
4146done
4147
4148
4149    if test "x$COMM" = x; then
4150        if test "xcomm" = x; then
4151          PROG_NAME=comm
4152        else
4153          PROG_NAME=comm
4154        fi
4155        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4156$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4157        as_fn_error $? "Cannot continue" "$LINENO" 5
4158    fi
4159
4160
4161
4162    for ac_prog in cp
4163do
4164  # Extract the first word of "$ac_prog", so it can be a program name with args.
4165set dummy $ac_prog; ac_word=$2
4166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4167$as_echo_n "checking for $ac_word... " >&6; }
4168if test "${ac_cv_path_CP+set}" = set; then :
4169  $as_echo_n "(cached) " >&6
4170else
4171  case $CP in
4172  [\\/]* | ?:[\\/]*)
4173  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4174  ;;
4175  *)
4176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4177for as_dir in $PATH
4178do
4179  IFS=$as_save_IFS
4180  test -z "$as_dir" && as_dir=.
4181    for ac_exec_ext in '' $ac_executable_extensions; do
4182  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4183    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4185    break 2
4186  fi
4187done
4188  done
4189IFS=$as_save_IFS
4190
4191  ;;
4192esac
4193fi
4194CP=$ac_cv_path_CP
4195if test -n "$CP"; then
4196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4197$as_echo "$CP" >&6; }
4198else
4199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4200$as_echo "no" >&6; }
4201fi
4202
4203
4204  test -n "$CP" && break
4205done
4206
4207
4208    if test "x$CP" = x; then
4209        if test "xcp" = x; then
4210          PROG_NAME=cp
4211        else
4212          PROG_NAME=cp
4213        fi
4214        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4215$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4216        as_fn_error $? "Cannot continue" "$LINENO" 5
4217    fi
4218
4219
4220
4221    for ac_prog in cpio
4222do
4223  # Extract the first word of "$ac_prog", so it can be a program name with args.
4224set dummy $ac_prog; ac_word=$2
4225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4226$as_echo_n "checking for $ac_word... " >&6; }
4227if test "${ac_cv_path_CPIO+set}" = set; then :
4228  $as_echo_n "(cached) " >&6
4229else
4230  case $CPIO in
4231  [\\/]* | ?:[\\/]*)
4232  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4233  ;;
4234  *)
4235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4236for as_dir in $PATH
4237do
4238  IFS=$as_save_IFS
4239  test -z "$as_dir" && as_dir=.
4240    for ac_exec_ext in '' $ac_executable_extensions; do
4241  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4242    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4244    break 2
4245  fi
4246done
4247  done
4248IFS=$as_save_IFS
4249
4250  ;;
4251esac
4252fi
4253CPIO=$ac_cv_path_CPIO
4254if test -n "$CPIO"; then
4255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4256$as_echo "$CPIO" >&6; }
4257else
4258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4259$as_echo "no" >&6; }
4260fi
4261
4262
4263  test -n "$CPIO" && break
4264done
4265
4266
4267    if test "x$CPIO" = x; then
4268        if test "xcpio" = x; then
4269          PROG_NAME=cpio
4270        else
4271          PROG_NAME=cpio
4272        fi
4273        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4274$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4275        as_fn_error $? "Cannot continue" "$LINENO" 5
4276    fi
4277
4278
4279
4280    for ac_prog in cut
4281do
4282  # Extract the first word of "$ac_prog", so it can be a program name with args.
4283set dummy $ac_prog; ac_word=$2
4284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4285$as_echo_n "checking for $ac_word... " >&6; }
4286if test "${ac_cv_path_CUT+set}" = set; then :
4287  $as_echo_n "(cached) " >&6
4288else
4289  case $CUT in
4290  [\\/]* | ?:[\\/]*)
4291  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4292  ;;
4293  *)
4294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4295for as_dir in $PATH
4296do
4297  IFS=$as_save_IFS
4298  test -z "$as_dir" && as_dir=.
4299    for ac_exec_ext in '' $ac_executable_extensions; do
4300  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4301    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4303    break 2
4304  fi
4305done
4306  done
4307IFS=$as_save_IFS
4308
4309  ;;
4310esac
4311fi
4312CUT=$ac_cv_path_CUT
4313if test -n "$CUT"; then
4314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4315$as_echo "$CUT" >&6; }
4316else
4317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4318$as_echo "no" >&6; }
4319fi
4320
4321
4322  test -n "$CUT" && break
4323done
4324
4325
4326    if test "x$CUT" = x; then
4327        if test "xcut" = x; then
4328          PROG_NAME=cut
4329        else
4330          PROG_NAME=cut
4331        fi
4332        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4333$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4334        as_fn_error $? "Cannot continue" "$LINENO" 5
4335    fi
4336
4337
4338
4339    for ac_prog in date
4340do
4341  # Extract the first word of "$ac_prog", so it can be a program name with args.
4342set dummy $ac_prog; ac_word=$2
4343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4344$as_echo_n "checking for $ac_word... " >&6; }
4345if test "${ac_cv_path_DATE+set}" = set; then :
4346  $as_echo_n "(cached) " >&6
4347else
4348  case $DATE in
4349  [\\/]* | ?:[\\/]*)
4350  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4351  ;;
4352  *)
4353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4354for as_dir in $PATH
4355do
4356  IFS=$as_save_IFS
4357  test -z "$as_dir" && as_dir=.
4358    for ac_exec_ext in '' $ac_executable_extensions; do
4359  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4360    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4362    break 2
4363  fi
4364done
4365  done
4366IFS=$as_save_IFS
4367
4368  ;;
4369esac
4370fi
4371DATE=$ac_cv_path_DATE
4372if test -n "$DATE"; then
4373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4374$as_echo "$DATE" >&6; }
4375else
4376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4377$as_echo "no" >&6; }
4378fi
4379
4380
4381  test -n "$DATE" && break
4382done
4383
4384
4385    if test "x$DATE" = x; then
4386        if test "xdate" = x; then
4387          PROG_NAME=date
4388        else
4389          PROG_NAME=date
4390        fi
4391        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4392$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4393        as_fn_error $? "Cannot continue" "$LINENO" 5
4394    fi
4395
4396
4397
4398    for ac_prog in gdiff diff
4399do
4400  # Extract the first word of "$ac_prog", so it can be a program name with args.
4401set dummy $ac_prog; ac_word=$2
4402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4403$as_echo_n "checking for $ac_word... " >&6; }
4404if test "${ac_cv_path_DIFF+set}" = set; then :
4405  $as_echo_n "(cached) " >&6
4406else
4407  case $DIFF in
4408  [\\/]* | ?:[\\/]*)
4409  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4410  ;;
4411  *)
4412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4413for as_dir in $PATH
4414do
4415  IFS=$as_save_IFS
4416  test -z "$as_dir" && as_dir=.
4417    for ac_exec_ext in '' $ac_executable_extensions; do
4418  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4419    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4421    break 2
4422  fi
4423done
4424  done
4425IFS=$as_save_IFS
4426
4427  ;;
4428esac
4429fi
4430DIFF=$ac_cv_path_DIFF
4431if test -n "$DIFF"; then
4432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4433$as_echo "$DIFF" >&6; }
4434else
4435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4436$as_echo "no" >&6; }
4437fi
4438
4439
4440  test -n "$DIFF" && break
4441done
4442
4443
4444    if test "x$DIFF" = x; then
4445        if test "xgdiff diff" = x; then
4446          PROG_NAME=diff
4447        else
4448          PROG_NAME=gdiff diff
4449        fi
4450        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4451$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4452        as_fn_error $? "Cannot continue" "$LINENO" 5
4453    fi
4454
4455
4456
4457    for ac_prog in dirname
4458do
4459  # Extract the first word of "$ac_prog", so it can be a program name with args.
4460set dummy $ac_prog; ac_word=$2
4461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4462$as_echo_n "checking for $ac_word... " >&6; }
4463if test "${ac_cv_path_DIRNAME+set}" = set; then :
4464  $as_echo_n "(cached) " >&6
4465else
4466  case $DIRNAME in
4467  [\\/]* | ?:[\\/]*)
4468  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4469  ;;
4470  *)
4471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4472for as_dir in $PATH
4473do
4474  IFS=$as_save_IFS
4475  test -z "$as_dir" && as_dir=.
4476    for ac_exec_ext in '' $ac_executable_extensions; do
4477  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4478    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4480    break 2
4481  fi
4482done
4483  done
4484IFS=$as_save_IFS
4485
4486  ;;
4487esac
4488fi
4489DIRNAME=$ac_cv_path_DIRNAME
4490if test -n "$DIRNAME"; then
4491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4492$as_echo "$DIRNAME" >&6; }
4493else
4494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4495$as_echo "no" >&6; }
4496fi
4497
4498
4499  test -n "$DIRNAME" && break
4500done
4501
4502
4503    if test "x$DIRNAME" = x; then
4504        if test "xdirname" = x; then
4505          PROG_NAME=dirname
4506        else
4507          PROG_NAME=dirname
4508        fi
4509        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4510$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4511        as_fn_error $? "Cannot continue" "$LINENO" 5
4512    fi
4513
4514
4515
4516    for ac_prog in echo
4517do
4518  # Extract the first word of "$ac_prog", so it can be a program name with args.
4519set dummy $ac_prog; ac_word=$2
4520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4521$as_echo_n "checking for $ac_word... " >&6; }
4522if test "${ac_cv_path_ECHO+set}" = set; then :
4523  $as_echo_n "(cached) " >&6
4524else
4525  case $ECHO in
4526  [\\/]* | ?:[\\/]*)
4527  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4528  ;;
4529  *)
4530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4531for as_dir in $PATH
4532do
4533  IFS=$as_save_IFS
4534  test -z "$as_dir" && as_dir=.
4535    for ac_exec_ext in '' $ac_executable_extensions; do
4536  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4537    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4539    break 2
4540  fi
4541done
4542  done
4543IFS=$as_save_IFS
4544
4545  ;;
4546esac
4547fi
4548ECHO=$ac_cv_path_ECHO
4549if test -n "$ECHO"; then
4550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4551$as_echo "$ECHO" >&6; }
4552else
4553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4554$as_echo "no" >&6; }
4555fi
4556
4557
4558  test -n "$ECHO" && break
4559done
4560
4561
4562    if test "x$ECHO" = x; then
4563        if test "xecho" = x; then
4564          PROG_NAME=echo
4565        else
4566          PROG_NAME=echo
4567        fi
4568        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4569$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4570        as_fn_error $? "Cannot continue" "$LINENO" 5
4571    fi
4572
4573
4574
4575    for ac_prog in expr
4576do
4577  # Extract the first word of "$ac_prog", so it can be a program name with args.
4578set dummy $ac_prog; ac_word=$2
4579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4580$as_echo_n "checking for $ac_word... " >&6; }
4581if test "${ac_cv_path_EXPR+set}" = set; then :
4582  $as_echo_n "(cached) " >&6
4583else
4584  case $EXPR in
4585  [\\/]* | ?:[\\/]*)
4586  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4587  ;;
4588  *)
4589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4590for as_dir in $PATH
4591do
4592  IFS=$as_save_IFS
4593  test -z "$as_dir" && as_dir=.
4594    for ac_exec_ext in '' $ac_executable_extensions; do
4595  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4596    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4598    break 2
4599  fi
4600done
4601  done
4602IFS=$as_save_IFS
4603
4604  ;;
4605esac
4606fi
4607EXPR=$ac_cv_path_EXPR
4608if test -n "$EXPR"; then
4609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4610$as_echo "$EXPR" >&6; }
4611else
4612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4613$as_echo "no" >&6; }
4614fi
4615
4616
4617  test -n "$EXPR" && break
4618done
4619
4620
4621    if test "x$EXPR" = x; then
4622        if test "xexpr" = x; then
4623          PROG_NAME=expr
4624        else
4625          PROG_NAME=expr
4626        fi
4627        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4628$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4629        as_fn_error $? "Cannot continue" "$LINENO" 5
4630    fi
4631
4632
4633
4634    for ac_prog in file
4635do
4636  # Extract the first word of "$ac_prog", so it can be a program name with args.
4637set dummy $ac_prog; ac_word=$2
4638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4639$as_echo_n "checking for $ac_word... " >&6; }
4640if test "${ac_cv_path_FILE+set}" = set; then :
4641  $as_echo_n "(cached) " >&6
4642else
4643  case $FILE in
4644  [\\/]* | ?:[\\/]*)
4645  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4646  ;;
4647  *)
4648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4649for as_dir in $PATH
4650do
4651  IFS=$as_save_IFS
4652  test -z "$as_dir" && as_dir=.
4653    for ac_exec_ext in '' $ac_executable_extensions; do
4654  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4655    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4657    break 2
4658  fi
4659done
4660  done
4661IFS=$as_save_IFS
4662
4663  ;;
4664esac
4665fi
4666FILE=$ac_cv_path_FILE
4667if test -n "$FILE"; then
4668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4669$as_echo "$FILE" >&6; }
4670else
4671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4672$as_echo "no" >&6; }
4673fi
4674
4675
4676  test -n "$FILE" && break
4677done
4678
4679
4680    if test "x$FILE" = x; then
4681        if test "xfile" = x; then
4682          PROG_NAME=file
4683        else
4684          PROG_NAME=file
4685        fi
4686        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4687$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4688        as_fn_error $? "Cannot continue" "$LINENO" 5
4689    fi
4690
4691
4692
4693    for ac_prog in find
4694do
4695  # Extract the first word of "$ac_prog", so it can be a program name with args.
4696set dummy $ac_prog; ac_word=$2
4697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4698$as_echo_n "checking for $ac_word... " >&6; }
4699if test "${ac_cv_path_FIND+set}" = set; then :
4700  $as_echo_n "(cached) " >&6
4701else
4702  case $FIND in
4703  [\\/]* | ?:[\\/]*)
4704  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4705  ;;
4706  *)
4707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4708for as_dir in $PATH
4709do
4710  IFS=$as_save_IFS
4711  test -z "$as_dir" && as_dir=.
4712    for ac_exec_ext in '' $ac_executable_extensions; do
4713  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4714    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4716    break 2
4717  fi
4718done
4719  done
4720IFS=$as_save_IFS
4721
4722  ;;
4723esac
4724fi
4725FIND=$ac_cv_path_FIND
4726if test -n "$FIND"; then
4727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4728$as_echo "$FIND" >&6; }
4729else
4730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4731$as_echo "no" >&6; }
4732fi
4733
4734
4735  test -n "$FIND" && break
4736done
4737
4738
4739    if test "x$FIND" = x; then
4740        if test "xfind" = x; then
4741          PROG_NAME=find
4742        else
4743          PROG_NAME=find
4744        fi
4745        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4746$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4747        as_fn_error $? "Cannot continue" "$LINENO" 5
4748    fi
4749
4750
4751
4752    for ac_prog in head
4753do
4754  # Extract the first word of "$ac_prog", so it can be a program name with args.
4755set dummy $ac_prog; ac_word=$2
4756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4757$as_echo_n "checking for $ac_word... " >&6; }
4758if test "${ac_cv_path_HEAD+set}" = set; then :
4759  $as_echo_n "(cached) " >&6
4760else
4761  case $HEAD in
4762  [\\/]* | ?:[\\/]*)
4763  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4764  ;;
4765  *)
4766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4767for as_dir in $PATH
4768do
4769  IFS=$as_save_IFS
4770  test -z "$as_dir" && as_dir=.
4771    for ac_exec_ext in '' $ac_executable_extensions; do
4772  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4773    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4775    break 2
4776  fi
4777done
4778  done
4779IFS=$as_save_IFS
4780
4781  ;;
4782esac
4783fi
4784HEAD=$ac_cv_path_HEAD
4785if test -n "$HEAD"; then
4786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4787$as_echo "$HEAD" >&6; }
4788else
4789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4790$as_echo "no" >&6; }
4791fi
4792
4793
4794  test -n "$HEAD" && break
4795done
4796
4797
4798    if test "x$HEAD" = x; then
4799        if test "xhead" = x; then
4800          PROG_NAME=head
4801        else
4802          PROG_NAME=head
4803        fi
4804        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4805$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4806        as_fn_error $? "Cannot continue" "$LINENO" 5
4807    fi
4808
4809
4810
4811    for ac_prog in ln
4812do
4813  # Extract the first word of "$ac_prog", so it can be a program name with args.
4814set dummy $ac_prog; ac_word=$2
4815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4816$as_echo_n "checking for $ac_word... " >&6; }
4817if test "${ac_cv_path_LN+set}" = set; then :
4818  $as_echo_n "(cached) " >&6
4819else
4820  case $LN in
4821  [\\/]* | ?:[\\/]*)
4822  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4823  ;;
4824  *)
4825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4826for as_dir in $PATH
4827do
4828  IFS=$as_save_IFS
4829  test -z "$as_dir" && as_dir=.
4830    for ac_exec_ext in '' $ac_executable_extensions; do
4831  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4832    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4834    break 2
4835  fi
4836done
4837  done
4838IFS=$as_save_IFS
4839
4840  ;;
4841esac
4842fi
4843LN=$ac_cv_path_LN
4844if test -n "$LN"; then
4845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4846$as_echo "$LN" >&6; }
4847else
4848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4849$as_echo "no" >&6; }
4850fi
4851
4852
4853  test -n "$LN" && break
4854done
4855
4856
4857    if test "x$LN" = x; then
4858        if test "xln" = x; then
4859          PROG_NAME=ln
4860        else
4861          PROG_NAME=ln
4862        fi
4863        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4864$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4865        as_fn_error $? "Cannot continue" "$LINENO" 5
4866    fi
4867
4868
4869
4870    for ac_prog in ls
4871do
4872  # Extract the first word of "$ac_prog", so it can be a program name with args.
4873set dummy $ac_prog; ac_word=$2
4874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4875$as_echo_n "checking for $ac_word... " >&6; }
4876if test "${ac_cv_path_LS+set}" = set; then :
4877  $as_echo_n "(cached) " >&6
4878else
4879  case $LS in
4880  [\\/]* | ?:[\\/]*)
4881  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4882  ;;
4883  *)
4884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4885for as_dir in $PATH
4886do
4887  IFS=$as_save_IFS
4888  test -z "$as_dir" && as_dir=.
4889    for ac_exec_ext in '' $ac_executable_extensions; do
4890  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4891    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4893    break 2
4894  fi
4895done
4896  done
4897IFS=$as_save_IFS
4898
4899  ;;
4900esac
4901fi
4902LS=$ac_cv_path_LS
4903if test -n "$LS"; then
4904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4905$as_echo "$LS" >&6; }
4906else
4907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4908$as_echo "no" >&6; }
4909fi
4910
4911
4912  test -n "$LS" && break
4913done
4914
4915
4916    if test "x$LS" = x; then
4917        if test "xls" = x; then
4918          PROG_NAME=ls
4919        else
4920          PROG_NAME=ls
4921        fi
4922        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4923$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4924        as_fn_error $? "Cannot continue" "$LINENO" 5
4925    fi
4926
4927
4928
4929    for ac_prog in mkdir
4930do
4931  # Extract the first word of "$ac_prog", so it can be a program name with args.
4932set dummy $ac_prog; ac_word=$2
4933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4934$as_echo_n "checking for $ac_word... " >&6; }
4935if test "${ac_cv_path_MKDIR+set}" = set; then :
4936  $as_echo_n "(cached) " >&6
4937else
4938  case $MKDIR in
4939  [\\/]* | ?:[\\/]*)
4940  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4941  ;;
4942  *)
4943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4944for as_dir in $PATH
4945do
4946  IFS=$as_save_IFS
4947  test -z "$as_dir" && as_dir=.
4948    for ac_exec_ext in '' $ac_executable_extensions; do
4949  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4950    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4952    break 2
4953  fi
4954done
4955  done
4956IFS=$as_save_IFS
4957
4958  ;;
4959esac
4960fi
4961MKDIR=$ac_cv_path_MKDIR
4962if test -n "$MKDIR"; then
4963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4964$as_echo "$MKDIR" >&6; }
4965else
4966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4967$as_echo "no" >&6; }
4968fi
4969
4970
4971  test -n "$MKDIR" && break
4972done
4973
4974
4975    if test "x$MKDIR" = x; then
4976        if test "xmkdir" = x; then
4977          PROG_NAME=mkdir
4978        else
4979          PROG_NAME=mkdir
4980        fi
4981        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4982$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4983        as_fn_error $? "Cannot continue" "$LINENO" 5
4984    fi
4985
4986
4987
4988    for ac_prog in mktemp
4989do
4990  # Extract the first word of "$ac_prog", so it can be a program name with args.
4991set dummy $ac_prog; ac_word=$2
4992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4993$as_echo_n "checking for $ac_word... " >&6; }
4994if test "${ac_cv_path_MKTEMP+set}" = set; then :
4995  $as_echo_n "(cached) " >&6
4996else
4997  case $MKTEMP in
4998  [\\/]* | ?:[\\/]*)
4999  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5000  ;;
5001  *)
5002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5003for as_dir in $PATH
5004do
5005  IFS=$as_save_IFS
5006  test -z "$as_dir" && as_dir=.
5007    for ac_exec_ext in '' $ac_executable_extensions; do
5008  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5009    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5011    break 2
5012  fi
5013done
5014  done
5015IFS=$as_save_IFS
5016
5017  ;;
5018esac
5019fi
5020MKTEMP=$ac_cv_path_MKTEMP
5021if test -n "$MKTEMP"; then
5022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5023$as_echo "$MKTEMP" >&6; }
5024else
5025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5026$as_echo "no" >&6; }
5027fi
5028
5029
5030  test -n "$MKTEMP" && break
5031done
5032
5033
5034    if test "x$MKTEMP" = x; then
5035        if test "xmktemp" = x; then
5036          PROG_NAME=mktemp
5037        else
5038          PROG_NAME=mktemp
5039        fi
5040        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5041$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5042        as_fn_error $? "Cannot continue" "$LINENO" 5
5043    fi
5044
5045
5046
5047    for ac_prog in mv
5048do
5049  # Extract the first word of "$ac_prog", so it can be a program name with args.
5050set dummy $ac_prog; ac_word=$2
5051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5052$as_echo_n "checking for $ac_word... " >&6; }
5053if test "${ac_cv_path_MV+set}" = set; then :
5054  $as_echo_n "(cached) " >&6
5055else
5056  case $MV in
5057  [\\/]* | ?:[\\/]*)
5058  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5059  ;;
5060  *)
5061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5062for as_dir in $PATH
5063do
5064  IFS=$as_save_IFS
5065  test -z "$as_dir" && as_dir=.
5066    for ac_exec_ext in '' $ac_executable_extensions; do
5067  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5068    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5070    break 2
5071  fi
5072done
5073  done
5074IFS=$as_save_IFS
5075
5076  ;;
5077esac
5078fi
5079MV=$ac_cv_path_MV
5080if test -n "$MV"; then
5081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5082$as_echo "$MV" >&6; }
5083else
5084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5085$as_echo "no" >&6; }
5086fi
5087
5088
5089  test -n "$MV" && break
5090done
5091
5092
5093    if test "x$MV" = x; then
5094        if test "xmv" = x; then
5095          PROG_NAME=mv
5096        else
5097          PROG_NAME=mv
5098        fi
5099        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5100$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5101        as_fn_error $? "Cannot continue" "$LINENO" 5
5102    fi
5103
5104
5105
5106    for ac_prog in printf
5107do
5108  # Extract the first word of "$ac_prog", so it can be a program name with args.
5109set dummy $ac_prog; ac_word=$2
5110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5111$as_echo_n "checking for $ac_word... " >&6; }
5112if test "${ac_cv_path_PRINTF+set}" = set; then :
5113  $as_echo_n "(cached) " >&6
5114else
5115  case $PRINTF in
5116  [\\/]* | ?:[\\/]*)
5117  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5118  ;;
5119  *)
5120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5121for as_dir in $PATH
5122do
5123  IFS=$as_save_IFS
5124  test -z "$as_dir" && as_dir=.
5125    for ac_exec_ext in '' $ac_executable_extensions; do
5126  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5127    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5129    break 2
5130  fi
5131done
5132  done
5133IFS=$as_save_IFS
5134
5135  ;;
5136esac
5137fi
5138PRINTF=$ac_cv_path_PRINTF
5139if test -n "$PRINTF"; then
5140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5141$as_echo "$PRINTF" >&6; }
5142else
5143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5144$as_echo "no" >&6; }
5145fi
5146
5147
5148  test -n "$PRINTF" && break
5149done
5150
5151
5152    if test "x$PRINTF" = x; then
5153        if test "xprintf" = x; then
5154          PROG_NAME=printf
5155        else
5156          PROG_NAME=printf
5157        fi
5158        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5159$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5160        as_fn_error $? "Cannot continue" "$LINENO" 5
5161    fi
5162
5163
5164
5165    for ac_prog in pwd
5166do
5167  # Extract the first word of "$ac_prog", so it can be a program name with args.
5168set dummy $ac_prog; ac_word=$2
5169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5170$as_echo_n "checking for $ac_word... " >&6; }
5171if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5172  $as_echo_n "(cached) " >&6
5173else
5174  case $THEPWDCMD in
5175  [\\/]* | ?:[\\/]*)
5176  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5177  ;;
5178  *)
5179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5180for as_dir in $PATH
5181do
5182  IFS=$as_save_IFS
5183  test -z "$as_dir" && as_dir=.
5184    for ac_exec_ext in '' $ac_executable_extensions; do
5185  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5186    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5188    break 2
5189  fi
5190done
5191  done
5192IFS=$as_save_IFS
5193
5194  ;;
5195esac
5196fi
5197THEPWDCMD=$ac_cv_path_THEPWDCMD
5198if test -n "$THEPWDCMD"; then
5199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5200$as_echo "$THEPWDCMD" >&6; }
5201else
5202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5203$as_echo "no" >&6; }
5204fi
5205
5206
5207  test -n "$THEPWDCMD" && break
5208done
5209
5210
5211    if test "x$THEPWDCMD" = x; then
5212        if test "xpwd" = x; then
5213          PROG_NAME=thepwdcmd
5214        else
5215          PROG_NAME=pwd
5216        fi
5217        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5218$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5219        as_fn_error $? "Cannot continue" "$LINENO" 5
5220    fi
5221
5222
5223
5224    for ac_prog in rm
5225do
5226  # Extract the first word of "$ac_prog", so it can be a program name with args.
5227set dummy $ac_prog; ac_word=$2
5228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5229$as_echo_n "checking for $ac_word... " >&6; }
5230if test "${ac_cv_path_RM+set}" = set; then :
5231  $as_echo_n "(cached) " >&6
5232else
5233  case $RM in
5234  [\\/]* | ?:[\\/]*)
5235  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5236  ;;
5237  *)
5238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5239for as_dir in $PATH
5240do
5241  IFS=$as_save_IFS
5242  test -z "$as_dir" && as_dir=.
5243    for ac_exec_ext in '' $ac_executable_extensions; do
5244  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5245    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5247    break 2
5248  fi
5249done
5250  done
5251IFS=$as_save_IFS
5252
5253  ;;
5254esac
5255fi
5256RM=$ac_cv_path_RM
5257if test -n "$RM"; then
5258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5259$as_echo "$RM" >&6; }
5260else
5261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5262$as_echo "no" >&6; }
5263fi
5264
5265
5266  test -n "$RM" && break
5267done
5268
5269
5270    if test "x$RM" = x; then
5271        if test "xrm" = x; then
5272          PROG_NAME=rm
5273        else
5274          PROG_NAME=rm
5275        fi
5276        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5277$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5278        as_fn_error $? "Cannot continue" "$LINENO" 5
5279    fi
5280
5281
5282
5283    for ac_prog in sh
5284do
5285  # Extract the first word of "$ac_prog", so it can be a program name with args.
5286set dummy $ac_prog; ac_word=$2
5287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5288$as_echo_n "checking for $ac_word... " >&6; }
5289if test "${ac_cv_path_SH+set}" = set; then :
5290  $as_echo_n "(cached) " >&6
5291else
5292  case $SH in
5293  [\\/]* | ?:[\\/]*)
5294  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5295  ;;
5296  *)
5297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5298for as_dir in $PATH
5299do
5300  IFS=$as_save_IFS
5301  test -z "$as_dir" && as_dir=.
5302    for ac_exec_ext in '' $ac_executable_extensions; do
5303  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5304    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5306    break 2
5307  fi
5308done
5309  done
5310IFS=$as_save_IFS
5311
5312  ;;
5313esac
5314fi
5315SH=$ac_cv_path_SH
5316if test -n "$SH"; then
5317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5318$as_echo "$SH" >&6; }
5319else
5320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5321$as_echo "no" >&6; }
5322fi
5323
5324
5325  test -n "$SH" && break
5326done
5327
5328
5329    if test "x$SH" = x; then
5330        if test "xsh" = x; then
5331          PROG_NAME=sh
5332        else
5333          PROG_NAME=sh
5334        fi
5335        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5336$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5337        as_fn_error $? "Cannot continue" "$LINENO" 5
5338    fi
5339
5340
5341
5342    for ac_prog in sort
5343do
5344  # Extract the first word of "$ac_prog", so it can be a program name with args.
5345set dummy $ac_prog; ac_word=$2
5346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5347$as_echo_n "checking for $ac_word... " >&6; }
5348if test "${ac_cv_path_SORT+set}" = set; then :
5349  $as_echo_n "(cached) " >&6
5350else
5351  case $SORT in
5352  [\\/]* | ?:[\\/]*)
5353  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5354  ;;
5355  *)
5356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5357for as_dir in $PATH
5358do
5359  IFS=$as_save_IFS
5360  test -z "$as_dir" && as_dir=.
5361    for ac_exec_ext in '' $ac_executable_extensions; do
5362  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5363    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5365    break 2
5366  fi
5367done
5368  done
5369IFS=$as_save_IFS
5370
5371  ;;
5372esac
5373fi
5374SORT=$ac_cv_path_SORT
5375if test -n "$SORT"; then
5376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5377$as_echo "$SORT" >&6; }
5378else
5379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5380$as_echo "no" >&6; }
5381fi
5382
5383
5384  test -n "$SORT" && break
5385done
5386
5387
5388    if test "x$SORT" = x; then
5389        if test "xsort" = x; then
5390          PROG_NAME=sort
5391        else
5392          PROG_NAME=sort
5393        fi
5394        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5395$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5396        as_fn_error $? "Cannot continue" "$LINENO" 5
5397    fi
5398
5399
5400
5401    for ac_prog in tail
5402do
5403  # Extract the first word of "$ac_prog", so it can be a program name with args.
5404set dummy $ac_prog; ac_word=$2
5405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5406$as_echo_n "checking for $ac_word... " >&6; }
5407if test "${ac_cv_path_TAIL+set}" = set; then :
5408  $as_echo_n "(cached) " >&6
5409else
5410  case $TAIL in
5411  [\\/]* | ?:[\\/]*)
5412  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5413  ;;
5414  *)
5415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5416for as_dir in $PATH
5417do
5418  IFS=$as_save_IFS
5419  test -z "$as_dir" && as_dir=.
5420    for ac_exec_ext in '' $ac_executable_extensions; do
5421  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5422    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5424    break 2
5425  fi
5426done
5427  done
5428IFS=$as_save_IFS
5429
5430  ;;
5431esac
5432fi
5433TAIL=$ac_cv_path_TAIL
5434if test -n "$TAIL"; then
5435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5436$as_echo "$TAIL" >&6; }
5437else
5438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5439$as_echo "no" >&6; }
5440fi
5441
5442
5443  test -n "$TAIL" && break
5444done
5445
5446
5447    if test "x$TAIL" = x; then
5448        if test "xtail" = x; then
5449          PROG_NAME=tail
5450        else
5451          PROG_NAME=tail
5452        fi
5453        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5454$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5455        as_fn_error $? "Cannot continue" "$LINENO" 5
5456    fi
5457
5458
5459
5460    for ac_prog in tar
5461do
5462  # Extract the first word of "$ac_prog", so it can be a program name with args.
5463set dummy $ac_prog; ac_word=$2
5464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5465$as_echo_n "checking for $ac_word... " >&6; }
5466if test "${ac_cv_path_TAR+set}" = set; then :
5467  $as_echo_n "(cached) " >&6
5468else
5469  case $TAR in
5470  [\\/]* | ?:[\\/]*)
5471  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5472  ;;
5473  *)
5474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5475for as_dir in $PATH
5476do
5477  IFS=$as_save_IFS
5478  test -z "$as_dir" && as_dir=.
5479    for ac_exec_ext in '' $ac_executable_extensions; do
5480  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5481    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5483    break 2
5484  fi
5485done
5486  done
5487IFS=$as_save_IFS
5488
5489  ;;
5490esac
5491fi
5492TAR=$ac_cv_path_TAR
5493if test -n "$TAR"; then
5494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5495$as_echo "$TAR" >&6; }
5496else
5497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5498$as_echo "no" >&6; }
5499fi
5500
5501
5502  test -n "$TAR" && break
5503done
5504
5505
5506    if test "x$TAR" = x; then
5507        if test "xtar" = x; then
5508          PROG_NAME=tar
5509        else
5510          PROG_NAME=tar
5511        fi
5512        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5513$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5514        as_fn_error $? "Cannot continue" "$LINENO" 5
5515    fi
5516
5517
5518
5519    for ac_prog in tee
5520do
5521  # Extract the first word of "$ac_prog", so it can be a program name with args.
5522set dummy $ac_prog; ac_word=$2
5523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5524$as_echo_n "checking for $ac_word... " >&6; }
5525if test "${ac_cv_path_TEE+set}" = set; then :
5526  $as_echo_n "(cached) " >&6
5527else
5528  case $TEE in
5529  [\\/]* | ?:[\\/]*)
5530  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5531  ;;
5532  *)
5533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5534for as_dir in $PATH
5535do
5536  IFS=$as_save_IFS
5537  test -z "$as_dir" && as_dir=.
5538    for ac_exec_ext in '' $ac_executable_extensions; do
5539  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5540    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5542    break 2
5543  fi
5544done
5545  done
5546IFS=$as_save_IFS
5547
5548  ;;
5549esac
5550fi
5551TEE=$ac_cv_path_TEE
5552if test -n "$TEE"; then
5553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5554$as_echo "$TEE" >&6; }
5555else
5556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5557$as_echo "no" >&6; }
5558fi
5559
5560
5561  test -n "$TEE" && break
5562done
5563
5564
5565    if test "x$TEE" = x; then
5566        if test "xtee" = x; then
5567          PROG_NAME=tee
5568        else
5569          PROG_NAME=tee
5570        fi
5571        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5572$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5573        as_fn_error $? "Cannot continue" "$LINENO" 5
5574    fi
5575
5576
5577
5578    for ac_prog in touch
5579do
5580  # Extract the first word of "$ac_prog", so it can be a program name with args.
5581set dummy $ac_prog; ac_word=$2
5582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5583$as_echo_n "checking for $ac_word... " >&6; }
5584if test "${ac_cv_path_TOUCH+set}" = set; then :
5585  $as_echo_n "(cached) " >&6
5586else
5587  case $TOUCH in
5588  [\\/]* | ?:[\\/]*)
5589  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5590  ;;
5591  *)
5592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5593for as_dir in $PATH
5594do
5595  IFS=$as_save_IFS
5596  test -z "$as_dir" && as_dir=.
5597    for ac_exec_ext in '' $ac_executable_extensions; do
5598  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5599    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5601    break 2
5602  fi
5603done
5604  done
5605IFS=$as_save_IFS
5606
5607  ;;
5608esac
5609fi
5610TOUCH=$ac_cv_path_TOUCH
5611if test -n "$TOUCH"; then
5612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5613$as_echo "$TOUCH" >&6; }
5614else
5615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5616$as_echo "no" >&6; }
5617fi
5618
5619
5620  test -n "$TOUCH" && break
5621done
5622
5623
5624    if test "x$TOUCH" = x; then
5625        if test "xtouch" = x; then
5626          PROG_NAME=touch
5627        else
5628          PROG_NAME=touch
5629        fi
5630        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5631$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5632        as_fn_error $? "Cannot continue" "$LINENO" 5
5633    fi
5634
5635
5636
5637    for ac_prog in tr
5638do
5639  # Extract the first word of "$ac_prog", so it can be a program name with args.
5640set dummy $ac_prog; ac_word=$2
5641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5642$as_echo_n "checking for $ac_word... " >&6; }
5643if test "${ac_cv_path_TR+set}" = set; then :
5644  $as_echo_n "(cached) " >&6
5645else
5646  case $TR in
5647  [\\/]* | ?:[\\/]*)
5648  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5649  ;;
5650  *)
5651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5652for as_dir in $PATH
5653do
5654  IFS=$as_save_IFS
5655  test -z "$as_dir" && as_dir=.
5656    for ac_exec_ext in '' $ac_executable_extensions; do
5657  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5658    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5660    break 2
5661  fi
5662done
5663  done
5664IFS=$as_save_IFS
5665
5666  ;;
5667esac
5668fi
5669TR=$ac_cv_path_TR
5670if test -n "$TR"; then
5671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5672$as_echo "$TR" >&6; }
5673else
5674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5675$as_echo "no" >&6; }
5676fi
5677
5678
5679  test -n "$TR" && break
5680done
5681
5682
5683    if test "x$TR" = x; then
5684        if test "xtr" = x; then
5685          PROG_NAME=tr
5686        else
5687          PROG_NAME=tr
5688        fi
5689        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5690$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5691        as_fn_error $? "Cannot continue" "$LINENO" 5
5692    fi
5693
5694
5695
5696    for ac_prog in uname
5697do
5698  # Extract the first word of "$ac_prog", so it can be a program name with args.
5699set dummy $ac_prog; ac_word=$2
5700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5701$as_echo_n "checking for $ac_word... " >&6; }
5702if test "${ac_cv_path_UNAME+set}" = set; then :
5703  $as_echo_n "(cached) " >&6
5704else
5705  case $UNAME in
5706  [\\/]* | ?:[\\/]*)
5707  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5708  ;;
5709  *)
5710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5711for as_dir in $PATH
5712do
5713  IFS=$as_save_IFS
5714  test -z "$as_dir" && as_dir=.
5715    for ac_exec_ext in '' $ac_executable_extensions; do
5716  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5717    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5719    break 2
5720  fi
5721done
5722  done
5723IFS=$as_save_IFS
5724
5725  ;;
5726esac
5727fi
5728UNAME=$ac_cv_path_UNAME
5729if test -n "$UNAME"; then
5730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5731$as_echo "$UNAME" >&6; }
5732else
5733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5734$as_echo "no" >&6; }
5735fi
5736
5737
5738  test -n "$UNAME" && break
5739done
5740
5741
5742    if test "x$UNAME" = x; then
5743        if test "xuname" = x; then
5744          PROG_NAME=uname
5745        else
5746          PROG_NAME=uname
5747        fi
5748        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5749$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5750        as_fn_error $? "Cannot continue" "$LINENO" 5
5751    fi
5752
5753
5754
5755    for ac_prog in uniq
5756do
5757  # Extract the first word of "$ac_prog", so it can be a program name with args.
5758set dummy $ac_prog; ac_word=$2
5759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5760$as_echo_n "checking for $ac_word... " >&6; }
5761if test "${ac_cv_path_UNIQ+set}" = set; then :
5762  $as_echo_n "(cached) " >&6
5763else
5764  case $UNIQ in
5765  [\\/]* | ?:[\\/]*)
5766  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5767  ;;
5768  *)
5769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5770for as_dir in $PATH
5771do
5772  IFS=$as_save_IFS
5773  test -z "$as_dir" && as_dir=.
5774    for ac_exec_ext in '' $ac_executable_extensions; do
5775  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5776    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5778    break 2
5779  fi
5780done
5781  done
5782IFS=$as_save_IFS
5783
5784  ;;
5785esac
5786fi
5787UNIQ=$ac_cv_path_UNIQ
5788if test -n "$UNIQ"; then
5789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5790$as_echo "$UNIQ" >&6; }
5791else
5792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5793$as_echo "no" >&6; }
5794fi
5795
5796
5797  test -n "$UNIQ" && break
5798done
5799
5800
5801    if test "x$UNIQ" = x; then
5802        if test "xuniq" = x; then
5803          PROG_NAME=uniq
5804        else
5805          PROG_NAME=uniq
5806        fi
5807        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5808$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5809        as_fn_error $? "Cannot continue" "$LINENO" 5
5810    fi
5811
5812
5813
5814    for ac_prog in wc
5815do
5816  # Extract the first word of "$ac_prog", so it can be a program name with args.
5817set dummy $ac_prog; ac_word=$2
5818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5819$as_echo_n "checking for $ac_word... " >&6; }
5820if test "${ac_cv_path_WC+set}" = set; then :
5821  $as_echo_n "(cached) " >&6
5822else
5823  case $WC in
5824  [\\/]* | ?:[\\/]*)
5825  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5826  ;;
5827  *)
5828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5829for as_dir in $PATH
5830do
5831  IFS=$as_save_IFS
5832  test -z "$as_dir" && as_dir=.
5833    for ac_exec_ext in '' $ac_executable_extensions; do
5834  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5835    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5837    break 2
5838  fi
5839done
5840  done
5841IFS=$as_save_IFS
5842
5843  ;;
5844esac
5845fi
5846WC=$ac_cv_path_WC
5847if test -n "$WC"; then
5848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5849$as_echo "$WC" >&6; }
5850else
5851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5852$as_echo "no" >&6; }
5853fi
5854
5855
5856  test -n "$WC" && break
5857done
5858
5859
5860    if test "x$WC" = x; then
5861        if test "xwc" = x; then
5862          PROG_NAME=wc
5863        else
5864          PROG_NAME=wc
5865        fi
5866        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5867$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5868        as_fn_error $? "Cannot continue" "$LINENO" 5
5869    fi
5870
5871
5872
5873    for ac_prog in which
5874do
5875  # Extract the first word of "$ac_prog", so it can be a program name with args.
5876set dummy $ac_prog; ac_word=$2
5877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5878$as_echo_n "checking for $ac_word... " >&6; }
5879if test "${ac_cv_path_WHICH+set}" = set; then :
5880  $as_echo_n "(cached) " >&6
5881else
5882  case $WHICH in
5883  [\\/]* | ?:[\\/]*)
5884  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5885  ;;
5886  *)
5887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5888for as_dir in $PATH
5889do
5890  IFS=$as_save_IFS
5891  test -z "$as_dir" && as_dir=.
5892    for ac_exec_ext in '' $ac_executable_extensions; do
5893  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5894    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5896    break 2
5897  fi
5898done
5899  done
5900IFS=$as_save_IFS
5901
5902  ;;
5903esac
5904fi
5905WHICH=$ac_cv_path_WHICH
5906if test -n "$WHICH"; then
5907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5908$as_echo "$WHICH" >&6; }
5909else
5910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5911$as_echo "no" >&6; }
5912fi
5913
5914
5915  test -n "$WHICH" && break
5916done
5917
5918
5919    if test "x$WHICH" = x; then
5920        if test "xwhich" = x; then
5921          PROG_NAME=which
5922        else
5923          PROG_NAME=which
5924        fi
5925        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5926$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5927        as_fn_error $? "Cannot continue" "$LINENO" 5
5928    fi
5929
5930
5931
5932    for ac_prog in xargs
5933do
5934  # Extract the first word of "$ac_prog", so it can be a program name with args.
5935set dummy $ac_prog; ac_word=$2
5936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5937$as_echo_n "checking for $ac_word... " >&6; }
5938if test "${ac_cv_path_XARGS+set}" = set; then :
5939  $as_echo_n "(cached) " >&6
5940else
5941  case $XARGS in
5942  [\\/]* | ?:[\\/]*)
5943  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5944  ;;
5945  *)
5946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5947for as_dir in $PATH
5948do
5949  IFS=$as_save_IFS
5950  test -z "$as_dir" && as_dir=.
5951    for ac_exec_ext in '' $ac_executable_extensions; do
5952  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5953    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5955    break 2
5956  fi
5957done
5958  done
5959IFS=$as_save_IFS
5960
5961  ;;
5962esac
5963fi
5964XARGS=$ac_cv_path_XARGS
5965if test -n "$XARGS"; then
5966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5967$as_echo "$XARGS" >&6; }
5968else
5969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5970$as_echo "no" >&6; }
5971fi
5972
5973
5974  test -n "$XARGS" && break
5975done
5976
5977
5978    if test "x$XARGS" = x; then
5979        if test "xxargs" = x; then
5980          PROG_NAME=xargs
5981        else
5982          PROG_NAME=xargs
5983        fi
5984        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5985$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5986        as_fn_error $? "Cannot continue" "$LINENO" 5
5987    fi
5988
5989
5990
5991# Then required tools that require some special treatment.
5992for ac_prog in gawk mawk nawk awk
5993do
5994  # Extract the first word of "$ac_prog", so it can be a program name with args.
5995set dummy $ac_prog; ac_word=$2
5996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5997$as_echo_n "checking for $ac_word... " >&6; }
5998if test "${ac_cv_prog_AWK+set}" = set; then :
5999  $as_echo_n "(cached) " >&6
6000else
6001  if test -n "$AWK"; then
6002  ac_cv_prog_AWK="$AWK" # Let the user override the test.
6003else
6004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005for as_dir in $PATH
6006do
6007  IFS=$as_save_IFS
6008  test -z "$as_dir" && as_dir=.
6009    for ac_exec_ext in '' $ac_executable_extensions; do
6010  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6011    ac_cv_prog_AWK="$ac_prog"
6012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6013    break 2
6014  fi
6015done
6016  done
6017IFS=$as_save_IFS
6018
6019fi
6020fi
6021AWK=$ac_cv_prog_AWK
6022if test -n "$AWK"; then
6023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6024$as_echo "$AWK" >&6; }
6025else
6026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6027$as_echo "no" >&6; }
6028fi
6029
6030
6031  test -n "$AWK" && break
6032done
6033
6034
6035    if test "x$AWK" = x; then
6036        if test "x" = x; then
6037          PROG_NAME=awk
6038        else
6039          PROG_NAME=
6040        fi
6041        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6042$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6043        as_fn_error $? "Cannot continue" "$LINENO" 5
6044    fi
6045
6046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6047$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6048if test "${ac_cv_path_GREP+set}" = set; then :
6049  $as_echo_n "(cached) " >&6
6050else
6051  if test -z "$GREP"; then
6052  ac_path_GREP_found=false
6053  # Loop through the user's path and test for each of PROGNAME-LIST
6054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6055for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6056do
6057  IFS=$as_save_IFS
6058  test -z "$as_dir" && as_dir=.
6059    for ac_prog in grep ggrep; do
6060    for ac_exec_ext in '' $ac_executable_extensions; do
6061      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6062      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6063# Check for GNU ac_path_GREP and select it if it is found.
6064  # Check for GNU $ac_path_GREP
6065case `"$ac_path_GREP" --version 2>&1` in
6066*GNU*)
6067  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6068*)
6069  ac_count=0
6070  $as_echo_n 0123456789 >"conftest.in"
6071  while :
6072  do
6073    cat "conftest.in" "conftest.in" >"conftest.tmp"
6074    mv "conftest.tmp" "conftest.in"
6075    cp "conftest.in" "conftest.nl"
6076    $as_echo 'GREP' >> "conftest.nl"
6077    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6078    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6079    as_fn_arith $ac_count + 1 && ac_count=$as_val
6080    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6081      # Best one so far, save it but keep looking for a better one
6082      ac_cv_path_GREP="$ac_path_GREP"
6083      ac_path_GREP_max=$ac_count
6084    fi
6085    # 10*(2^10) chars as input seems more than enough
6086    test $ac_count -gt 10 && break
6087  done
6088  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6089esac
6090
6091      $ac_path_GREP_found && break 3
6092    done
6093  done
6094  done
6095IFS=$as_save_IFS
6096  if test -z "$ac_cv_path_GREP"; then
6097    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6098  fi
6099else
6100  ac_cv_path_GREP=$GREP
6101fi
6102
6103fi
6104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6105$as_echo "$ac_cv_path_GREP" >&6; }
6106 GREP="$ac_cv_path_GREP"
6107
6108
6109
6110    if test "x$GREP" = x; then
6111        if test "x" = x; then
6112          PROG_NAME=grep
6113        else
6114          PROG_NAME=
6115        fi
6116        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6117$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6118        as_fn_error $? "Cannot continue" "$LINENO" 5
6119    fi
6120
6121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6122$as_echo_n "checking for egrep... " >&6; }
6123if test "${ac_cv_path_EGREP+set}" = set; then :
6124  $as_echo_n "(cached) " >&6
6125else
6126  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6127   then ac_cv_path_EGREP="$GREP -E"
6128   else
6129     if test -z "$EGREP"; then
6130  ac_path_EGREP_found=false
6131  # Loop through the user's path and test for each of PROGNAME-LIST
6132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6133for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6134do
6135  IFS=$as_save_IFS
6136  test -z "$as_dir" && as_dir=.
6137    for ac_prog in egrep; do
6138    for ac_exec_ext in '' $ac_executable_extensions; do
6139      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6140      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6141# Check for GNU ac_path_EGREP and select it if it is found.
6142  # Check for GNU $ac_path_EGREP
6143case `"$ac_path_EGREP" --version 2>&1` in
6144*GNU*)
6145  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6146*)
6147  ac_count=0
6148  $as_echo_n 0123456789 >"conftest.in"
6149  while :
6150  do
6151    cat "conftest.in" "conftest.in" >"conftest.tmp"
6152    mv "conftest.tmp" "conftest.in"
6153    cp "conftest.in" "conftest.nl"
6154    $as_echo 'EGREP' >> "conftest.nl"
6155    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6156    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6157    as_fn_arith $ac_count + 1 && ac_count=$as_val
6158    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6159      # Best one so far, save it but keep looking for a better one
6160      ac_cv_path_EGREP="$ac_path_EGREP"
6161      ac_path_EGREP_max=$ac_count
6162    fi
6163    # 10*(2^10) chars as input seems more than enough
6164    test $ac_count -gt 10 && break
6165  done
6166  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6167esac
6168
6169      $ac_path_EGREP_found && break 3
6170    done
6171  done
6172  done
6173IFS=$as_save_IFS
6174  if test -z "$ac_cv_path_EGREP"; then
6175    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6176  fi
6177else
6178  ac_cv_path_EGREP=$EGREP
6179fi
6180
6181   fi
6182fi
6183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6184$as_echo "$ac_cv_path_EGREP" >&6; }
6185 EGREP="$ac_cv_path_EGREP"
6186
6187
6188
6189    if test "x$EGREP" = x; then
6190        if test "x" = x; then
6191          PROG_NAME=egrep
6192        else
6193          PROG_NAME=
6194        fi
6195        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6196$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6197        as_fn_error $? "Cannot continue" "$LINENO" 5
6198    fi
6199
6200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6201$as_echo_n "checking for fgrep... " >&6; }
6202if test "${ac_cv_path_FGREP+set}" = set; then :
6203  $as_echo_n "(cached) " >&6
6204else
6205  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6206   then ac_cv_path_FGREP="$GREP -F"
6207   else
6208     if test -z "$FGREP"; then
6209  ac_path_FGREP_found=false
6210  # Loop through the user's path and test for each of PROGNAME-LIST
6211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6212for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6213do
6214  IFS=$as_save_IFS
6215  test -z "$as_dir" && as_dir=.
6216    for ac_prog in fgrep; do
6217    for ac_exec_ext in '' $ac_executable_extensions; do
6218      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6219      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6220# Check for GNU ac_path_FGREP and select it if it is found.
6221  # Check for GNU $ac_path_FGREP
6222case `"$ac_path_FGREP" --version 2>&1` in
6223*GNU*)
6224  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6225*)
6226  ac_count=0
6227  $as_echo_n 0123456789 >"conftest.in"
6228  while :
6229  do
6230    cat "conftest.in" "conftest.in" >"conftest.tmp"
6231    mv "conftest.tmp" "conftest.in"
6232    cp "conftest.in" "conftest.nl"
6233    $as_echo 'FGREP' >> "conftest.nl"
6234    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6235    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6236    as_fn_arith $ac_count + 1 && ac_count=$as_val
6237    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6238      # Best one so far, save it but keep looking for a better one
6239      ac_cv_path_FGREP="$ac_path_FGREP"
6240      ac_path_FGREP_max=$ac_count
6241    fi
6242    # 10*(2^10) chars as input seems more than enough
6243    test $ac_count -gt 10 && break
6244  done
6245  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6246esac
6247
6248      $ac_path_FGREP_found && break 3
6249    done
6250  done
6251  done
6252IFS=$as_save_IFS
6253  if test -z "$ac_cv_path_FGREP"; then
6254    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6255  fi
6256else
6257  ac_cv_path_FGREP=$FGREP
6258fi
6259
6260   fi
6261fi
6262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6263$as_echo "$ac_cv_path_FGREP" >&6; }
6264 FGREP="$ac_cv_path_FGREP"
6265
6266
6267
6268    if test "x$FGREP" = x; then
6269        if test "x" = x; then
6270          PROG_NAME=fgrep
6271        else
6272          PROG_NAME=
6273        fi
6274        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6275$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6276        as_fn_error $? "Cannot continue" "$LINENO" 5
6277    fi
6278
6279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6280$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6281if test "${ac_cv_path_SED+set}" = set; then :
6282  $as_echo_n "(cached) " >&6
6283else
6284            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6285     for ac_i in 1 2 3 4 5 6 7; do
6286       ac_script="$ac_script$as_nl$ac_script"
6287     done
6288     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6289     { ac_script=; unset ac_script;}
6290     if test -z "$SED"; then
6291  ac_path_SED_found=false
6292  # Loop through the user's path and test for each of PROGNAME-LIST
6293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6294for as_dir in $PATH
6295do
6296  IFS=$as_save_IFS
6297  test -z "$as_dir" && as_dir=.
6298    for ac_prog in sed gsed; do
6299    for ac_exec_ext in '' $ac_executable_extensions; do
6300      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6301      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6302# Check for GNU ac_path_SED and select it if it is found.
6303  # Check for GNU $ac_path_SED
6304case `"$ac_path_SED" --version 2>&1` in
6305*GNU*)
6306  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6307*)
6308  ac_count=0
6309  $as_echo_n 0123456789 >"conftest.in"
6310  while :
6311  do
6312    cat "conftest.in" "conftest.in" >"conftest.tmp"
6313    mv "conftest.tmp" "conftest.in"
6314    cp "conftest.in" "conftest.nl"
6315    $as_echo '' >> "conftest.nl"
6316    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6317    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6318    as_fn_arith $ac_count + 1 && ac_count=$as_val
6319    if test $ac_count -gt ${ac_path_SED_max-0}; then
6320      # Best one so far, save it but keep looking for a better one
6321      ac_cv_path_SED="$ac_path_SED"
6322      ac_path_SED_max=$ac_count
6323    fi
6324    # 10*(2^10) chars as input seems more than enough
6325    test $ac_count -gt 10 && break
6326  done
6327  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6328esac
6329
6330      $ac_path_SED_found && break 3
6331    done
6332  done
6333  done
6334IFS=$as_save_IFS
6335  if test -z "$ac_cv_path_SED"; then
6336    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6337  fi
6338else
6339  ac_cv_path_SED=$SED
6340fi
6341
6342fi
6343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6344$as_echo "$ac_cv_path_SED" >&6; }
6345 SED="$ac_cv_path_SED"
6346  rm -f conftest.sed
6347
6348
6349    if test "x$SED" = x; then
6350        if test "x" = x; then
6351          PROG_NAME=sed
6352        else
6353          PROG_NAME=
6354        fi
6355        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6356$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6357        as_fn_error $? "Cannot continue" "$LINENO" 5
6358    fi
6359
6360
6361for ac_prog in nawk gawk awk
6362do
6363  # Extract the first word of "$ac_prog", so it can be a program name with args.
6364set dummy $ac_prog; ac_word=$2
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6366$as_echo_n "checking for $ac_word... " >&6; }
6367if test "${ac_cv_path_NAWK+set}" = set; then :
6368  $as_echo_n "(cached) " >&6
6369else
6370  case $NAWK in
6371  [\\/]* | ?:[\\/]*)
6372  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6373  ;;
6374  *)
6375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6376for as_dir in $PATH
6377do
6378  IFS=$as_save_IFS
6379  test -z "$as_dir" && as_dir=.
6380    for ac_exec_ext in '' $ac_executable_extensions; do
6381  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6382    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6384    break 2
6385  fi
6386done
6387  done
6388IFS=$as_save_IFS
6389
6390  ;;
6391esac
6392fi
6393NAWK=$ac_cv_path_NAWK
6394if test -n "$NAWK"; then
6395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6396$as_echo "$NAWK" >&6; }
6397else
6398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6399$as_echo "no" >&6; }
6400fi
6401
6402
6403  test -n "$NAWK" && break
6404done
6405
6406
6407    if test "x$NAWK" = x; then
6408        if test "x" = x; then
6409          PROG_NAME=nawk
6410        else
6411          PROG_NAME=
6412        fi
6413        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6414$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6415        as_fn_error $? "Cannot continue" "$LINENO" 5
6416    fi
6417
6418
6419# Always force rm.
6420RM="$RM -f"
6421
6422# These are not required on all platforms
6423# Extract the first word of "cygpath", so it can be a program name with args.
6424set dummy cygpath; ac_word=$2
6425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6426$as_echo_n "checking for $ac_word... " >&6; }
6427if test "${ac_cv_path_CYGPATH+set}" = set; then :
6428  $as_echo_n "(cached) " >&6
6429else
6430  case $CYGPATH in
6431  [\\/]* | ?:[\\/]*)
6432  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6433  ;;
6434  *)
6435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6436for as_dir in $PATH
6437do
6438  IFS=$as_save_IFS
6439  test -z "$as_dir" && as_dir=.
6440    for ac_exec_ext in '' $ac_executable_extensions; do
6441  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6442    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6444    break 2
6445  fi
6446done
6447  done
6448IFS=$as_save_IFS
6449
6450  ;;
6451esac
6452fi
6453CYGPATH=$ac_cv_path_CYGPATH
6454if test -n "$CYGPATH"; then
6455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6456$as_echo "$CYGPATH" >&6; }
6457else
6458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6459$as_echo "no" >&6; }
6460fi
6461
6462
6463# Extract the first word of "readlink", so it can be a program name with args.
6464set dummy readlink; ac_word=$2
6465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6466$as_echo_n "checking for $ac_word... " >&6; }
6467if test "${ac_cv_path_READLINK+set}" = set; then :
6468  $as_echo_n "(cached) " >&6
6469else
6470  case $READLINK in
6471  [\\/]* | ?:[\\/]*)
6472  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6473  ;;
6474  *)
6475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6476for as_dir in $PATH
6477do
6478  IFS=$as_save_IFS
6479  test -z "$as_dir" && as_dir=.
6480    for ac_exec_ext in '' $ac_executable_extensions; do
6481  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6482    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6484    break 2
6485  fi
6486done
6487  done
6488IFS=$as_save_IFS
6489
6490  ;;
6491esac
6492fi
6493READLINK=$ac_cv_path_READLINK
6494if test -n "$READLINK"; then
6495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6496$as_echo "$READLINK" >&6; }
6497else
6498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499$as_echo "no" >&6; }
6500fi
6501
6502
6503# Extract the first word of "df", so it can be a program name with args.
6504set dummy df; ac_word=$2
6505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6506$as_echo_n "checking for $ac_word... " >&6; }
6507if test "${ac_cv_path_DF+set}" = set; then :
6508  $as_echo_n "(cached) " >&6
6509else
6510  case $DF in
6511  [\\/]* | ?:[\\/]*)
6512  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6513  ;;
6514  *)
6515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6516for as_dir in $PATH
6517do
6518  IFS=$as_save_IFS
6519  test -z "$as_dir" && as_dir=.
6520    for ac_exec_ext in '' $ac_executable_extensions; do
6521  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6522    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6524    break 2
6525  fi
6526done
6527  done
6528IFS=$as_save_IFS
6529
6530  ;;
6531esac
6532fi
6533DF=$ac_cv_path_DF
6534if test -n "$DF"; then
6535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6536$as_echo "$DF" >&6; }
6537else
6538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6539$as_echo "no" >&6; }
6540fi
6541
6542
6543# Extract the first word of "SetFile", so it can be a program name with args.
6544set dummy SetFile; ac_word=$2
6545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6546$as_echo_n "checking for $ac_word... " >&6; }
6547if test "${ac_cv_path_SETFILE+set}" = set; then :
6548  $as_echo_n "(cached) " >&6
6549else
6550  case $SETFILE in
6551  [\\/]* | ?:[\\/]*)
6552  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6553  ;;
6554  *)
6555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6556for as_dir in $PATH
6557do
6558  IFS=$as_save_IFS
6559  test -z "$as_dir" && as_dir=.
6560    for ac_exec_ext in '' $ac_executable_extensions; do
6561  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6562    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6564    break 2
6565  fi
6566done
6567  done
6568IFS=$as_save_IFS
6569
6570  ;;
6571esac
6572fi
6573SETFILE=$ac_cv_path_SETFILE
6574if test -n "$SETFILE"; then
6575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6576$as_echo "$SETFILE" >&6; }
6577else
6578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6579$as_echo "no" >&6; }
6580fi
6581
6582
6583
6584
6585# Now we can determine OpenJDK build and target platforms. This is required to
6586# have early on.
6587# Make sure we can run config.sub.
6588$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6589  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6590
6591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6592$as_echo_n "checking build system type... " >&6; }
6593if test "${ac_cv_build+set}" = set; then :
6594  $as_echo_n "(cached) " >&6
6595else
6596  ac_build_alias=$build_alias
6597test "x$ac_build_alias" = x &&
6598  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6599test "x$ac_build_alias" = x &&
6600  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6601ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6602  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6603
6604fi
6605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6606$as_echo "$ac_cv_build" >&6; }
6607case $ac_cv_build in
6608*-*-*) ;;
6609*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6610esac
6611build=$ac_cv_build
6612ac_save_IFS=$IFS; IFS='-'
6613set x $ac_cv_build
6614shift
6615build_cpu=$1
6616build_vendor=$2
6617shift; shift
6618# Remember, the first character of IFS is used to create $*,
6619# except with old shells:
6620build_os=$*
6621IFS=$ac_save_IFS
6622case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6623
6624
6625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6626$as_echo_n "checking host system type... " >&6; }
6627if test "${ac_cv_host+set}" = set; then :
6628  $as_echo_n "(cached) " >&6
6629else
6630  if test "x$host_alias" = x; then
6631  ac_cv_host=$ac_cv_build
6632else
6633  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6634    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6635fi
6636
6637fi
6638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6639$as_echo "$ac_cv_host" >&6; }
6640case $ac_cv_host in
6641*-*-*) ;;
6642*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6643esac
6644host=$ac_cv_host
6645ac_save_IFS=$IFS; IFS='-'
6646set x $ac_cv_host
6647shift
6648host_cpu=$1
6649host_vendor=$2
6650shift; shift
6651# Remember, the first character of IFS is used to create $*,
6652# except with old shells:
6653host_os=$*
6654IFS=$ac_save_IFS
6655case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6656
6657
6658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6659$as_echo_n "checking target system type... " >&6; }
6660if test "${ac_cv_target+set}" = set; then :
6661  $as_echo_n "(cached) " >&6
6662else
6663  if test "x$target_alias" = x; then
6664  ac_cv_target=$ac_cv_host
6665else
6666  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6667    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6668fi
6669
6670fi
6671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6672$as_echo "$ac_cv_target" >&6; }
6673case $ac_cv_target in
6674*-*-*) ;;
6675*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6676esac
6677target=$ac_cv_target
6678ac_save_IFS=$IFS; IFS='-'
6679set x $ac_cv_target
6680shift
6681target_cpu=$1
6682target_vendor=$2
6683shift; shift
6684# Remember, the first character of IFS is used to create $*,
6685# except with old shells:
6686target_os=$*
6687IFS=$ac_save_IFS
6688case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6689
6690
6691# The aliases save the names the user supplied, while $host etc.
6692# will get canonicalized.
6693test -n "$target_alias" &&
6694  test "$program_prefix$program_suffix$program_transform_name" = \
6695    NONENONEs,x,x, &&
6696  program_prefix=${target_alias}-
6697
6698# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6699# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6700# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6701# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6702# to use the configure naming style.
6703
6704
6705
6706
6707
6708    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6709    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6710    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6711    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6712    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6713    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6714
6715
6716
6717    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6718
6719  case "$build_os" in
6720    *linux*)
6721      VAR_OS=linux
6722      VAR_OS_API=posix
6723      VAR_OS_ENV=linux
6724      ;;
6725    *solaris*)
6726      VAR_OS=solaris
6727      VAR_OS_API=posix
6728      VAR_OS_ENV=solaris
6729      ;;
6730    *darwin*)
6731      VAR_OS=macosx
6732      VAR_OS_API=posix
6733      VAR_OS_ENV=macosx
6734      ;;
6735    *bsd*)
6736      VAR_OS=bsd
6737      VAR_OS_API=posix
6738      VAR_OS_ENV=bsd
6739      ;;
6740    *cygwin*)
6741      VAR_OS=windows
6742      VAR_OS_API=winapi
6743      VAR_OS_ENV=windows.cygwin
6744      ;;
6745    *mingw*)
6746      VAR_OS=windows
6747      VAR_OS_API=winapi
6748      VAR_OS_ENV=windows.msys
6749      ;;
6750    *)
6751      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6752      ;;
6753  esac
6754
6755
6756  # First argument is the cpu name from the trip/quad
6757  case "$build_cpu" in
6758    x86_64)
6759      VAR_CPU=x86_64
6760      VAR_CPU_ARCH=x86
6761      VAR_CPU_BITS=64
6762      VAR_CPU_ENDIAN=little
6763      ;;
6764    i?86)
6765      VAR_CPU=x86
6766      VAR_CPU_ARCH=x86
6767      VAR_CPU_BITS=32
6768      VAR_CPU_ENDIAN=little
6769      ;;
6770    arm*)
6771      VAR_CPU=arm
6772      VAR_CPU_ARCH=arm
6773      VAR_CPU_BITS=32
6774      VAR_CPU_ENDIAN=little
6775      ;;
6776    powerpc)
6777      VAR_CPU=ppc
6778      VAR_CPU_ARCH=ppc
6779      VAR_CPU_BITS=32
6780      VAR_CPU_ENDIAN=big
6781       ;;
6782    powerpc64)
6783      VAR_CPU=ppc64
6784      VAR_CPU_ARCH=ppc
6785      VAR_CPU_BITS=64
6786      VAR_CPU_ENDIAN=big
6787       ;;
6788    sparc)
6789      VAR_CPU=sparc
6790      VAR_CPU_ARCH=sparc
6791      VAR_CPU_BITS=32
6792      VAR_CPU_ENDIAN=big
6793       ;;
6794    sparcv9)
6795      VAR_CPU=sparcv9
6796      VAR_CPU_ARCH=sparc
6797      VAR_CPU_BITS=64
6798      VAR_CPU_ENDIAN=big
6799       ;;
6800    *)
6801      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6802      ;;
6803  esac
6804
6805    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6806    OPENJDK_BUILD_OS="$VAR_OS"
6807    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6808    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6809    OPENJDK_BUILD_CPU="$VAR_CPU"
6810    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6811    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6812    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6813
6814
6815
6816
6817
6818
6819
6820    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6821$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6823$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6824
6825    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6826
6827  case "$host_os" in
6828    *linux*)
6829      VAR_OS=linux
6830      VAR_OS_API=posix
6831      VAR_OS_ENV=linux
6832      ;;
6833    *solaris*)
6834      VAR_OS=solaris
6835      VAR_OS_API=posix
6836      VAR_OS_ENV=solaris
6837      ;;
6838    *darwin*)
6839      VAR_OS=macosx
6840      VAR_OS_API=posix
6841      VAR_OS_ENV=macosx
6842      ;;
6843    *bsd*)
6844      VAR_OS=bsd
6845      VAR_OS_API=posix
6846      VAR_OS_ENV=bsd
6847      ;;
6848    *cygwin*)
6849      VAR_OS=windows
6850      VAR_OS_API=winapi
6851      VAR_OS_ENV=windows.cygwin
6852      ;;
6853    *mingw*)
6854      VAR_OS=windows
6855      VAR_OS_API=winapi
6856      VAR_OS_ENV=windows.msys
6857      ;;
6858    *)
6859      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6860      ;;
6861  esac
6862
6863
6864  # First argument is the cpu name from the trip/quad
6865  case "$host_cpu" in
6866    x86_64)
6867      VAR_CPU=x86_64
6868      VAR_CPU_ARCH=x86
6869      VAR_CPU_BITS=64
6870      VAR_CPU_ENDIAN=little
6871      ;;
6872    i?86)
6873      VAR_CPU=x86
6874      VAR_CPU_ARCH=x86
6875      VAR_CPU_BITS=32
6876      VAR_CPU_ENDIAN=little
6877      ;;
6878    arm*)
6879      VAR_CPU=arm
6880      VAR_CPU_ARCH=arm
6881      VAR_CPU_BITS=32
6882      VAR_CPU_ENDIAN=little
6883      ;;
6884    powerpc)
6885      VAR_CPU=ppc
6886      VAR_CPU_ARCH=ppc
6887      VAR_CPU_BITS=32
6888      VAR_CPU_ENDIAN=big
6889       ;;
6890    powerpc64)
6891      VAR_CPU=ppc64
6892      VAR_CPU_ARCH=ppc
6893      VAR_CPU_BITS=64
6894      VAR_CPU_ENDIAN=big
6895       ;;
6896    sparc)
6897      VAR_CPU=sparc
6898      VAR_CPU_ARCH=sparc
6899      VAR_CPU_BITS=32
6900      VAR_CPU_ENDIAN=big
6901       ;;
6902    sparcv9)
6903      VAR_CPU=sparcv9
6904      VAR_CPU_ARCH=sparc
6905      VAR_CPU_BITS=64
6906      VAR_CPU_ENDIAN=big
6907       ;;
6908    *)
6909      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6910      ;;
6911  esac
6912
6913    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6914    OPENJDK_TARGET_OS="$VAR_OS"
6915    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6916    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6917    OPENJDK_TARGET_CPU="$VAR_CPU"
6918    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6919    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6920    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6921
6922
6923
6924
6925
6926
6927
6928    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6929$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6931$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6932
6933
6934
6935# Check whether --with-target-bits was given.
6936if test "${with_target_bits+set}" = set; then :
6937  withval=$with_target_bits;
6938fi
6939
6940
6941  # We have three types of compiles:
6942  # native  == normal compilation, target system == build system
6943  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6944  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6945  #
6946  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6947    # We're doing a proper cross-compilation
6948    COMPILE_TYPE="cross"
6949  else
6950    COMPILE_TYPE="native"
6951  fi
6952
6953  if test "x$with_target_bits" != x; then
6954    if test "x$COMPILE_TYPE" = "xcross"; then
6955      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6956    fi
6957
6958    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6959      # A reduced build is requested
6960      COMPILE_TYPE="reduced"
6961      OPENJDK_TARGET_CPU_BITS=32
6962      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6963        OPENJDK_TARGET_CPU=x86
6964      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6965        OPENJDK_TARGET_CPU=sparc
6966      else
6967        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6968      fi
6969    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6970      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
6971    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6972      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6973$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6974    else
6975      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6976    fi
6977  fi
6978
6979
6980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6981$as_echo_n "checking compilation type... " >&6; }
6982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6983$as_echo "$COMPILE_TYPE" >&6; }
6984
6985
6986    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6987       REQUIRED_OS_NAME=SunOS
6988       REQUIRED_OS_VERSION=5.10
6989    fi
6990    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6991       REQUIRED_OS_NAME=Linux
6992       REQUIRED_OS_VERSION=2.6
6993    fi
6994    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6995        REQUIRED_OS_NAME=Windows
6996        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6997            REQUIRED_OS_VERSION=5.2
6998        else
6999            REQUIRED_OS_VERSION=5.1
7000        fi
7001    fi
7002    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7003        REQUIRED_OS_NAME=Darwin
7004        REQUIRED_OS_VERSION=11.2
7005    fi
7006
7007
7008
7009
7010
7011    # Also store the legacy naming of the cpu.
7012    # Ie i586 and amd64 instead of x86 and x86_64
7013    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7014    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7015      OPENJDK_TARGET_CPU_LEGACY="i586"
7016    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7017      # On all platforms except MacOSX replace x86_64 with amd64.
7018      OPENJDK_TARGET_CPU_LEGACY="amd64"
7019    fi
7020
7021
7022    # And the second legacy naming of the cpu.
7023    # Ie i386 and amd64 instead of x86 and x86_64.
7024    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7025    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7026      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7027    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7028      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7029    fi
7030
7031
7032    # This is the name of the cpu (but using i386 and amd64 instead of
7033    # x86 and x86_64, respectively), preceeded by a /, to be used when
7034    # locating libraries. On macosx, it's empty, though.
7035    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7036    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7037        OPENJDK_TARGET_CPU_LIBDIR=""
7038    fi
7039
7040
7041    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7042    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7043    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7044    OPENJDK_TARGET_CPU_ISADIR=""
7045    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7046      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7047          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7048      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7049          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7050      fi
7051    fi
7052
7053
7054    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7055    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7056    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7057      # On linux only, we replace x86 with i386.
7058      OPENJDK_TARGET_CPU_OSARCH="i386"
7059    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7060      # On all platforms except macosx, we replace x86_64 with amd64.
7061      OPENJDK_TARGET_CPU_OSARCH="amd64"
7062    fi
7063
7064
7065    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7066    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7067      OPENJDK_TARGET_CPU_JLI="i386"
7068    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7069      # On all platforms except macosx, we replace x86_64 with amd64.
7070      OPENJDK_TARGET_CPU_JLI="amd64"
7071    fi
7072    # Now setup the -D flags for building libjli.
7073    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7074    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7075      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7076        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7077      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7078        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7079      fi
7080    fi
7081
7082
7083    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7084    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7085        OPENJDK_TARGET_OS_API_DIR="solaris"
7086    fi
7087    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7088        OPENJDK_TARGET_OS_API_DIR="windows"
7089    fi
7090
7091
7092    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7093        A_LP64="LP64:="
7094        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7095        # unpack200.exe
7096        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7097            ADD_LP64="-D_LP64=1"
7098        fi
7099    fi
7100    LP64=$A_LP64
7101
7102
7103    if test "x$COMPILE_TYPE" = "xcross"; then
7104      # FIXME: ... or should this include reduced builds..?
7105      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7106    else
7107      DEFINE_CROSS_COMPILE_ARCH=""
7108    fi
7109
7110
7111    # ZERO_ARCHDEF is used to enable architecture-specific code
7112    case "${OPENJDK_TARGET_CPU}" in
7113      ppc*)    ZERO_ARCHDEF=PPC   ;;
7114      s390*)   ZERO_ARCHDEF=S390  ;;
7115      sparc*)  ZERO_ARCHDEF=SPARC ;;
7116      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7117      x86)     ZERO_ARCHDEF=IA32  ;;
7118      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7119    esac
7120
7121
7122
7123
7124
7125# Continue setting up basic stuff. Most remaining code require fundamental tools.
7126
7127# Locate the directory of this script.
7128SCRIPT="$0"
7129
7130    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7131        # Follow a chain of symbolic links. Use readlink
7132        # where it exists, else fall back to horribly
7133        # complicated shell code.
7134        if test "x$READLINK_TESTED" != yes; then
7135            # On MacOSX there is a readlink tool with a different
7136            # purpose than the GNU readlink tool. Check the found readlink.
7137            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7138            if test "x$ISGNU" = x; then
7139                 # A readlink that we do not know how to use.
7140                 # Are there other non-GNU readlinks out there?
7141                 READLINK_TESTED=yes
7142                 READLINK=
7143            fi
7144        fi
7145
7146        if test "x$READLINK" != x; then
7147            SCRIPT=`$READLINK -f $SCRIPT`
7148        else
7149            # Save the current directory for restoring afterwards
7150            STARTDIR=$PWD
7151            COUNTER=0
7152            sym_link_dir=`$DIRNAME $SCRIPT`
7153            sym_link_file=`$BASENAME $SCRIPT`
7154            # Use the system pwd and not the shell builtin to resolve directory symlinks
7155            cd $sym_link_dir
7156            cd `$THEPWDCMD`
7157            sym_link_dir=`$THEPWDCMD`
7158            # Resolve file symlinks
7159            while test $COUNTER -lt 20; do
7160                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7161                if test "x$ISLINK" == x; then
7162                    # This is not a symbolic link! We are done!
7163                    break
7164                fi
7165                # Again resolve directory symlinks since the target of the just found
7166                # link could be in a different directory
7167                cd `$DIRNAME $ISLINK`
7168                sym_link_dir=`$THEPWDCMD`
7169                sym_link_file=`$BASENAME $ISLINK`
7170                let COUNTER=COUNTER+1
7171            done
7172            cd $STARTDIR
7173            SCRIPT=$sym_link_dir/$sym_link_file
7174        fi
7175    fi
7176
7177AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7178
7179# Where is the source? It is located two levels above the configure script.
7180CURDIR="$PWD"
7181cd "$AUTOCONF_DIR/../.."
7182SRC_ROOT="`$THEPWDCMD`"
7183
7184if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7185  PATH_SEP=";"
7186
7187  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7188  if test $SRC_ROOT_LENGTH -gt 100; then
7189      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7190  fi
7191
7192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7194$as_echo_n "checking cygwin release... " >&6; }
7195    CYGWIN_VERSION=`$UNAME -r`
7196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7197$as_echo "$CYGWIN_VERSION" >&6; }
7198    WINDOWS_ENV_VENDOR='cygwin'
7199    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7200
7201    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7202    if test "x$CYGWIN_VERSION_OK" = x; then
7203      { $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
7204$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;}
7205      as_fn_error $? "Cannot continue" "$LINENO" 5
7206    fi
7207    if test "x$CYGPATH" = x; then
7208        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7209    fi
7210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7211$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7212    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7213    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7214    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7215    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7217$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7218    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7219    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7220    if test "x$test_cygdrive_prefix" = x; then
7221        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7222    fi
7223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7224    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7225$as_echo_n "checking msys release... " >&6; }
7226    MSYS_VERSION=`$UNAME -r`
7227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7228$as_echo "$MSYS_VERSION" >&6; }
7229
7230    WINDOWS_ENV_VENDOR='msys'
7231    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7232
7233    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7234$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7235    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7236    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7237
7238  windows_path="$MSYS_ROOT_PATH"
7239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7240    unix_path=`$CYGPATH -u "$windows_path"`
7241    MSYS_ROOT_PATH="$unix_path"
7242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7244    MSYS_ROOT_PATH="$unix_path"
7245  fi
7246
7247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7248$as_echo "$MSYS_ROOT_PATH" >&6; }
7249    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7250  else
7251    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7252  fi
7253
7254  # Test if windows or unix (cygwin/msys) find is first in path.
7255  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7256$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7257  FIND_BINARY_OUTPUT=`find --version 2>&1`
7258  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7259    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7260$as_echo "unix style" >&6; }
7261  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7263$as_echo "Windows" >&6; }
7264    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7265$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7266    { $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
7267$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7268    as_fn_error $? "Cannot continue" "$LINENO" 5
7269  else
7270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7271$as_echo "unknown" >&6; }
7272    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7273$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7274  fi
7275
7276else
7277  PATH_SEP=":"
7278fi
7279
7280
7281
7282cd "$CURDIR"
7283
7284
7285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7286
7287  # Input might be given as Windows format, start by converting to
7288  # unix format.
7289  path="$SRC_ROOT"
7290  new_path=`$CYGPATH -u "$path"`
7291
7292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7295  # "foo.exe" is OK but "foo" is an error.
7296  #
7297  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7298  # It is also a way to make sure we got the proper file name for the real test later on.
7299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7300  if test "x$test_shortpath" = x; then
7301    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7302$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7303    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7304  fi
7305
7306  # Call helper function which possibly converts this using DOS-style short mode.
7307  # If so, the updated path is stored in $new_path.
7308
7309  input_path="$new_path"
7310  # Check if we need to convert this using DOS-style short mode. If the path
7311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7312  # take no chances and rewrite it.
7313  # Note: m4 eats our [], so we need to use [ and ] instead.
7314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7315  if test "x$has_forbidden_chars" != x; then
7316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7320      # Going to short mode and back again did indeed matter. Since short mode is
7321      # case insensitive, let's make it lowercase to improve readability.
7322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7323      # Now convert it back to Unix-stile (cygpath)
7324      input_path=`$CYGPATH -u "$shortmode_path"`
7325      new_path="$input_path"
7326    fi
7327  fi
7328
7329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7330  if test "x$test_cygdrive_prefix" = x; then
7331    # As a simple fix, exclude /usr/bin since it's not a real path.
7332    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7334      # a path prefixed by /cygdrive for fixpath to work.
7335      new_path="$CYGWIN_ROOT_PATH$input_path"
7336    fi
7337  fi
7338
7339
7340  if test "x$path" != "x$new_path"; then
7341    SRC_ROOT="$new_path"
7342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7343$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7344  fi
7345
7346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7347
7348  path="$SRC_ROOT"
7349  has_colon=`$ECHO $path | $GREP ^.:`
7350  new_path="$path"
7351  if test "x$has_colon" = x; then
7352    # Not in mixed or Windows style, start by that.
7353    new_path=`cmd //c echo $path`
7354  fi
7355
7356
7357  input_path="$new_path"
7358  # Check if we need to convert this using DOS-style short mode. If the path
7359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7360  # take no chances and rewrite it.
7361  # Note: m4 eats our [], so we need to use [ and ] instead.
7362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7363  if test "x$has_forbidden_chars" != x; then
7364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7365    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7366  fi
7367
7368
7369  windows_path="$new_path"
7370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7371    unix_path=`$CYGPATH -u "$windows_path"`
7372    new_path="$unix_path"
7373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7375    new_path="$unix_path"
7376  fi
7377
7378  if test "x$path" != "x$new_path"; then
7379    SRC_ROOT="$new_path"
7380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7381$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7382  fi
7383
7384  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7385  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7386
7387  else
7388    # We're on a posix platform. Hooray! :)
7389    path="$SRC_ROOT"
7390
7391    if test ! -f "$path" && test ! -d "$path"; then
7392      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7393    fi
7394
7395    has_space=`$ECHO "$path" | $GREP " "`
7396    if test "x$has_space" != x; then
7397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7398$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7399      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7400    fi
7401  fi
7402
7403
7404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7405
7406  # Input might be given as Windows format, start by converting to
7407  # unix format.
7408  path="$CURDIR"
7409  new_path=`$CYGPATH -u "$path"`
7410
7411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7414  # "foo.exe" is OK but "foo" is an error.
7415  #
7416  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7417  # It is also a way to make sure we got the proper file name for the real test later on.
7418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7419  if test "x$test_shortpath" = x; then
7420    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7421$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7422    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7423  fi
7424
7425  # Call helper function which possibly converts this using DOS-style short mode.
7426  # If so, the updated path is stored in $new_path.
7427
7428  input_path="$new_path"
7429  # Check if we need to convert this using DOS-style short mode. If the path
7430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7431  # take no chances and rewrite it.
7432  # Note: m4 eats our [], so we need to use [ and ] instead.
7433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7434  if test "x$has_forbidden_chars" != x; then
7435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7439      # Going to short mode and back again did indeed matter. Since short mode is
7440      # case insensitive, let's make it lowercase to improve readability.
7441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7442      # Now convert it back to Unix-stile (cygpath)
7443      input_path=`$CYGPATH -u "$shortmode_path"`
7444      new_path="$input_path"
7445    fi
7446  fi
7447
7448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7449  if test "x$test_cygdrive_prefix" = x; then
7450    # As a simple fix, exclude /usr/bin since it's not a real path.
7451    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7453      # a path prefixed by /cygdrive for fixpath to work.
7454      new_path="$CYGWIN_ROOT_PATH$input_path"
7455    fi
7456  fi
7457
7458
7459  if test "x$path" != "x$new_path"; then
7460    CURDIR="$new_path"
7461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7462$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7463  fi
7464
7465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7466
7467  path="$CURDIR"
7468  has_colon=`$ECHO $path | $GREP ^.:`
7469  new_path="$path"
7470  if test "x$has_colon" = x; then
7471    # Not in mixed or Windows style, start by that.
7472    new_path=`cmd //c echo $path`
7473  fi
7474
7475
7476  input_path="$new_path"
7477  # Check if we need to convert this using DOS-style short mode. If the path
7478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7479  # take no chances and rewrite it.
7480  # Note: m4 eats our [], so we need to use [ and ] instead.
7481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7482  if test "x$has_forbidden_chars" != x; then
7483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7485  fi
7486
7487
7488  windows_path="$new_path"
7489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7490    unix_path=`$CYGPATH -u "$windows_path"`
7491    new_path="$unix_path"
7492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7494    new_path="$unix_path"
7495  fi
7496
7497  if test "x$path" != "x$new_path"; then
7498    CURDIR="$new_path"
7499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7500$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7501  fi
7502
7503  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7504  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7505
7506  else
7507    # We're on a posix platform. Hooray! :)
7508    path="$CURDIR"
7509
7510    if test ! -f "$path" && test ! -d "$path"; then
7511      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7512    fi
7513
7514    has_space=`$ECHO "$path" | $GREP " "`
7515    if test "x$has_space" != x; then
7516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7517$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7518      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7519    fi
7520  fi
7521
7522
7523if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7524    # Add extra search paths on solaris for utilities like ar and as etc...
7525    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7526fi
7527
7528# You can force the sys-root if the sys-root encoded into the cross compiler tools
7529# is not correct.
7530
7531# Check whether --with-sys-root was given.
7532if test "${with_sys_root+set}" = set; then :
7533  withval=$with_sys_root;
7534fi
7535
7536
7537if test "x$with_sys_root" != x; then
7538  SYS_ROOT=$with_sys_root
7539else
7540  SYS_ROOT=/
7541fi
7542
7543
7544
7545# Check whether --with-tools-dir was given.
7546if test "${with_tools_dir+set}" = set; then :
7547  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7548fi
7549
7550
7551
7552# Check whether --with-devkit was given.
7553if test "${with_devkit+set}" = set; then :
7554  withval=$with_devkit;
7555    if test "x$with_sys_root" != x; then
7556      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7557    fi
7558    if test "x$with_tools_dir" != x; then
7559      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7560    fi
7561    TOOLS_DIR=$with_devkit/bin
7562    SYS_ROOT=$with_devkit/$host_alias/libc
7563
7564fi
7565
7566
7567
7568
7569# Setup default logging of stdout and stderr to build.log in the output root.
7570BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7571BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7572BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7573
7574
7575
7576
7577
7578# Check if it's a pure open build or if custom sources are to be used.
7579
7580  # Check whether --enable-openjdk-only was given.
7581if test "${enable_openjdk_only+set}" = set; then :
7582  enableval=$enable_openjdk_only;
7583else
7584  enable_openjdk_only="no"
7585fi
7586
7587
7588  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7589$as_echo_n "checking for presence of closed sources... " >&6; }
7590  if test -d "$SRC_ROOT/jdk/src/closed"; then
7591    CLOSED_SOURCE_PRESENT=yes
7592  else
7593    CLOSED_SOURCE_PRESENT=no
7594  fi
7595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7596$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7597
7598  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7599$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7600  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7602$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7603
7604  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7605    OPENJDK=true
7606    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7607      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7608$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7609    fi
7610  else
7611    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7612      OPENJDK=true
7613    else
7614      OPENJDK=false
7615    fi
7616  fi
7617
7618  if test "x$OPENJDK" = "xtrue"; then
7619    SET_OPENJDK="OPENJDK=true"
7620  fi
7621
7622
7623
7624
7625# These are needed to be able to create a configuration name (and thus the output directory)
7626
7627###############################################################################
7628#
7629# Check which variant of the JDK that we want to build.
7630# Currently we have:
7631#    normal:   standard edition
7632# but the custom make system may add other variants
7633#
7634# Effectively the JDK variant gives a name to a specific set of
7635# modules to compile into the JDK. In the future, these modules
7636# might even be Jigsaw modules.
7637#
7638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7639$as_echo_n "checking which variant of the JDK to build... " >&6; }
7640
7641# Check whether --with-jdk-variant was given.
7642if test "${with_jdk_variant+set}" = set; then :
7643  withval=$with_jdk_variant;
7644fi
7645
7646
7647if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7648    JDK_VARIANT="normal"
7649else
7650    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7651fi
7652
7653
7654
7655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7656$as_echo "$JDK_VARIANT" >&6; }
7657
7658
7659
7660###############################################################################
7661#
7662# Check which variants of the JVM that we want to build.
7663# Currently we have:
7664#    server: normal interpreter and a tiered C1/C2 compiler
7665#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7666#    minimal1: reduced form of client with optional VM services and features stripped out
7667#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7668#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7669#    zero: no machine code interpreter, no compiler
7670#    zeroshark: zero interpreter and shark/llvm compiler backend
7671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7672$as_echo_n "checking which variants of the JVM to build... " >&6; }
7673
7674# Check whether --with-jvm-variants was given.
7675if test "${with_jvm_variants+set}" = set; then :
7676  withval=$with_jvm_variants;
7677fi
7678
7679
7680if test "x$with_jvm_variants" = x; then
7681     with_jvm_variants="server"
7682fi
7683
7684JVM_VARIANTS=",$with_jvm_variants,"
7685TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7686
7687if test "x$TEST_VARIANTS" != "x,"; then
7688   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7689fi
7690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7691$as_echo "$with_jvm_variants" >&6; }
7692
7693JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7694JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7695JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7696JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7697JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7698JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7699
7700if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7701    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7702        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7703    fi
7704fi
7705if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7706    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7707        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7708    fi
7709fi
7710if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7711    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7712        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7713    fi
7714fi
7715
7716# Replace the commas with AND for use in the build directory name.
7717ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7718COUNT_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/'`
7719if test "x$COUNT_VARIANTS" != "x,1"; then
7720    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7721else
7722    BUILDING_MULTIPLE_JVM_VARIANTS=no
7723fi
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733INCLUDE_SA=true
7734if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7735    INCLUDE_SA=false
7736fi
7737if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7738    INCLUDE_SA=false
7739fi
7740
7741
7742if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7743   MACOSX_UNIVERSAL="true"
7744fi
7745
7746
7747
7748
7749
7750###############################################################################
7751#
7752# Set the debug level
7753#    release: no debug information, all optimizations, no asserts.
7754#    fastdebug: debug information (-g), all optimizations, all asserts
7755#    slowdebug: debug information (-g), no optimizations, all asserts
7756#
7757DEBUG_LEVEL="release"
7758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7759$as_echo_n "checking which debug level to use... " >&6; }
7760# Check whether --enable-debug was given.
7761if test "${enable_debug+set}" = set; then :
7762  enableval=$enable_debug;
7763        ENABLE_DEBUG="${enableval}"
7764        DEBUG_LEVEL="fastdebug"
7765
7766else
7767  ENABLE_DEBUG="no"
7768fi
7769
7770
7771
7772# Check whether --with-debug-level was given.
7773if test "${with_debug_level+set}" = set; then :
7774  withval=$with_debug_level;
7775        DEBUG_LEVEL="${withval}"
7776        if test "x$ENABLE_DEBUG" = xyes; then
7777			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7778        fi
7779
7780fi
7781
7782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7783$as_echo "$DEBUG_LEVEL" >&6; }
7784
7785if test "x$DEBUG_LEVEL" != xrelease && \
7786   test "x$DEBUG_LEVEL" != xfastdebug && \
7787   test "x$DEBUG_LEVEL" != xslowdebug; then
7788   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7789fi
7790
7791
7792###############################################################################
7793#
7794# Setup legacy vars/targets and new vars to deal with different debug levels.
7795#
7796
7797case $DEBUG_LEVEL in
7798      release )
7799          VARIANT="OPT"
7800          FASTDEBUG="false"
7801          DEBUG_CLASSFILES="false"
7802          BUILD_VARIANT_RELEASE=""
7803          HOTSPOT_DEBUG_LEVEL="product"
7804          HOTSPOT_EXPORT="product"
7805           ;;
7806      fastdebug )
7807          VARIANT="DBG"
7808          FASTDEBUG="true"
7809          DEBUG_CLASSFILES="true"
7810          BUILD_VARIANT_RELEASE="-fastdebug"
7811          HOTSPOT_DEBUG_LEVEL="fastdebug"
7812          HOTSPOT_EXPORT="fastdebug"
7813           ;;
7814      slowdebug )
7815          VARIANT="DBG"
7816          FASTDEBUG="false"
7817          DEBUG_CLASSFILES="true"
7818          BUILD_VARIANT_RELEASE="-debug"
7819          HOTSPOT_DEBUG_LEVEL="jvmg"
7820          HOTSPOT_EXPORT="debug"
7821           ;;
7822esac
7823
7824#####
7825# Generate the legacy makefile targets for hotspot.
7826# The hotspot api for selecting the build artifacts, really, needs to be improved.
7827# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7828# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7829# But until then ...
7830HOTSPOT_TARGET=""
7831
7832if test "x$JVM_VARIANT_SERVER" = xtrue; then
7833    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7834fi
7835
7836if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7837    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7838fi
7839
7840if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7841    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7842fi
7843
7844if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7845    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7846fi
7847
7848if test "x$JVM_VARIANT_ZERO" = xtrue; then
7849    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7850fi
7851
7852if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7853    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7854fi
7855
7856HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7857
7858# On Macosx universal binaries are produced, but they only contain
7859# 64 bit intel. This invalidates control of which jvms are built
7860# from configure, but only server is valid anyway. Fix this
7861# when hotspot makefiles are rewritten.
7862if test "x$MACOSX_UNIVERSAL" = xtrue; then
7863    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7864fi
7865
7866#####
7867
7868
7869
7870
7871
7872
7873
7874
7875# With basic setup done, call the custom early hook.
7876
7877
7878# To properly create a configuration name, we need to have the OpenJDK target
7879# and options (variants and debug level) parsed.
7880
7881
7882
7883# Check whether --with-conf-name was given.
7884if test "${with_conf_name+set}" = set; then :
7885  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7886fi
7887
7888
7889# Test from where we are running configure, in or outside of src root.
7890# To enable comparison of directories, CURDIR needs to be symlink free
7891# just like SRC_ROOT already is
7892NOSYM_CURDIR="$CURDIR"
7893
7894    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7895        # Follow a chain of symbolic links. Use readlink
7896        # where it exists, else fall back to horribly
7897        # complicated shell code.
7898        if test "x$READLINK_TESTED" != yes; then
7899            # On MacOSX there is a readlink tool with a different
7900            # purpose than the GNU readlink tool. Check the found readlink.
7901            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7902            if test "x$ISGNU" = x; then
7903                 # A readlink that we do not know how to use.
7904                 # Are there other non-GNU readlinks out there?
7905                 READLINK_TESTED=yes
7906                 READLINK=
7907            fi
7908        fi
7909
7910        if test "x$READLINK" != x; then
7911            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7912        else
7913            # Save the current directory for restoring afterwards
7914            STARTDIR=$PWD
7915            COUNTER=0
7916            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7917            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7918            # Use the system pwd and not the shell builtin to resolve directory symlinks
7919            cd $sym_link_dir
7920            cd `$THEPWDCMD`
7921            sym_link_dir=`$THEPWDCMD`
7922            # Resolve file symlinks
7923            while test $COUNTER -lt 20; do
7924                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7925                if test "x$ISLINK" == x; then
7926                    # This is not a symbolic link! We are done!
7927                    break
7928                fi
7929                # Again resolve directory symlinks since the target of the just found
7930                # link could be in a different directory
7931                cd `$DIRNAME $ISLINK`
7932                sym_link_dir=`$THEPWDCMD`
7933                sym_link_file=`$BASENAME $ISLINK`
7934                let COUNTER=COUNTER+1
7935            done
7936            cd $STARTDIR
7937            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7938        fi
7939    fi
7940
7941if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7942        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7943        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7944    # We are running configure from the src root.
7945    # Create a default ./build/target-variant-debuglevel output root.
7946    if test "x${CONF_NAME}" = x; then
7947        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7948    fi
7949    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7950    $MKDIR -p "$OUTPUT_ROOT"
7951    if test ! -d "$OUTPUT_ROOT"; then
7952        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7953    fi
7954else
7955    # We are running configure from outside of the src dir.
7956    # Then use the current directory as output dir!
7957    # If configuration is situated in normal build directory, just use the build
7958    # directory name as configuration name, otherwise use the complete path.
7959    if test "x${CONF_NAME}" = x; then
7960        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7961    fi
7962    OUTPUT_ROOT="$CURDIR"
7963
7964    # WARNING: This might be a bad thing to do. You need to be sure you want to
7965    # have a configuration in this directory. Do some sanity checks!
7966
7967    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7968      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7969      # other files
7970      files_present=`$LS $OUTPUT_ROOT`
7971      # Configure has already touched config.log and confdefs.h in the current dir when this check
7972      # is performed.
7973      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7974                                             | $TR -d '\n'`
7975      if test "x$filtered_files" != x; then
7976        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7977$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7978        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7979$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7980        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7981$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7982        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7983$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7984        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7985$as_echo "$as_me: seriously mess up just about everything." >&6;}
7986        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7987$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7988        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7989$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7990        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7991      fi
7992    fi
7993fi
7994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7995$as_echo_n "checking what configuration name to use... " >&6; }
7996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7997$as_echo "$CONF_NAME" >&6; }
7998
7999
8000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8001
8002  # Input might be given as Windows format, start by converting to
8003  # unix format.
8004  path="$OUTPUT_ROOT"
8005  new_path=`$CYGPATH -u "$path"`
8006
8007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8010  # "foo.exe" is OK but "foo" is an error.
8011  #
8012  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8013  # It is also a way to make sure we got the proper file name for the real test later on.
8014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8015  if test "x$test_shortpath" = x; then
8016    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8017$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8018    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8019  fi
8020
8021  # Call helper function which possibly converts this using DOS-style short mode.
8022  # If so, the updated path is stored in $new_path.
8023
8024  input_path="$new_path"
8025  # Check if we need to convert this using DOS-style short mode. If the path
8026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8027  # take no chances and rewrite it.
8028  # Note: m4 eats our [], so we need to use [ and ] instead.
8029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8030  if test "x$has_forbidden_chars" != x; then
8031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8035      # Going to short mode and back again did indeed matter. Since short mode is
8036      # case insensitive, let's make it lowercase to improve readability.
8037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8038      # Now convert it back to Unix-stile (cygpath)
8039      input_path=`$CYGPATH -u "$shortmode_path"`
8040      new_path="$input_path"
8041    fi
8042  fi
8043
8044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8045  if test "x$test_cygdrive_prefix" = x; then
8046    # As a simple fix, exclude /usr/bin since it's not a real path.
8047    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8049      # a path prefixed by /cygdrive for fixpath to work.
8050      new_path="$CYGWIN_ROOT_PATH$input_path"
8051    fi
8052  fi
8053
8054
8055  if test "x$path" != "x$new_path"; then
8056    OUTPUT_ROOT="$new_path"
8057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8058$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8059  fi
8060
8061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8062
8063  path="$OUTPUT_ROOT"
8064  has_colon=`$ECHO $path | $GREP ^.:`
8065  new_path="$path"
8066  if test "x$has_colon" = x; then
8067    # Not in mixed or Windows style, start by that.
8068    new_path=`cmd //c echo $path`
8069  fi
8070
8071
8072  input_path="$new_path"
8073  # Check if we need to convert this using DOS-style short mode. If the path
8074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8075  # take no chances and rewrite it.
8076  # Note: m4 eats our [], so we need to use [ and ] instead.
8077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8078  if test "x$has_forbidden_chars" != x; then
8079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8081  fi
8082
8083
8084  windows_path="$new_path"
8085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8086    unix_path=`$CYGPATH -u "$windows_path"`
8087    new_path="$unix_path"
8088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8090    new_path="$unix_path"
8091  fi
8092
8093  if test "x$path" != "x$new_path"; then
8094    OUTPUT_ROOT="$new_path"
8095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8096$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8097  fi
8098
8099  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8100  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8101
8102  else
8103    # We're on a posix platform. Hooray! :)
8104    path="$OUTPUT_ROOT"
8105
8106    if test ! -f "$path" && test ! -d "$path"; then
8107      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8108    fi
8109
8110    has_space=`$ECHO "$path" | $GREP " "`
8111    if test "x$has_space" != x; then
8112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8113$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8114      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8115    fi
8116  fi
8117
8118
8119SPEC=$OUTPUT_ROOT/spec.gmk
8120
8121CONF_NAME=$CONF_NAME
8122
8123OUTPUT_ROOT=$OUTPUT_ROOT
8124
8125
8126# Most of the probed defines are put into config.h
8127ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8128
8129# The spec.gmk file contains all variables for the make system.
8130ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8131
8132# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8133ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8134
8135# The bootcycle-spec.gmk file contains support for boot cycle builds.
8136ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8137
8138# The compare.sh is used to compare the build output to other builds.
8139ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8140
8141# Spec.sh is currently used by compare-objects.sh
8142ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8143
8144# The generated Makefile knows where the spec.gmk is and where the source is.
8145# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8146# which will look for generated configurations
8147ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8148
8149
8150# Save the arguments given to us
8151echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8152
8153
8154# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8155
8156    for ac_prog in apt-get yum port pkgutil pkgadd
8157do
8158  # Extract the first word of "$ac_prog", so it can be a program name with args.
8159set dummy $ac_prog; ac_word=$2
8160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8161$as_echo_n "checking for $ac_word... " >&6; }
8162if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8163  $as_echo_n "(cached) " >&6
8164else
8165  if test -n "$PKGHANDLER"; then
8166  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8167else
8168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8169for as_dir in $PATH
8170do
8171  IFS=$as_save_IFS
8172  test -z "$as_dir" && as_dir=.
8173    for ac_exec_ext in '' $ac_executable_extensions; do
8174  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8175    ac_cv_prog_PKGHANDLER="$ac_prog"
8176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8177    break 2
8178  fi
8179done
8180  done
8181IFS=$as_save_IFS
8182
8183fi
8184fi
8185PKGHANDLER=$ac_cv_prog_PKGHANDLER
8186if test -n "$PKGHANDLER"; then
8187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8188$as_echo "$PKGHANDLER" >&6; }
8189else
8190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8191$as_echo "no" >&6; }
8192fi
8193
8194
8195  test -n "$PKGHANDLER" && break
8196done
8197
8198
8199
8200# Setup tools that requires more complex handling, or that is not needed by the configure script.
8201
8202
8203  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8204  if test "x$MAKE" != x; then
8205    # User has supplied a make, test it.
8206    if test ! -f "$MAKE"; then
8207      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8208    fi
8209
8210  MAKE_CANDIDATE=""$MAKE""
8211  DESCRIPTION="user supplied MAKE=$MAKE"
8212  if test "x$MAKE_CANDIDATE" != x; then
8213    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8214$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8215    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8216    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8217    if test "x$IS_GNU_MAKE" = x; then
8218      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8219$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8220    else
8221      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8222      if test "x$IS_MODERN_MAKE" = x; then
8223        { $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
8224$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;}
8225      else
8226        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8227          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8228            MAKE_EXPECTED_ENV='cygwin'
8229          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8230            MAKE_EXPECTED_ENV='msys'
8231          else
8232            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8233          fi
8234          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8235          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8236        else
8237          # Not relevant for non-Windows
8238          IS_MAKE_CORRECT_ENV=true
8239        fi
8240        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8241          { $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
8242$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;}
8243        else
8244          FOUND_MAKE=$MAKE_CANDIDATE
8245
8246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8247
8248  # First separate the path from the arguments. This will split at the first
8249  # space.
8250  complete="$FOUND_MAKE"
8251  path="${complete%% *}"
8252  tmp="$complete EOL"
8253  arguments="${tmp#* }"
8254
8255  # Input might be given as Windows format, start by converting to
8256  # unix format.
8257  new_path=`$CYGPATH -u "$path"`
8258
8259  # Now try to locate executable using which
8260  new_path=`$WHICH "$new_path" 2> /dev/null`
8261  # bat and cmd files are not always considered executable in cygwin causing which
8262  # to not find them
8263  if test "x$new_path" = x \
8264           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8265           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8266    new_path=`$CYGPATH -u "$path"`
8267  fi
8268  if test "x$new_path" = x; then
8269    # Oops. Which didn't find the executable.
8270    # The splitting of arguments from the executable at a space might have been incorrect,
8271    # since paths with space are more likely in Windows. Give it another try with the whole
8272    # argument.
8273    path="$complete"
8274    arguments="EOL"
8275    new_path=`$CYGPATH -u "$path"`
8276    new_path=`$WHICH "$new_path" 2> /dev/null`
8277    # bat and cmd files are not always considered executable in cygwin causing which
8278    # to not find them
8279    if test "x$new_path" = x \
8280             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8281             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8282      new_path=`$CYGPATH -u "$path"`
8283    fi
8284    if test "x$new_path" = x; then
8285      # It's still not found. Now this is an unrecoverable error.
8286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8287$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8288      has_space=`$ECHO "$complete" | $GREP " "`
8289      if test "x$has_space" != x; then
8290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8292      fi
8293      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8294    fi
8295  fi
8296
8297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8300  # "foo.exe" is OK but "foo" is an error.
8301  #
8302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8303  # It is also a way to make sure we got the proper file name for the real test later on.
8304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8305  if test "x$test_shortpath" = x; then
8306    # Short path failed, file does not exist as specified.
8307    # Try adding .exe or .cmd
8308    if test -f "${new_path}.exe"; then
8309       input_to_shortpath="${new_path}.exe"
8310    elif test -f "${new_path}.cmd"; then
8311       input_to_shortpath="${new_path}.cmd"
8312    else
8313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8314$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8315      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8316$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8317      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8318    fi
8319  else
8320    input_to_shortpath="$new_path"
8321  fi
8322
8323  # Call helper function which possibly converts this using DOS-style short mode.
8324  # If so, the updated path is stored in $new_path.
8325  new_path="$input_to_shortpath"
8326
8327  input_path="$input_to_shortpath"
8328  # Check if we need to convert this using DOS-style short mode. If the path
8329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8330  # take no chances and rewrite it.
8331  # Note: m4 eats our [], so we need to use [ and ] instead.
8332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8333  if test "x$has_forbidden_chars" != x; then
8334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8338      # Going to short mode and back again did indeed matter. Since short mode is
8339      # case insensitive, let's make it lowercase to improve readability.
8340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8341      # Now convert it back to Unix-stile (cygpath)
8342      input_path=`$CYGPATH -u "$shortmode_path"`
8343      new_path="$input_path"
8344    fi
8345  fi
8346
8347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8348  if test "x$test_cygdrive_prefix" = x; then
8349    # As a simple fix, exclude /usr/bin since it's not a real path.
8350    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8352      # a path prefixed by /cygdrive for fixpath to work.
8353      new_path="$CYGWIN_ROOT_PATH$input_path"
8354    fi
8355  fi
8356
8357  # remove trailing .exe if any
8358  new_path="${new_path/%.exe/}"
8359
8360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8361
8362  # First separate the path from the arguments. This will split at the first
8363  # space.
8364  complete="$FOUND_MAKE"
8365  path="${complete%% *}"
8366  tmp="$complete EOL"
8367  arguments="${tmp#* }"
8368
8369  # Input might be given as Windows format, start by converting to
8370  # unix format.
8371  new_path="$path"
8372
8373  windows_path="$new_path"
8374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8375    unix_path=`$CYGPATH -u "$windows_path"`
8376    new_path="$unix_path"
8377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8379    new_path="$unix_path"
8380  fi
8381
8382
8383  # Now try to locate executable using which
8384  new_path=`$WHICH "$new_path" 2> /dev/null`
8385
8386  if test "x$new_path" = x; then
8387    # Oops. Which didn't find the executable.
8388    # The splitting of arguments from the executable at a space might have been incorrect,
8389    # since paths with space are more likely in Windows. Give it another try with the whole
8390    # argument.
8391    path="$complete"
8392    arguments="EOL"
8393    new_path="$path"
8394
8395  windows_path="$new_path"
8396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8397    unix_path=`$CYGPATH -u "$windows_path"`
8398    new_path="$unix_path"
8399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8401    new_path="$unix_path"
8402  fi
8403
8404
8405    new_path=`$WHICH "$new_path" 2> /dev/null`
8406
8407    if test "x$new_path" = x; then
8408      # It's still not found. Now this is an unrecoverable error.
8409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8410$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8411      has_space=`$ECHO "$complete" | $GREP " "`
8412      if test "x$has_space" != x; then
8413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8415      fi
8416      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8417    fi
8418  fi
8419
8420  # Now new_path has a complete unix path to the binary
8421  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8422    # Keep paths in /bin as-is, but remove trailing .exe if any
8423    new_path="${new_path/%.exe/}"
8424    # Do not save /bin paths to all_fixpath_prefixes!
8425  else
8426    # Not in mixed or Windows style, start by that.
8427    new_path=`cmd //c echo $new_path`
8428
8429  input_path="$new_path"
8430  # Check if we need to convert this using DOS-style short mode. If the path
8431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8432  # take no chances and rewrite it.
8433  # Note: m4 eats our [], so we need to use [ and ] instead.
8434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8435  if test "x$has_forbidden_chars" != x; then
8436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8438  fi
8439
8440    # Output is in $new_path
8441
8442  windows_path="$new_path"
8443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8444    unix_path=`$CYGPATH -u "$windows_path"`
8445    new_path="$unix_path"
8446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8448    new_path="$unix_path"
8449  fi
8450
8451    # remove trailing .exe if any
8452    new_path="${new_path/%.exe/}"
8453
8454    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8455    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8456  fi
8457
8458  else
8459    # We're on a posix platform. Hooray! :)
8460    # First separate the path from the arguments. This will split at the first
8461    # space.
8462    complete="$FOUND_MAKE"
8463    path="${complete%% *}"
8464    tmp="$complete EOL"
8465    arguments="${tmp#* }"
8466
8467    # Cannot rely on the command "which" here since it doesn't always work.
8468    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8469    if test -z "$is_absolute_path"; then
8470      # Path to executable is not absolute. Find it.
8471      IFS_save="$IFS"
8472      IFS=:
8473      for p in $PATH; do
8474        if test -f "$p/$path" && test -x "$p/$path"; then
8475          new_path="$p/$path"
8476          break
8477        fi
8478      done
8479      IFS="$IFS_save"
8480    else
8481      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8482$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8483      new_path="$path"
8484    fi
8485
8486    if test "x$new_path" = x; then
8487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8488$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8489        has_space=`$ECHO "$complete" | $GREP " "`
8490        if test "x$has_space" != x; then
8491          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8493        fi
8494        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8495      fi
8496  fi
8497
8498      # Now join together the path and the arguments once again
8499      if test "x$arguments" != xEOL; then
8500        new_complete="$new_path ${arguments% *}"
8501      else
8502        new_complete="$new_path"
8503      fi
8504
8505  if test "x$complete" != "x$new_complete"; then
8506      FOUND_MAKE="$new_complete"
8507      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8508$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8509    fi
8510
8511        fi
8512      fi
8513    fi
8514  fi
8515
8516    if test "x$FOUND_MAKE" = x; then
8517      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8518    fi
8519  else
8520    # Try our hardest to locate a correct version of GNU make
8521    for ac_prog in gmake
8522do
8523  # Extract the first word of "$ac_prog", so it can be a program name with args.
8524set dummy $ac_prog; ac_word=$2
8525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8526$as_echo_n "checking for $ac_word... " >&6; }
8527if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8528  $as_echo_n "(cached) " >&6
8529else
8530  case $CHECK_GMAKE in
8531  [\\/]* | ?:[\\/]*)
8532  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8533  ;;
8534  *)
8535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8536for as_dir in $PATH
8537do
8538  IFS=$as_save_IFS
8539  test -z "$as_dir" && as_dir=.
8540    for ac_exec_ext in '' $ac_executable_extensions; do
8541  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8542    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8544    break 2
8545  fi
8546done
8547  done
8548IFS=$as_save_IFS
8549
8550  ;;
8551esac
8552fi
8553CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8554if test -n "$CHECK_GMAKE"; then
8555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8556$as_echo "$CHECK_GMAKE" >&6; }
8557else
8558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8559$as_echo "no" >&6; }
8560fi
8561
8562
8563  test -n "$CHECK_GMAKE" && break
8564done
8565
8566
8567  MAKE_CANDIDATE=""$CHECK_GMAKE""
8568  DESCRIPTION="gmake in PATH"
8569  if test "x$MAKE_CANDIDATE" != x; then
8570    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8571$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8572    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8573    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8574    if test "x$IS_GNU_MAKE" = x; then
8575      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8576$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8577    else
8578      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8579      if test "x$IS_MODERN_MAKE" = x; then
8580        { $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
8581$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;}
8582      else
8583        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8584          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8585            MAKE_EXPECTED_ENV='cygwin'
8586          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8587            MAKE_EXPECTED_ENV='msys'
8588          else
8589            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8590          fi
8591          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8592          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8593        else
8594          # Not relevant for non-Windows
8595          IS_MAKE_CORRECT_ENV=true
8596        fi
8597        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8598          { $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
8599$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;}
8600        else
8601          FOUND_MAKE=$MAKE_CANDIDATE
8602
8603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8604
8605  # First separate the path from the arguments. This will split at the first
8606  # space.
8607  complete="$FOUND_MAKE"
8608  path="${complete%% *}"
8609  tmp="$complete EOL"
8610  arguments="${tmp#* }"
8611
8612  # Input might be given as Windows format, start by converting to
8613  # unix format.
8614  new_path=`$CYGPATH -u "$path"`
8615
8616  # Now try to locate executable using which
8617  new_path=`$WHICH "$new_path" 2> /dev/null`
8618  # bat and cmd files are not always considered executable in cygwin causing which
8619  # to not find them
8620  if test "x$new_path" = x \
8621           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8622           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8623    new_path=`$CYGPATH -u "$path"`
8624  fi
8625  if test "x$new_path" = x; then
8626    # Oops. Which didn't find the executable.
8627    # The splitting of arguments from the executable at a space might have been incorrect,
8628    # since paths with space are more likely in Windows. Give it another try with the whole
8629    # argument.
8630    path="$complete"
8631    arguments="EOL"
8632    new_path=`$CYGPATH -u "$path"`
8633    new_path=`$WHICH "$new_path" 2> /dev/null`
8634    # bat and cmd files are not always considered executable in cygwin causing which
8635    # to not find them
8636    if test "x$new_path" = x \
8637             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8638             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8639      new_path=`$CYGPATH -u "$path"`
8640    fi
8641    if test "x$new_path" = x; then
8642      # It's still not found. Now this is an unrecoverable error.
8643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8644$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8645      has_space=`$ECHO "$complete" | $GREP " "`
8646      if test "x$has_space" != x; then
8647        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8648$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8649      fi
8650      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8651    fi
8652  fi
8653
8654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8657  # "foo.exe" is OK but "foo" is an error.
8658  #
8659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8660  # It is also a way to make sure we got the proper file name for the real test later on.
8661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8662  if test "x$test_shortpath" = x; then
8663    # Short path failed, file does not exist as specified.
8664    # Try adding .exe or .cmd
8665    if test -f "${new_path}.exe"; then
8666       input_to_shortpath="${new_path}.exe"
8667    elif test -f "${new_path}.cmd"; then
8668       input_to_shortpath="${new_path}.cmd"
8669    else
8670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8671$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8672      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8673$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8674      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8675    fi
8676  else
8677    input_to_shortpath="$new_path"
8678  fi
8679
8680  # Call helper function which possibly converts this using DOS-style short mode.
8681  # If so, the updated path is stored in $new_path.
8682  new_path="$input_to_shortpath"
8683
8684  input_path="$input_to_shortpath"
8685  # Check if we need to convert this using DOS-style short mode. If the path
8686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8687  # take no chances and rewrite it.
8688  # Note: m4 eats our [], so we need to use [ and ] instead.
8689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8690  if test "x$has_forbidden_chars" != x; then
8691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8695      # Going to short mode and back again did indeed matter. Since short mode is
8696      # case insensitive, let's make it lowercase to improve readability.
8697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8698      # Now convert it back to Unix-stile (cygpath)
8699      input_path=`$CYGPATH -u "$shortmode_path"`
8700      new_path="$input_path"
8701    fi
8702  fi
8703
8704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8705  if test "x$test_cygdrive_prefix" = x; then
8706    # As a simple fix, exclude /usr/bin since it's not a real path.
8707    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8709      # a path prefixed by /cygdrive for fixpath to work.
8710      new_path="$CYGWIN_ROOT_PATH$input_path"
8711    fi
8712  fi
8713
8714  # remove trailing .exe if any
8715  new_path="${new_path/%.exe/}"
8716
8717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8718
8719  # First separate the path from the arguments. This will split at the first
8720  # space.
8721  complete="$FOUND_MAKE"
8722  path="${complete%% *}"
8723  tmp="$complete EOL"
8724  arguments="${tmp#* }"
8725
8726  # Input might be given as Windows format, start by converting to
8727  # unix format.
8728  new_path="$path"
8729
8730  windows_path="$new_path"
8731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8732    unix_path=`$CYGPATH -u "$windows_path"`
8733    new_path="$unix_path"
8734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8736    new_path="$unix_path"
8737  fi
8738
8739
8740  # Now try to locate executable using which
8741  new_path=`$WHICH "$new_path" 2> /dev/null`
8742
8743  if test "x$new_path" = x; then
8744    # Oops. Which didn't find the executable.
8745    # The splitting of arguments from the executable at a space might have been incorrect,
8746    # since paths with space are more likely in Windows. Give it another try with the whole
8747    # argument.
8748    path="$complete"
8749    arguments="EOL"
8750    new_path="$path"
8751
8752  windows_path="$new_path"
8753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8754    unix_path=`$CYGPATH -u "$windows_path"`
8755    new_path="$unix_path"
8756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8758    new_path="$unix_path"
8759  fi
8760
8761
8762    new_path=`$WHICH "$new_path" 2> /dev/null`
8763
8764    if test "x$new_path" = x; then
8765      # It's still not found. Now this is an unrecoverable error.
8766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8767$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8768      has_space=`$ECHO "$complete" | $GREP " "`
8769      if test "x$has_space" != x; then
8770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8772      fi
8773      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8774    fi
8775  fi
8776
8777  # Now new_path has a complete unix path to the binary
8778  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8779    # Keep paths in /bin as-is, but remove trailing .exe if any
8780    new_path="${new_path/%.exe/}"
8781    # Do not save /bin paths to all_fixpath_prefixes!
8782  else
8783    # Not in mixed or Windows style, start by that.
8784    new_path=`cmd //c echo $new_path`
8785
8786  input_path="$new_path"
8787  # Check if we need to convert this using DOS-style short mode. If the path
8788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8789  # take no chances and rewrite it.
8790  # Note: m4 eats our [], so we need to use [ and ] instead.
8791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8792  if test "x$has_forbidden_chars" != x; then
8793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8795  fi
8796
8797    # Output is in $new_path
8798
8799  windows_path="$new_path"
8800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8801    unix_path=`$CYGPATH -u "$windows_path"`
8802    new_path="$unix_path"
8803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8805    new_path="$unix_path"
8806  fi
8807
8808    # remove trailing .exe if any
8809    new_path="${new_path/%.exe/}"
8810
8811    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8812    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8813  fi
8814
8815  else
8816    # We're on a posix platform. Hooray! :)
8817    # First separate the path from the arguments. This will split at the first
8818    # space.
8819    complete="$FOUND_MAKE"
8820    path="${complete%% *}"
8821    tmp="$complete EOL"
8822    arguments="${tmp#* }"
8823
8824    # Cannot rely on the command "which" here since it doesn't always work.
8825    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8826    if test -z "$is_absolute_path"; then
8827      # Path to executable is not absolute. Find it.
8828      IFS_save="$IFS"
8829      IFS=:
8830      for p in $PATH; do
8831        if test -f "$p/$path" && test -x "$p/$path"; then
8832          new_path="$p/$path"
8833          break
8834        fi
8835      done
8836      IFS="$IFS_save"
8837    else
8838      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8839$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8840      new_path="$path"
8841    fi
8842
8843    if test "x$new_path" = x; then
8844        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8845$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8846        has_space=`$ECHO "$complete" | $GREP " "`
8847        if test "x$has_space" != x; then
8848          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8849$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8850        fi
8851        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8852      fi
8853  fi
8854
8855      # Now join together the path and the arguments once again
8856      if test "x$arguments" != xEOL; then
8857        new_complete="$new_path ${arguments% *}"
8858      else
8859        new_complete="$new_path"
8860      fi
8861
8862  if test "x$complete" != "x$new_complete"; then
8863      FOUND_MAKE="$new_complete"
8864      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8865$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8866    fi
8867
8868        fi
8869      fi
8870    fi
8871  fi
8872
8873
8874    if test "x$FOUND_MAKE" = x; then
8875      for ac_prog in make
8876do
8877  # Extract the first word of "$ac_prog", so it can be a program name with args.
8878set dummy $ac_prog; ac_word=$2
8879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8880$as_echo_n "checking for $ac_word... " >&6; }
8881if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8882  $as_echo_n "(cached) " >&6
8883else
8884  case $CHECK_MAKE in
8885  [\\/]* | ?:[\\/]*)
8886  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8887  ;;
8888  *)
8889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8890for as_dir in $PATH
8891do
8892  IFS=$as_save_IFS
8893  test -z "$as_dir" && as_dir=.
8894    for ac_exec_ext in '' $ac_executable_extensions; do
8895  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8896    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8898    break 2
8899  fi
8900done
8901  done
8902IFS=$as_save_IFS
8903
8904  ;;
8905esac
8906fi
8907CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8908if test -n "$CHECK_MAKE"; then
8909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8910$as_echo "$CHECK_MAKE" >&6; }
8911else
8912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8913$as_echo "no" >&6; }
8914fi
8915
8916
8917  test -n "$CHECK_MAKE" && break
8918done
8919
8920
8921  MAKE_CANDIDATE=""$CHECK_MAKE""
8922  DESCRIPTION="make in PATH"
8923  if test "x$MAKE_CANDIDATE" != x; then
8924    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8925$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8926    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8927    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8928    if test "x$IS_GNU_MAKE" = x; then
8929      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8930$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8931    else
8932      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8933      if test "x$IS_MODERN_MAKE" = x; then
8934        { $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
8935$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;}
8936      else
8937        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8938          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8939            MAKE_EXPECTED_ENV='cygwin'
8940          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8941            MAKE_EXPECTED_ENV='msys'
8942          else
8943            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8944          fi
8945          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8946          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8947        else
8948          # Not relevant for non-Windows
8949          IS_MAKE_CORRECT_ENV=true
8950        fi
8951        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8952          { $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
8953$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;}
8954        else
8955          FOUND_MAKE=$MAKE_CANDIDATE
8956
8957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8958
8959  # First separate the path from the arguments. This will split at the first
8960  # space.
8961  complete="$FOUND_MAKE"
8962  path="${complete%% *}"
8963  tmp="$complete EOL"
8964  arguments="${tmp#* }"
8965
8966  # Input might be given as Windows format, start by converting to
8967  # unix format.
8968  new_path=`$CYGPATH -u "$path"`
8969
8970  # Now try to locate executable using which
8971  new_path=`$WHICH "$new_path" 2> /dev/null`
8972  # bat and cmd files are not always considered executable in cygwin causing which
8973  # to not find them
8974  if test "x$new_path" = x \
8975           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8976           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8977    new_path=`$CYGPATH -u "$path"`
8978  fi
8979  if test "x$new_path" = x; then
8980    # Oops. Which didn't find the executable.
8981    # The splitting of arguments from the executable at a space might have been incorrect,
8982    # since paths with space are more likely in Windows. Give it another try with the whole
8983    # argument.
8984    path="$complete"
8985    arguments="EOL"
8986    new_path=`$CYGPATH -u "$path"`
8987    new_path=`$WHICH "$new_path" 2> /dev/null`
8988    # bat and cmd files are not always considered executable in cygwin causing which
8989    # to not find them
8990    if test "x$new_path" = x \
8991             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8992             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8993      new_path=`$CYGPATH -u "$path"`
8994    fi
8995    if test "x$new_path" = x; then
8996      # It's still not found. Now this is an unrecoverable error.
8997      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8998$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8999      has_space=`$ECHO "$complete" | $GREP " "`
9000      if test "x$has_space" != x; then
9001        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9002$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9003      fi
9004      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9005    fi
9006  fi
9007
9008  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9009  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9010  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9011  # "foo.exe" is OK but "foo" is an error.
9012  #
9013  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9014  # It is also a way to make sure we got the proper file name for the real test later on.
9015  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9016  if test "x$test_shortpath" = x; then
9017    # Short path failed, file does not exist as specified.
9018    # Try adding .exe or .cmd
9019    if test -f "${new_path}.exe"; then
9020       input_to_shortpath="${new_path}.exe"
9021    elif test -f "${new_path}.cmd"; then
9022       input_to_shortpath="${new_path}.cmd"
9023    else
9024      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9025$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9026      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9027$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9028      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9029    fi
9030  else
9031    input_to_shortpath="$new_path"
9032  fi
9033
9034  # Call helper function which possibly converts this using DOS-style short mode.
9035  # If so, the updated path is stored in $new_path.
9036  new_path="$input_to_shortpath"
9037
9038  input_path="$input_to_shortpath"
9039  # Check if we need to convert this using DOS-style short mode. If the path
9040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9041  # take no chances and rewrite it.
9042  # Note: m4 eats our [], so we need to use [ and ] instead.
9043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9044  if test "x$has_forbidden_chars" != x; then
9045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9046    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9047    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9048    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9049      # Going to short mode and back again did indeed matter. Since short mode is
9050      # case insensitive, let's make it lowercase to improve readability.
9051      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9052      # Now convert it back to Unix-stile (cygpath)
9053      input_path=`$CYGPATH -u "$shortmode_path"`
9054      new_path="$input_path"
9055    fi
9056  fi
9057
9058  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9059  if test "x$test_cygdrive_prefix" = x; then
9060    # As a simple fix, exclude /usr/bin since it's not a real path.
9061    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9062      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9063      # a path prefixed by /cygdrive for fixpath to work.
9064      new_path="$CYGWIN_ROOT_PATH$input_path"
9065    fi
9066  fi
9067
9068  # remove trailing .exe if any
9069  new_path="${new_path/%.exe/}"
9070
9071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9072
9073  # First separate the path from the arguments. This will split at the first
9074  # space.
9075  complete="$FOUND_MAKE"
9076  path="${complete%% *}"
9077  tmp="$complete EOL"
9078  arguments="${tmp#* }"
9079
9080  # Input might be given as Windows format, start by converting to
9081  # unix format.
9082  new_path="$path"
9083
9084  windows_path="$new_path"
9085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9086    unix_path=`$CYGPATH -u "$windows_path"`
9087    new_path="$unix_path"
9088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9090    new_path="$unix_path"
9091  fi
9092
9093
9094  # Now try to locate executable using which
9095  new_path=`$WHICH "$new_path" 2> /dev/null`
9096
9097  if test "x$new_path" = x; then
9098    # Oops. Which didn't find the executable.
9099    # The splitting of arguments from the executable at a space might have been incorrect,
9100    # since paths with space are more likely in Windows. Give it another try with the whole
9101    # argument.
9102    path="$complete"
9103    arguments="EOL"
9104    new_path="$path"
9105
9106  windows_path="$new_path"
9107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9108    unix_path=`$CYGPATH -u "$windows_path"`
9109    new_path="$unix_path"
9110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9112    new_path="$unix_path"
9113  fi
9114
9115
9116    new_path=`$WHICH "$new_path" 2> /dev/null`
9117
9118    if test "x$new_path" = x; then
9119      # It's still not found. Now this is an unrecoverable error.
9120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9121$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9122      has_space=`$ECHO "$complete" | $GREP " "`
9123      if test "x$has_space" != x; then
9124        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9125$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9126      fi
9127      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9128    fi
9129  fi
9130
9131  # Now new_path has a complete unix path to the binary
9132  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9133    # Keep paths in /bin as-is, but remove trailing .exe if any
9134    new_path="${new_path/%.exe/}"
9135    # Do not save /bin paths to all_fixpath_prefixes!
9136  else
9137    # Not in mixed or Windows style, start by that.
9138    new_path=`cmd //c echo $new_path`
9139
9140  input_path="$new_path"
9141  # Check if we need to convert this using DOS-style short mode. If the path
9142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9143  # take no chances and rewrite it.
9144  # Note: m4 eats our [], so we need to use [ and ] instead.
9145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9146  if test "x$has_forbidden_chars" != x; then
9147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9148    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9149  fi
9150
9151    # Output is in $new_path
9152
9153  windows_path="$new_path"
9154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9155    unix_path=`$CYGPATH -u "$windows_path"`
9156    new_path="$unix_path"
9157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9159    new_path="$unix_path"
9160  fi
9161
9162    # remove trailing .exe if any
9163    new_path="${new_path/%.exe/}"
9164
9165    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9166    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9167  fi
9168
9169  else
9170    # We're on a posix platform. Hooray! :)
9171    # First separate the path from the arguments. This will split at the first
9172    # space.
9173    complete="$FOUND_MAKE"
9174    path="${complete%% *}"
9175    tmp="$complete EOL"
9176    arguments="${tmp#* }"
9177
9178    # Cannot rely on the command "which" here since it doesn't always work.
9179    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9180    if test -z "$is_absolute_path"; then
9181      # Path to executable is not absolute. Find it.
9182      IFS_save="$IFS"
9183      IFS=:
9184      for p in $PATH; do
9185        if test -f "$p/$path" && test -x "$p/$path"; then
9186          new_path="$p/$path"
9187          break
9188        fi
9189      done
9190      IFS="$IFS_save"
9191    else
9192      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9193$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9194      new_path="$path"
9195    fi
9196
9197    if test "x$new_path" = x; then
9198        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9199$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9200        has_space=`$ECHO "$complete" | $GREP " "`
9201        if test "x$has_space" != x; then
9202          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9203$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9204        fi
9205        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9206      fi
9207  fi
9208
9209      # Now join together the path and the arguments once again
9210      if test "x$arguments" != xEOL; then
9211        new_complete="$new_path ${arguments% *}"
9212      else
9213        new_complete="$new_path"
9214      fi
9215
9216  if test "x$complete" != "x$new_complete"; then
9217      FOUND_MAKE="$new_complete"
9218      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9219$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9220    fi
9221
9222        fi
9223      fi
9224    fi
9225  fi
9226
9227    fi
9228
9229    if test "x$FOUND_MAKE" = x; then
9230      if test "x$TOOLS_DIR" != x; then
9231        # We have a tools-dir, check that as well before giving up.
9232        OLD_PATH=$PATH
9233        PATH=$TOOLS_DIR:$PATH
9234        for ac_prog in gmake
9235do
9236  # Extract the first word of "$ac_prog", so it can be a program name with args.
9237set dummy $ac_prog; ac_word=$2
9238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9239$as_echo_n "checking for $ac_word... " >&6; }
9240if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9241  $as_echo_n "(cached) " >&6
9242else
9243  case $CHECK_TOOLSDIR_GMAKE in
9244  [\\/]* | ?:[\\/]*)
9245  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9246  ;;
9247  *)
9248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9249for as_dir in $PATH
9250do
9251  IFS=$as_save_IFS
9252  test -z "$as_dir" && as_dir=.
9253    for ac_exec_ext in '' $ac_executable_extensions; do
9254  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9255    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9257    break 2
9258  fi
9259done
9260  done
9261IFS=$as_save_IFS
9262
9263  ;;
9264esac
9265fi
9266CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9267if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9269$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9270else
9271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9272$as_echo "no" >&6; }
9273fi
9274
9275
9276  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9277done
9278
9279
9280  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9281  DESCRIPTION="gmake in tools-dir"
9282  if test "x$MAKE_CANDIDATE" != x; then
9283    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9284$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9285    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9286    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9287    if test "x$IS_GNU_MAKE" = x; then
9288      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9289$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9290    else
9291      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9292      if test "x$IS_MODERN_MAKE" = x; then
9293        { $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
9294$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;}
9295      else
9296        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9297          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9298            MAKE_EXPECTED_ENV='cygwin'
9299          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9300            MAKE_EXPECTED_ENV='msys'
9301          else
9302            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9303          fi
9304          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9305          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9306        else
9307          # Not relevant for non-Windows
9308          IS_MAKE_CORRECT_ENV=true
9309        fi
9310        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9311          { $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
9312$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;}
9313        else
9314          FOUND_MAKE=$MAKE_CANDIDATE
9315
9316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9317
9318  # First separate the path from the arguments. This will split at the first
9319  # space.
9320  complete="$FOUND_MAKE"
9321  path="${complete%% *}"
9322  tmp="$complete EOL"
9323  arguments="${tmp#* }"
9324
9325  # Input might be given as Windows format, start by converting to
9326  # unix format.
9327  new_path=`$CYGPATH -u "$path"`
9328
9329  # Now try to locate executable using which
9330  new_path=`$WHICH "$new_path" 2> /dev/null`
9331  # bat and cmd files are not always considered executable in cygwin causing which
9332  # to not find them
9333  if test "x$new_path" = x \
9334           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9335           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9336    new_path=`$CYGPATH -u "$path"`
9337  fi
9338  if test "x$new_path" = x; then
9339    # Oops. Which didn't find the executable.
9340    # The splitting of arguments from the executable at a space might have been incorrect,
9341    # since paths with space are more likely in Windows. Give it another try with the whole
9342    # argument.
9343    path="$complete"
9344    arguments="EOL"
9345    new_path=`$CYGPATH -u "$path"`
9346    new_path=`$WHICH "$new_path" 2> /dev/null`
9347    # bat and cmd files are not always considered executable in cygwin causing which
9348    # to not find them
9349    if test "x$new_path" = x \
9350             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9351             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9352      new_path=`$CYGPATH -u "$path"`
9353    fi
9354    if test "x$new_path" = x; then
9355      # It's still not found. Now this is an unrecoverable error.
9356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9357$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9358      has_space=`$ECHO "$complete" | $GREP " "`
9359      if test "x$has_space" != x; then
9360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9362      fi
9363      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9364    fi
9365  fi
9366
9367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9370  # "foo.exe" is OK but "foo" is an error.
9371  #
9372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9373  # It is also a way to make sure we got the proper file name for the real test later on.
9374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9375  if test "x$test_shortpath" = x; then
9376    # Short path failed, file does not exist as specified.
9377    # Try adding .exe or .cmd
9378    if test -f "${new_path}.exe"; then
9379       input_to_shortpath="${new_path}.exe"
9380    elif test -f "${new_path}.cmd"; then
9381       input_to_shortpath="${new_path}.cmd"
9382    else
9383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9384$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9385      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9386$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9387      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9388    fi
9389  else
9390    input_to_shortpath="$new_path"
9391  fi
9392
9393  # Call helper function which possibly converts this using DOS-style short mode.
9394  # If so, the updated path is stored in $new_path.
9395  new_path="$input_to_shortpath"
9396
9397  input_path="$input_to_shortpath"
9398  # Check if we need to convert this using DOS-style short mode. If the path
9399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9400  # take no chances and rewrite it.
9401  # Note: m4 eats our [], so we need to use [ and ] instead.
9402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9403  if test "x$has_forbidden_chars" != x; then
9404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9408      # Going to short mode and back again did indeed matter. Since short mode is
9409      # case insensitive, let's make it lowercase to improve readability.
9410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9411      # Now convert it back to Unix-stile (cygpath)
9412      input_path=`$CYGPATH -u "$shortmode_path"`
9413      new_path="$input_path"
9414    fi
9415  fi
9416
9417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9418  if test "x$test_cygdrive_prefix" = x; then
9419    # As a simple fix, exclude /usr/bin since it's not a real path.
9420    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9422      # a path prefixed by /cygdrive for fixpath to work.
9423      new_path="$CYGWIN_ROOT_PATH$input_path"
9424    fi
9425  fi
9426
9427  # remove trailing .exe if any
9428  new_path="${new_path/%.exe/}"
9429
9430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9431
9432  # First separate the path from the arguments. This will split at the first
9433  # space.
9434  complete="$FOUND_MAKE"
9435  path="${complete%% *}"
9436  tmp="$complete EOL"
9437  arguments="${tmp#* }"
9438
9439  # Input might be given as Windows format, start by converting to
9440  # unix format.
9441  new_path="$path"
9442
9443  windows_path="$new_path"
9444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9445    unix_path=`$CYGPATH -u "$windows_path"`
9446    new_path="$unix_path"
9447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9449    new_path="$unix_path"
9450  fi
9451
9452
9453  # Now try to locate executable using which
9454  new_path=`$WHICH "$new_path" 2> /dev/null`
9455
9456  if test "x$new_path" = x; then
9457    # Oops. Which didn't find the executable.
9458    # The splitting of arguments from the executable at a space might have been incorrect,
9459    # since paths with space are more likely in Windows. Give it another try with the whole
9460    # argument.
9461    path="$complete"
9462    arguments="EOL"
9463    new_path="$path"
9464
9465  windows_path="$new_path"
9466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9467    unix_path=`$CYGPATH -u "$windows_path"`
9468    new_path="$unix_path"
9469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9471    new_path="$unix_path"
9472  fi
9473
9474
9475    new_path=`$WHICH "$new_path" 2> /dev/null`
9476
9477    if test "x$new_path" = x; then
9478      # It's still not found. Now this is an unrecoverable error.
9479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9480$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9481      has_space=`$ECHO "$complete" | $GREP " "`
9482      if test "x$has_space" != x; then
9483        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9484$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9485      fi
9486      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9487    fi
9488  fi
9489
9490  # Now new_path has a complete unix path to the binary
9491  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9492    # Keep paths in /bin as-is, but remove trailing .exe if any
9493    new_path="${new_path/%.exe/}"
9494    # Do not save /bin paths to all_fixpath_prefixes!
9495  else
9496    # Not in mixed or Windows style, start by that.
9497    new_path=`cmd //c echo $new_path`
9498
9499  input_path="$new_path"
9500  # Check if we need to convert this using DOS-style short mode. If the path
9501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9502  # take no chances and rewrite it.
9503  # Note: m4 eats our [], so we need to use [ and ] instead.
9504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9505  if test "x$has_forbidden_chars" != x; then
9506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9508  fi
9509
9510    # Output is in $new_path
9511
9512  windows_path="$new_path"
9513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9514    unix_path=`$CYGPATH -u "$windows_path"`
9515    new_path="$unix_path"
9516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9518    new_path="$unix_path"
9519  fi
9520
9521    # remove trailing .exe if any
9522    new_path="${new_path/%.exe/}"
9523
9524    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9525    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9526  fi
9527
9528  else
9529    # We're on a posix platform. Hooray! :)
9530    # First separate the path from the arguments. This will split at the first
9531    # space.
9532    complete="$FOUND_MAKE"
9533    path="${complete%% *}"
9534    tmp="$complete EOL"
9535    arguments="${tmp#* }"
9536
9537    # Cannot rely on the command "which" here since it doesn't always work.
9538    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9539    if test -z "$is_absolute_path"; then
9540      # Path to executable is not absolute. Find it.
9541      IFS_save="$IFS"
9542      IFS=:
9543      for p in $PATH; do
9544        if test -f "$p/$path" && test -x "$p/$path"; then
9545          new_path="$p/$path"
9546          break
9547        fi
9548      done
9549      IFS="$IFS_save"
9550    else
9551      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9552$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9553      new_path="$path"
9554    fi
9555
9556    if test "x$new_path" = x; then
9557        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9558$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9559        has_space=`$ECHO "$complete" | $GREP " "`
9560        if test "x$has_space" != x; then
9561          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9562$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9563        fi
9564        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9565      fi
9566  fi
9567
9568      # Now join together the path and the arguments once again
9569      if test "x$arguments" != xEOL; then
9570        new_complete="$new_path ${arguments% *}"
9571      else
9572        new_complete="$new_path"
9573      fi
9574
9575  if test "x$complete" != "x$new_complete"; then
9576      FOUND_MAKE="$new_complete"
9577      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9578$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9579    fi
9580
9581        fi
9582      fi
9583    fi
9584  fi
9585
9586        if test "x$FOUND_MAKE" = x; then
9587          for ac_prog in make
9588do
9589  # Extract the first word of "$ac_prog", so it can be a program name with args.
9590set dummy $ac_prog; ac_word=$2
9591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9592$as_echo_n "checking for $ac_word... " >&6; }
9593if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9594  $as_echo_n "(cached) " >&6
9595else
9596  case $CHECK_TOOLSDIR_MAKE in
9597  [\\/]* | ?:[\\/]*)
9598  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9599  ;;
9600  *)
9601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9602for as_dir in $PATH
9603do
9604  IFS=$as_save_IFS
9605  test -z "$as_dir" && as_dir=.
9606    for ac_exec_ext in '' $ac_executable_extensions; do
9607  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9608    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9610    break 2
9611  fi
9612done
9613  done
9614IFS=$as_save_IFS
9615
9616  ;;
9617esac
9618fi
9619CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9620if test -n "$CHECK_TOOLSDIR_MAKE"; then
9621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9622$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9623else
9624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9625$as_echo "no" >&6; }
9626fi
9627
9628
9629  test -n "$CHECK_TOOLSDIR_MAKE" && break
9630done
9631
9632
9633  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9634  DESCRIPTION="make in tools-dir"
9635  if test "x$MAKE_CANDIDATE" != x; then
9636    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9637$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9638    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9639    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9640    if test "x$IS_GNU_MAKE" = x; then
9641      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9642$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9643    else
9644      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9645      if test "x$IS_MODERN_MAKE" = x; then
9646        { $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
9647$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;}
9648      else
9649        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9650          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9651            MAKE_EXPECTED_ENV='cygwin'
9652          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9653            MAKE_EXPECTED_ENV='msys'
9654          else
9655            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9656          fi
9657          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9658          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9659        else
9660          # Not relevant for non-Windows
9661          IS_MAKE_CORRECT_ENV=true
9662        fi
9663        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9664          { $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
9665$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;}
9666        else
9667          FOUND_MAKE=$MAKE_CANDIDATE
9668
9669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9670
9671  # First separate the path from the arguments. This will split at the first
9672  # space.
9673  complete="$FOUND_MAKE"
9674  path="${complete%% *}"
9675  tmp="$complete EOL"
9676  arguments="${tmp#* }"
9677
9678  # Input might be given as Windows format, start by converting to
9679  # unix format.
9680  new_path=`$CYGPATH -u "$path"`
9681
9682  # Now try to locate executable using which
9683  new_path=`$WHICH "$new_path" 2> /dev/null`
9684  # bat and cmd files are not always considered executable in cygwin causing which
9685  # to not find them
9686  if test "x$new_path" = x \
9687           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9688           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9689    new_path=`$CYGPATH -u "$path"`
9690  fi
9691  if test "x$new_path" = x; then
9692    # Oops. Which didn't find the executable.
9693    # The splitting of arguments from the executable at a space might have been incorrect,
9694    # since paths with space are more likely in Windows. Give it another try with the whole
9695    # argument.
9696    path="$complete"
9697    arguments="EOL"
9698    new_path=`$CYGPATH -u "$path"`
9699    new_path=`$WHICH "$new_path" 2> /dev/null`
9700    # bat and cmd files are not always considered executable in cygwin causing which
9701    # to not find them
9702    if test "x$new_path" = x \
9703             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9704             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9705      new_path=`$CYGPATH -u "$path"`
9706    fi
9707    if test "x$new_path" = x; then
9708      # It's still not found. Now this is an unrecoverable error.
9709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9710$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9711      has_space=`$ECHO "$complete" | $GREP " "`
9712      if test "x$has_space" != x; then
9713        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9714$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9715      fi
9716      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9717    fi
9718  fi
9719
9720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9723  # "foo.exe" is OK but "foo" is an error.
9724  #
9725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9726  # It is also a way to make sure we got the proper file name for the real test later on.
9727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9728  if test "x$test_shortpath" = x; then
9729    # Short path failed, file does not exist as specified.
9730    # Try adding .exe or .cmd
9731    if test -f "${new_path}.exe"; then
9732       input_to_shortpath="${new_path}.exe"
9733    elif test -f "${new_path}.cmd"; then
9734       input_to_shortpath="${new_path}.cmd"
9735    else
9736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9737$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9738      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9739$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9740      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9741    fi
9742  else
9743    input_to_shortpath="$new_path"
9744  fi
9745
9746  # Call helper function which possibly converts this using DOS-style short mode.
9747  # If so, the updated path is stored in $new_path.
9748  new_path="$input_to_shortpath"
9749
9750  input_path="$input_to_shortpath"
9751  # Check if we need to convert this using DOS-style short mode. If the path
9752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9753  # take no chances and rewrite it.
9754  # Note: m4 eats our [], so we need to use [ and ] instead.
9755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9756  if test "x$has_forbidden_chars" != x; then
9757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9761      # Going to short mode and back again did indeed matter. Since short mode is
9762      # case insensitive, let's make it lowercase to improve readability.
9763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9764      # Now convert it back to Unix-stile (cygpath)
9765      input_path=`$CYGPATH -u "$shortmode_path"`
9766      new_path="$input_path"
9767    fi
9768  fi
9769
9770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9771  if test "x$test_cygdrive_prefix" = x; then
9772    # As a simple fix, exclude /usr/bin since it's not a real path.
9773    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9775      # a path prefixed by /cygdrive for fixpath to work.
9776      new_path="$CYGWIN_ROOT_PATH$input_path"
9777    fi
9778  fi
9779
9780  # remove trailing .exe if any
9781  new_path="${new_path/%.exe/}"
9782
9783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9784
9785  # First separate the path from the arguments. This will split at the first
9786  # space.
9787  complete="$FOUND_MAKE"
9788  path="${complete%% *}"
9789  tmp="$complete EOL"
9790  arguments="${tmp#* }"
9791
9792  # Input might be given as Windows format, start by converting to
9793  # unix format.
9794  new_path="$path"
9795
9796  windows_path="$new_path"
9797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9798    unix_path=`$CYGPATH -u "$windows_path"`
9799    new_path="$unix_path"
9800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9802    new_path="$unix_path"
9803  fi
9804
9805
9806  # Now try to locate executable using which
9807  new_path=`$WHICH "$new_path" 2> /dev/null`
9808
9809  if test "x$new_path" = x; then
9810    # Oops. Which didn't find the executable.
9811    # The splitting of arguments from the executable at a space might have been incorrect,
9812    # since paths with space are more likely in Windows. Give it another try with the whole
9813    # argument.
9814    path="$complete"
9815    arguments="EOL"
9816    new_path="$path"
9817
9818  windows_path="$new_path"
9819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9820    unix_path=`$CYGPATH -u "$windows_path"`
9821    new_path="$unix_path"
9822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9824    new_path="$unix_path"
9825  fi
9826
9827
9828    new_path=`$WHICH "$new_path" 2> /dev/null`
9829
9830    if test "x$new_path" = x; then
9831      # It's still not found. Now this is an unrecoverable error.
9832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9833$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9834      has_space=`$ECHO "$complete" | $GREP " "`
9835      if test "x$has_space" != x; then
9836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9838      fi
9839      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9840    fi
9841  fi
9842
9843  # Now new_path has a complete unix path to the binary
9844  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9845    # Keep paths in /bin as-is, but remove trailing .exe if any
9846    new_path="${new_path/%.exe/}"
9847    # Do not save /bin paths to all_fixpath_prefixes!
9848  else
9849    # Not in mixed or Windows style, start by that.
9850    new_path=`cmd //c echo $new_path`
9851
9852  input_path="$new_path"
9853  # Check if we need to convert this using DOS-style short mode. If the path
9854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9855  # take no chances and rewrite it.
9856  # Note: m4 eats our [], so we need to use [ and ] instead.
9857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9858  if test "x$has_forbidden_chars" != x; then
9859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9861  fi
9862
9863    # Output is in $new_path
9864
9865  windows_path="$new_path"
9866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9867    unix_path=`$CYGPATH -u "$windows_path"`
9868    new_path="$unix_path"
9869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9871    new_path="$unix_path"
9872  fi
9873
9874    # remove trailing .exe if any
9875    new_path="${new_path/%.exe/}"
9876
9877    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9878    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9879  fi
9880
9881  else
9882    # We're on a posix platform. Hooray! :)
9883    # First separate the path from the arguments. This will split at the first
9884    # space.
9885    complete="$FOUND_MAKE"
9886    path="${complete%% *}"
9887    tmp="$complete EOL"
9888    arguments="${tmp#* }"
9889
9890    # Cannot rely on the command "which" here since it doesn't always work.
9891    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9892    if test -z "$is_absolute_path"; then
9893      # Path to executable is not absolute. Find it.
9894      IFS_save="$IFS"
9895      IFS=:
9896      for p in $PATH; do
9897        if test -f "$p/$path" && test -x "$p/$path"; then
9898          new_path="$p/$path"
9899          break
9900        fi
9901      done
9902      IFS="$IFS_save"
9903    else
9904      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9905$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9906      new_path="$path"
9907    fi
9908
9909    if test "x$new_path" = x; then
9910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9911$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9912        has_space=`$ECHO "$complete" | $GREP " "`
9913        if test "x$has_space" != x; then
9914          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9915$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9916        fi
9917        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9918      fi
9919  fi
9920
9921      # Now join together the path and the arguments once again
9922      if test "x$arguments" != xEOL; then
9923        new_complete="$new_path ${arguments% *}"
9924      else
9925        new_complete="$new_path"
9926      fi
9927
9928  if test "x$complete" != "x$new_complete"; then
9929      FOUND_MAKE="$new_complete"
9930      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9931$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9932    fi
9933
9934        fi
9935      fi
9936    fi
9937  fi
9938
9939        fi
9940        PATH=$OLD_PATH
9941      fi
9942    fi
9943
9944    if test "x$FOUND_MAKE" = x; then
9945      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
9946    fi
9947  fi
9948
9949  MAKE=$FOUND_MAKE
9950
9951  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9952$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9953
9954
9955
9956    # Test if find supports -delete
9957    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9958$as_echo_n "checking if find supports -delete... " >&6; }
9959    FIND_DELETE="-delete"
9960
9961    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9962
9963    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9964
9965    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9966    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9967        # No, it does not.
9968        rm $DELETEDIR/TestIfFindSupportsDelete
9969        FIND_DELETE="-exec rm \{\} \+"
9970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9971$as_echo "no" >&6; }
9972    else
9973        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9974$as_echo "yes" >&6; }
9975    fi
9976    rmdir $DELETEDIR
9977
9978
9979
9980# These tools might not be installed by default,
9981# need hint on how to install them.
9982
9983    for ac_prog in unzip
9984do
9985  # Extract the first word of "$ac_prog", so it can be a program name with args.
9986set dummy $ac_prog; ac_word=$2
9987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9988$as_echo_n "checking for $ac_word... " >&6; }
9989if test "${ac_cv_path_UNZIP+set}" = set; then :
9990  $as_echo_n "(cached) " >&6
9991else
9992  case $UNZIP in
9993  [\\/]* | ?:[\\/]*)
9994  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9995  ;;
9996  *)
9997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9998for as_dir in $PATH
9999do
10000  IFS=$as_save_IFS
10001  test -z "$as_dir" && as_dir=.
10002    for ac_exec_ext in '' $ac_executable_extensions; do
10003  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10004    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10006    break 2
10007  fi
10008done
10009  done
10010IFS=$as_save_IFS
10011
10012  ;;
10013esac
10014fi
10015UNZIP=$ac_cv_path_UNZIP
10016if test -n "$UNZIP"; then
10017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10018$as_echo "$UNZIP" >&6; }
10019else
10020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10021$as_echo "no" >&6; }
10022fi
10023
10024
10025  test -n "$UNZIP" && break
10026done
10027
10028
10029    if test "x$UNZIP" = x; then
10030        if test "xunzip" = x; then
10031          PROG_NAME=unzip
10032        else
10033          PROG_NAME=unzip
10034        fi
10035        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10036$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10037        as_fn_error $? "Cannot continue" "$LINENO" 5
10038    fi
10039
10040
10041
10042    for ac_prog in zip
10043do
10044  # Extract the first word of "$ac_prog", so it can be a program name with args.
10045set dummy $ac_prog; ac_word=$2
10046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10047$as_echo_n "checking for $ac_word... " >&6; }
10048if test "${ac_cv_path_ZIP+set}" = set; then :
10049  $as_echo_n "(cached) " >&6
10050else
10051  case $ZIP in
10052  [\\/]* | ?:[\\/]*)
10053  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10054  ;;
10055  *)
10056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10057for as_dir in $PATH
10058do
10059  IFS=$as_save_IFS
10060  test -z "$as_dir" && as_dir=.
10061    for ac_exec_ext in '' $ac_executable_extensions; do
10062  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10063    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10065    break 2
10066  fi
10067done
10068  done
10069IFS=$as_save_IFS
10070
10071  ;;
10072esac
10073fi
10074ZIP=$ac_cv_path_ZIP
10075if test -n "$ZIP"; then
10076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10077$as_echo "$ZIP" >&6; }
10078else
10079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10080$as_echo "no" >&6; }
10081fi
10082
10083
10084  test -n "$ZIP" && break
10085done
10086
10087
10088    if test "x$ZIP" = x; then
10089        if test "xzip" = x; then
10090          PROG_NAME=zip
10091        else
10092          PROG_NAME=zip
10093        fi
10094        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10095$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10096        as_fn_error $? "Cannot continue" "$LINENO" 5
10097    fi
10098
10099
10100
10101# Non-required basic tools
10102
10103# Extract the first word of "ldd", so it can be a program name with args.
10104set dummy ldd; ac_word=$2
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10106$as_echo_n "checking for $ac_word... " >&6; }
10107if test "${ac_cv_path_LDD+set}" = set; then :
10108  $as_echo_n "(cached) " >&6
10109else
10110  case $LDD in
10111  [\\/]* | ?:[\\/]*)
10112  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10113  ;;
10114  *)
10115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10116for as_dir in $PATH
10117do
10118  IFS=$as_save_IFS
10119  test -z "$as_dir" && as_dir=.
10120    for ac_exec_ext in '' $ac_executable_extensions; do
10121  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10122    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10124    break 2
10125  fi
10126done
10127  done
10128IFS=$as_save_IFS
10129
10130  ;;
10131esac
10132fi
10133LDD=$ac_cv_path_LDD
10134if test -n "$LDD"; then
10135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10136$as_echo "$LDD" >&6; }
10137else
10138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139$as_echo "no" >&6; }
10140fi
10141
10142
10143if test "x$LDD" = "x"; then
10144    # List shared lib dependencies is used for
10145    # debug output and checking for forbidden dependencies.
10146    # We can build without it.
10147    LDD="true"
10148fi
10149# Extract the first word of "otool", so it can be a program name with args.
10150set dummy otool; 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_OTOOL+set}" = set; then :
10154  $as_echo_n "(cached) " >&6
10155else
10156  case $OTOOL in
10157  [\\/]* | ?:[\\/]*)
10158  ac_cv_path_OTOOL="$OTOOL" # 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_OTOOL="$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
10179OTOOL=$ac_cv_path_OTOOL
10180if test -n "$OTOOL"; then
10181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10182$as_echo "$OTOOL" >&6; }
10183else
10184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10185$as_echo "no" >&6; }
10186fi
10187
10188
10189if test "x$OTOOL" = "x"; then
10190   OTOOL="true"
10191fi
10192for ac_prog in readelf greadelf
10193do
10194  # Extract the first word of "$ac_prog", so it can be a program name with args.
10195set dummy $ac_prog; ac_word=$2
10196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10197$as_echo_n "checking for $ac_word... " >&6; }
10198if test "${ac_cv_path_READELF+set}" = set; then :
10199  $as_echo_n "(cached) " >&6
10200else
10201  case $READELF in
10202  [\\/]* | ?:[\\/]*)
10203  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10204  ;;
10205  *)
10206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10207for as_dir in $PATH
10208do
10209  IFS=$as_save_IFS
10210  test -z "$as_dir" && as_dir=.
10211    for ac_exec_ext in '' $ac_executable_extensions; do
10212  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10213    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10215    break 2
10216  fi
10217done
10218  done
10219IFS=$as_save_IFS
10220
10221  ;;
10222esac
10223fi
10224READELF=$ac_cv_path_READELF
10225if test -n "$READELF"; then
10226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10227$as_echo "$READELF" >&6; }
10228else
10229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10230$as_echo "no" >&6; }
10231fi
10232
10233
10234  test -n "$READELF" && break
10235done
10236
10237# Extract the first word of "hg", so it can be a program name with args.
10238set dummy hg; ac_word=$2
10239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10240$as_echo_n "checking for $ac_word... " >&6; }
10241if test "${ac_cv_path_HG+set}" = set; then :
10242  $as_echo_n "(cached) " >&6
10243else
10244  case $HG in
10245  [\\/]* | ?:[\\/]*)
10246  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10247  ;;
10248  *)
10249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10250for as_dir in $PATH
10251do
10252  IFS=$as_save_IFS
10253  test -z "$as_dir" && as_dir=.
10254    for ac_exec_ext in '' $ac_executable_extensions; do
10255  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10256    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10258    break 2
10259  fi
10260done
10261  done
10262IFS=$as_save_IFS
10263
10264  ;;
10265esac
10266fi
10267HG=$ac_cv_path_HG
10268if test -n "$HG"; then
10269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10270$as_echo "$HG" >&6; }
10271else
10272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10273$as_echo "no" >&6; }
10274fi
10275
10276
10277# Extract the first word of "stat", so it can be a program name with args.
10278set dummy stat; ac_word=$2
10279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10280$as_echo_n "checking for $ac_word... " >&6; }
10281if test "${ac_cv_path_STAT+set}" = set; then :
10282  $as_echo_n "(cached) " >&6
10283else
10284  case $STAT in
10285  [\\/]* | ?:[\\/]*)
10286  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10287  ;;
10288  *)
10289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10290for as_dir in $PATH
10291do
10292  IFS=$as_save_IFS
10293  test -z "$as_dir" && as_dir=.
10294    for ac_exec_ext in '' $ac_executable_extensions; do
10295  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10296    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10298    break 2
10299  fi
10300done
10301  done
10302IFS=$as_save_IFS
10303
10304  ;;
10305esac
10306fi
10307STAT=$ac_cv_path_STAT
10308if test -n "$STAT"; then
10309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10310$as_echo "$STAT" >&6; }
10311else
10312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10313$as_echo "no" >&6; }
10314fi
10315
10316
10317# Extract the first word of "time", so it can be a program name with args.
10318set dummy time; 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_TIME+set}" = set; then :
10322  $as_echo_n "(cached) " >&6
10323else
10324  case $TIME in
10325  [\\/]* | ?:[\\/]*)
10326  ac_cv_path_TIME="$TIME" # 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_TIME="$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
10347TIME=$ac_cv_path_TIME
10348if test -n "$TIME"; then
10349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10350$as_echo "$TIME" >&6; }
10351else
10352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10353$as_echo "no" >&6; }
10354fi
10355
10356
10357
10358if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10359
10360    for ac_prog in comm
10361do
10362  # Extract the first word of "$ac_prog", so it can be a program name with args.
10363set dummy $ac_prog; ac_word=$2
10364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10365$as_echo_n "checking for $ac_word... " >&6; }
10366if test "${ac_cv_path_COMM+set}" = set; then :
10367  $as_echo_n "(cached) " >&6
10368else
10369  case $COMM in
10370  [\\/]* | ?:[\\/]*)
10371  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10372  ;;
10373  *)
10374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10375for as_dir in $PATH
10376do
10377  IFS=$as_save_IFS
10378  test -z "$as_dir" && as_dir=.
10379    for ac_exec_ext in '' $ac_executable_extensions; do
10380  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10381    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10383    break 2
10384  fi
10385done
10386  done
10387IFS=$as_save_IFS
10388
10389  ;;
10390esac
10391fi
10392COMM=$ac_cv_path_COMM
10393if test -n "$COMM"; then
10394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10395$as_echo "$COMM" >&6; }
10396else
10397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398$as_echo "no" >&6; }
10399fi
10400
10401
10402  test -n "$COMM" && break
10403done
10404
10405
10406    if test "x$COMM" = x; then
10407        if test "xcomm" = x; then
10408          PROG_NAME=comm
10409        else
10410          PROG_NAME=comm
10411        fi
10412        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10413$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10414        as_fn_error $? "Cannot continue" "$LINENO" 5
10415    fi
10416
10417
10418fi
10419
10420if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10421
10422    for ac_prog in xattr
10423do
10424  # Extract the first word of "$ac_prog", so it can be a program name with args.
10425set dummy $ac_prog; ac_word=$2
10426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10427$as_echo_n "checking for $ac_word... " >&6; }
10428if test "${ac_cv_path_XATTR+set}" = set; then :
10429  $as_echo_n "(cached) " >&6
10430else
10431  case $XATTR in
10432  [\\/]* | ?:[\\/]*)
10433  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10434  ;;
10435  *)
10436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10437for as_dir in $PATH
10438do
10439  IFS=$as_save_IFS
10440  test -z "$as_dir" && as_dir=.
10441    for ac_exec_ext in '' $ac_executable_extensions; do
10442  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10443    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10445    break 2
10446  fi
10447done
10448  done
10449IFS=$as_save_IFS
10450
10451  ;;
10452esac
10453fi
10454XATTR=$ac_cv_path_XATTR
10455if test -n "$XATTR"; then
10456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10457$as_echo "$XATTR" >&6; }
10458else
10459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10460$as_echo "no" >&6; }
10461fi
10462
10463
10464  test -n "$XATTR" && break
10465done
10466
10467
10468    if test "x$XATTR" = x; then
10469        if test "xxattr" = x; then
10470          PROG_NAME=xattr
10471        else
10472          PROG_NAME=xattr
10473        fi
10474        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10475$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10476        as_fn_error $? "Cannot continue" "$LINENO" 5
10477    fi
10478
10479
10480fi
10481
10482
10483# Check if pkg-config is available.
10484
10485
10486if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10487	if test -n "$ac_tool_prefix"; then
10488  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10489set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10491$as_echo_n "checking for $ac_word... " >&6; }
10492if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10493  $as_echo_n "(cached) " >&6
10494else
10495  case $PKG_CONFIG in
10496  [\\/]* | ?:[\\/]*)
10497  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10498  ;;
10499  *)
10500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10501for as_dir in $PATH
10502do
10503  IFS=$as_save_IFS
10504  test -z "$as_dir" && as_dir=.
10505    for ac_exec_ext in '' $ac_executable_extensions; do
10506  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10507    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10509    break 2
10510  fi
10511done
10512  done
10513IFS=$as_save_IFS
10514
10515  ;;
10516esac
10517fi
10518PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10519if test -n "$PKG_CONFIG"; then
10520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10521$as_echo "$PKG_CONFIG" >&6; }
10522else
10523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10524$as_echo "no" >&6; }
10525fi
10526
10527
10528fi
10529if test -z "$ac_cv_path_PKG_CONFIG"; then
10530  ac_pt_PKG_CONFIG=$PKG_CONFIG
10531  # Extract the first word of "pkg-config", so it can be a program name with args.
10532set dummy pkg-config; ac_word=$2
10533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10534$as_echo_n "checking for $ac_word... " >&6; }
10535if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10536  $as_echo_n "(cached) " >&6
10537else
10538  case $ac_pt_PKG_CONFIG in
10539  [\\/]* | ?:[\\/]*)
10540  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10541  ;;
10542  *)
10543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10544for as_dir in $PATH
10545do
10546  IFS=$as_save_IFS
10547  test -z "$as_dir" && as_dir=.
10548    for ac_exec_ext in '' $ac_executable_extensions; do
10549  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10550    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10552    break 2
10553  fi
10554done
10555  done
10556IFS=$as_save_IFS
10557
10558  ;;
10559esac
10560fi
10561ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10562if test -n "$ac_pt_PKG_CONFIG"; then
10563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10564$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10565else
10566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10567$as_echo "no" >&6; }
10568fi
10569
10570  if test "x$ac_pt_PKG_CONFIG" = x; then
10571    PKG_CONFIG=""
10572  else
10573    case $cross_compiling:$ac_tool_warned in
10574yes:)
10575{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10576$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10577ac_tool_warned=yes ;;
10578esac
10579    PKG_CONFIG=$ac_pt_PKG_CONFIG
10580  fi
10581else
10582  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10583fi
10584
10585fi
10586if test -n "$PKG_CONFIG"; then
10587	_pkg_min_version=0.9.0
10588	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10589$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10590	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10591		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10592$as_echo "yes" >&6; }
10593	else
10594		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10595$as_echo "no" >&6; }
10596		PKG_CONFIG=""
10597	fi
10598
10599fi
10600
10601# After basic tools have been setup, we can check build os specific details.
10602
10603###############################################################################
10604
10605# Note that this is the build platform OS version!
10606
10607OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10608OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10609OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10610OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10611
10612
10613
10614
10615
10616# Setup builddeps, for automatic downloading of tools we need.
10617# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10618# boot-jdk setup, but we need to have basic tools setup first.
10619
10620
10621# Check whether --with-builddeps-conf was given.
10622if test "${with_builddeps_conf+set}" = set; then :
10623  withval=$with_builddeps_conf;
10624fi
10625
10626
10627
10628# Check whether --with-builddeps-server was given.
10629if test "${with_builddeps_server+set}" = set; then :
10630  withval=$with_builddeps_server;
10631fi
10632
10633
10634
10635# Check whether --with-builddeps-dir was given.
10636if test "${with_builddeps_dir+set}" = set; then :
10637  withval=$with_builddeps_dir;
10638else
10639  with_builddeps_dir=/localhome/builddeps
10640fi
10641
10642
10643
10644# Check whether --with-builddeps-group was given.
10645if test "${with_builddeps_group+set}" = set; then :
10646  withval=$with_builddeps_group;
10647fi
10648
10649
10650
10651
10652    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10653        if test "x$with_builddeps_conf" != x; then
10654            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10655$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10656            builddepsfile=$with_builddeps_conf
10657            if test -s $builddepsfile; then
10658                . $builddepsfile
10659                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10660$as_echo "loaded!" >&6; }
10661            else
10662               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10663           fi
10664        else
10665            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10666$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10667            builddepsfile=`mktemp`
10668            touch $builddepsfile
10669            # Put all found confs into a single file.
10670            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10671            # Source the file to acquire the variables
10672            if test -s $builddepsfile; then
10673                . $builddepsfile
10674                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10675$as_echo "found at least one!" >&6; }
10676            else
10677               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10678           fi
10679        fi
10680        # Create build and target names that use _ instead of "-" and ".".
10681        # This is necessary to use them in variable names.
10682        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10683        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10684        # Extract rewrite information for build and target
10685        eval rewritten_build=\${REWRITE_${build_var}}
10686        if test "x$rewritten_build" = x; then
10687            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10688            echo Build stays the same $rewritten_build
10689        else
10690            echo Rewriting build for builddeps into $rewritten_build
10691        fi
10692        eval rewritten_target=\${REWRITE_${target_var}}
10693        if test "x$rewritten_target" = x; then
10694            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10695            echo Target stays the same $rewritten_target
10696        else
10697            echo Rewriting target for builddeps into $rewritten_target
10698        fi
10699        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10700        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10701    fi
10702    for ac_prog in 7z unzip
10703do
10704  # Extract the first word of "$ac_prog", so it can be a program name with args.
10705set dummy $ac_prog; ac_word=$2
10706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10707$as_echo_n "checking for $ac_word... " >&6; }
10708if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10709  $as_echo_n "(cached) " >&6
10710else
10711  if test -n "$BDEPS_UNZIP"; then
10712  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10713else
10714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10715for as_dir in $PATH
10716do
10717  IFS=$as_save_IFS
10718  test -z "$as_dir" && as_dir=.
10719    for ac_exec_ext in '' $ac_executable_extensions; do
10720  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10721    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10723    break 2
10724  fi
10725done
10726  done
10727IFS=$as_save_IFS
10728
10729fi
10730fi
10731BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10732if test -n "$BDEPS_UNZIP"; then
10733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10734$as_echo "$BDEPS_UNZIP" >&6; }
10735else
10736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10737$as_echo "no" >&6; }
10738fi
10739
10740
10741  test -n "$BDEPS_UNZIP" && break
10742done
10743
10744    if test "x$BDEPS_UNZIP" = x7z; then
10745        BDEPS_UNZIP="7z x"
10746    fi
10747
10748    for ac_prog in wget lftp ftp
10749do
10750  # Extract the first word of "$ac_prog", so it can be a program name with args.
10751set dummy $ac_prog; ac_word=$2
10752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10753$as_echo_n "checking for $ac_word... " >&6; }
10754if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10755  $as_echo_n "(cached) " >&6
10756else
10757  if test -n "$BDEPS_FTP"; then
10758  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10759else
10760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10761for as_dir in $PATH
10762do
10763  IFS=$as_save_IFS
10764  test -z "$as_dir" && as_dir=.
10765    for ac_exec_ext in '' $ac_executable_extensions; do
10766  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10767    ac_cv_prog_BDEPS_FTP="$ac_prog"
10768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10769    break 2
10770  fi
10771done
10772  done
10773IFS=$as_save_IFS
10774
10775fi
10776fi
10777BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10778if test -n "$BDEPS_FTP"; then
10779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10780$as_echo "$BDEPS_FTP" >&6; }
10781else
10782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10783$as_echo "no" >&6; }
10784fi
10785
10786
10787  test -n "$BDEPS_FTP" && break
10788done
10789
10790
10791
10792###############################################################################
10793#
10794# Determine OpenJDK variants, options and version numbers.
10795#
10796###############################################################################
10797
10798# We need build & target for this.
10799
10800
10801###############################################################################
10802#
10803# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10804# We always build headless support.
10805#
10806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10807$as_echo_n "checking headful support... " >&6; }
10808# Check whether --enable-headful was given.
10809if test "${enable_headful+set}" = set; then :
10810  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10811else
10812  SUPPORT_HEADFUL=yes
10813fi
10814
10815
10816SUPPORT_HEADLESS=yes
10817BUILD_HEADLESS="BUILD_HEADLESS:=true"
10818
10819if test "x$SUPPORT_HEADFUL" = xyes; then
10820    # We are building both headful and headless.
10821    headful_msg="inlude support for both headful and headless"
10822fi
10823
10824if test "x$SUPPORT_HEADFUL" = xno; then
10825    # Thus we are building headless only.
10826    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10827    headful_msg="headless only"
10828fi
10829
10830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10831$as_echo "$headful_msg" >&6; }
10832
10833
10834
10835
10836
10837# Control wether Hotspot runs Queens test after build.
10838# Check whether --enable-hotspot-test-in-build was given.
10839if test "${enable_hotspot_test_in_build+set}" = set; then :
10840  enableval=$enable_hotspot_test_in_build;
10841else
10842  enable_hotspot_test_in_build=no
10843fi
10844
10845if test "x$enable_hotspot_test_in_build" = "xyes"; then
10846    TEST_IN_BUILD=true
10847else
10848    TEST_IN_BUILD=false
10849fi
10850
10851
10852###############################################################################
10853#
10854# Choose cacerts source file
10855#
10856
10857# Check whether --with-cacerts-file was given.
10858if test "${with_cacerts_file+set}" = set; then :
10859  withval=$with_cacerts_file;
10860fi
10861
10862if test "x$with_cacerts_file" != x; then
10863    CACERTS_FILE=$with_cacerts_file
10864else
10865    if test "x$OPENJDK" = "xtrue"; then
10866        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10867    else
10868        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10869    fi
10870fi
10871
10872
10873###############################################################################
10874#
10875# Enable or disable unlimited crypto
10876#
10877# Check whether --enable-unlimited-crypto was given.
10878if test "${enable_unlimited_crypto+set}" = set; then :
10879  enableval=$enable_unlimited_crypto;
10880else
10881  enable_unlimited_crypto=no
10882fi
10883
10884if test "x$enable_unlimited_crypto" = "xyes"; then
10885    UNLIMITED_CRYPTO=true
10886else
10887    UNLIMITED_CRYPTO=false
10888fi
10889
10890
10891###############################################################################
10892#
10893# Enable or disable the elliptic curve crypto implementation
10894#
10895
10896
10897###############################################################################
10898#
10899# Compress jars
10900#
10901COMPRESS_JARS=false
10902
10903
10904
10905
10906# Source the version numbers
10907. $AUTOCONF_DIR/version-numbers
10908
10909# Get the settings from parameters
10910
10911# Check whether --with-milestone was given.
10912if test "${with_milestone+set}" = set; then :
10913  withval=$with_milestone;
10914fi
10915
10916if test "x$with_milestone" = xyes; then
10917  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10918elif test "x$with_milestone" != x; then
10919    MILESTONE="$with_milestone"
10920fi
10921if test "x$MILESTONE" = x; then
10922  MILESTONE=internal
10923fi
10924
10925
10926# Check whether --with-build-number was given.
10927if test "${with_build_number+set}" = set; then :
10928  withval=$with_build_number;
10929fi
10930
10931if test "x$with_build_number" = xyes; then
10932  as_fn_error $? "Build number must have a value" "$LINENO" 5
10933elif test "x$with_build_number" != x; then
10934  JDK_BUILD_NUMBER="$with_build_number"
10935fi
10936if test "x$JDK_BUILD_NUMBER" = x; then
10937  JDK_BUILD_NUMBER=b00
10938fi
10939
10940
10941# Check whether --with-user-release-suffix was given.
10942if test "${with_user_release_suffix+set}" = set; then :
10943  withval=$with_user_release_suffix;
10944fi
10945
10946if test "x$with_user_release_suffix" = xyes; then
10947  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10948elif test "x$with_user_release_suffix" != x; then
10949  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10950else
10951  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10952  # Avoid [:alnum:] since it depends on the locale.
10953  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10954  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10955fi
10956
10957
10958# Now set the JDK version, milestone, build number etc.
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973COPYRIGHT_YEAR=`date +'%Y'`
10974
10975
10976if test "x$JDK_UPDATE_VERSION" != x; then
10977  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10978else
10979  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10980fi
10981
10982
10983COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10984
10985
10986
10987###############################################################################
10988#
10989# Setup BootJDK, used to bootstrap the build.
10990#
10991###############################################################################
10992
10993
10994BOOT_JDK_FOUND=no
10995
10996# Check whether --with-boot-jdk was given.
10997if test "${with_boot_jdk+set}" = set; then :
10998  withval=$with_boot_jdk;
10999fi
11000
11001
11002# We look for the Boot JDK through various means, going from more certain to
11003# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11004# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11005# must check if this is indeed valid; otherwise we'll continue looking.
11006
11007# Test: Is bootjdk explicitely set by command line arguments?
11008
11009  if test "x$BOOT_JDK_FOUND" = xno; then
11010    # Now execute the test
11011
11012if test "x$with_boot_jdk" != x; then
11013    BOOT_JDK=$with_boot_jdk
11014    BOOT_JDK_FOUND=maybe
11015    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11016$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11017fi
11018
11019
11020    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11021    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11022      # Do we have a bin/java?
11023      if test ! -x "$BOOT_JDK/bin/java"; then
11024        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11026        BOOT_JDK_FOUND=no
11027      else
11028        # Do we have a bin/javac?
11029        if test ! -x "$BOOT_JDK/bin/javac"; then
11030          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11031$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11032          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11033$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11034          BOOT_JDK_FOUND=no
11035        else
11036          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11037          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11038            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11040            BOOT_JDK_FOUND=no
11041          else
11042            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11043            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11044
11045            # Extra M4 quote needed to protect [] in grep expression.
11046            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11047            if test "x$FOUND_VERSION_78" = x; then
11048              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11049$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11050              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11051$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11052              BOOT_JDK_FOUND=no
11053            else
11054              # We're done! :-)
11055              BOOT_JDK_FOUND=yes
11056
11057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11058
11059  # Input might be given as Windows format, start by converting to
11060  # unix format.
11061  path="$BOOT_JDK"
11062  new_path=`$CYGPATH -u "$path"`
11063
11064  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11065  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11066  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11067  # "foo.exe" is OK but "foo" is an error.
11068  #
11069  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11070  # It is also a way to make sure we got the proper file name for the real test later on.
11071  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11072  if test "x$test_shortpath" = x; then
11073    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11074$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11075    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11076  fi
11077
11078  # Call helper function which possibly converts this using DOS-style short mode.
11079  # If so, the updated path is stored in $new_path.
11080
11081  input_path="$new_path"
11082  # Check if we need to convert this using DOS-style short mode. If the path
11083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11084  # take no chances and rewrite it.
11085  # Note: m4 eats our [], so we need to use [ and ] instead.
11086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11087  if test "x$has_forbidden_chars" != x; then
11088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11089    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11090    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11091    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11092      # Going to short mode and back again did indeed matter. Since short mode is
11093      # case insensitive, let's make it lowercase to improve readability.
11094      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11095      # Now convert it back to Unix-stile (cygpath)
11096      input_path=`$CYGPATH -u "$shortmode_path"`
11097      new_path="$input_path"
11098    fi
11099  fi
11100
11101  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11102  if test "x$test_cygdrive_prefix" = x; then
11103    # As a simple fix, exclude /usr/bin since it's not a real path.
11104    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11105      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11106      # a path prefixed by /cygdrive for fixpath to work.
11107      new_path="$CYGWIN_ROOT_PATH$input_path"
11108    fi
11109  fi
11110
11111
11112  if test "x$path" != "x$new_path"; then
11113    BOOT_JDK="$new_path"
11114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11115$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11116  fi
11117
11118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11119
11120  path="$BOOT_JDK"
11121  has_colon=`$ECHO $path | $GREP ^.:`
11122  new_path="$path"
11123  if test "x$has_colon" = x; then
11124    # Not in mixed or Windows style, start by that.
11125    new_path=`cmd //c echo $path`
11126  fi
11127
11128
11129  input_path="$new_path"
11130  # Check if we need to convert this using DOS-style short mode. If the path
11131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11132  # take no chances and rewrite it.
11133  # Note: m4 eats our [], so we need to use [ and ] instead.
11134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11135  if test "x$has_forbidden_chars" != x; then
11136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11137    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11138  fi
11139
11140
11141  windows_path="$new_path"
11142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11143    unix_path=`$CYGPATH -u "$windows_path"`
11144    new_path="$unix_path"
11145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11147    new_path="$unix_path"
11148  fi
11149
11150  if test "x$path" != "x$new_path"; then
11151    BOOT_JDK="$new_path"
11152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11153$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11154  fi
11155
11156  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11157  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11158
11159  else
11160    # We're on a posix platform. Hooray! :)
11161    path="$BOOT_JDK"
11162
11163    if test ! -f "$path" && test ! -d "$path"; then
11164      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11165    fi
11166
11167    has_space=`$ECHO "$path" | $GREP " "`
11168    if test "x$has_space" != x; then
11169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11170$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11171      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11172    fi
11173  fi
11174
11175              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11176$as_echo_n "checking for Boot JDK... " >&6; }
11177              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11178$as_echo "$BOOT_JDK" >&6; }
11179              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11180$as_echo_n "checking Boot JDK version... " >&6; }
11181              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11182              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11183$as_echo "$BOOT_JDK_VERSION" >&6; }
11184            fi # end check jdk version
11185          fi # end check rt.jar
11186        fi # end check javac
11187      fi # end check java
11188    fi # end check boot jdk found
11189  fi
11190
11191if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11192  # Having specified an argument which is incorrect will produce an instant failure;
11193  # we should not go on looking
11194  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11195fi
11196
11197# Test: Is bootjdk available from builddeps?
11198
11199  if test "x$BOOT_JDK_FOUND" = xno; then
11200    # Now execute the test
11201
11202
11203
11204    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11205        # Source the builddeps file again, to make sure it uses the latest variables!
11206        . $builddepsfile
11207        # Look for a target and build machine specific resource!
11208        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11209        if test "x$resource" = x; then
11210            # Ok, lets instead look for a target specific resource
11211            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11212        fi
11213        if test "x$resource" = x; then
11214            # Ok, lets instead look for a build specific resource
11215            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11216        fi
11217        if test "x$resource" = x; then
11218            # Ok, lets instead look for a generic resource
11219            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11220            resource=${builddep_bootjdk}
11221        fi
11222        if test "x$resource" != x; then
11223            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11224$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11225	    # If the resource in the builddeps.conf file is an existing directory,
11226	    # for example /java/linux/cups
11227	    if test -d ${resource}; then
11228	       depdir=${resource}
11229	    else
11230
11231# bootjdk is for example mymodule
11232# $resource is for example libs/general/libmymod_1_2_3.zip
11233# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11234# $with_builddeps_dir is for example /localhome/builddeps
11235# depdir is the name of the variable into which we store the depdir, eg MYMOD
11236# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11237# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11238    filename=`basename $resource`
11239    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11240    filebase=${filename%%.*}
11241    extension=${filename#*.}
11242    installdir=$with_builddeps_dir/$filebase
11243    if test ! -f $installdir/$filename.unpacked; then
11244        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11245$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11246        if test ! -d $installdir; then
11247            mkdir -p $installdir
11248        fi
11249        if test ! -d $installdir; then
11250            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11251        fi
11252        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11253        touch $tmpfile
11254        if test ! -f $tmpfile; then
11255            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11256        fi
11257
11258    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11259    # $tmpfile is the local file name for the downloaded file.
11260    VALID_TOOL=no
11261    if test "x$BDEPS_FTP" = xwget; then
11262       VALID_TOOL=yes
11263       wget -O $tmpfile $with_builddeps_server/$resource
11264    fi
11265    if test "x$BDEPS_FTP" = xlftp; then
11266       VALID_TOOL=yes
11267       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11268    fi
11269    if test "x$BDEPS_FTP" = xftp; then
11270        VALID_TOOL=yes
11271        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11272        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11273        FTPUSERPWD=${FTPSERVER%%@*}
11274        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11275            FTPUSER=${userpwd%%:*}
11276            FTPPWD=${userpwd#*@}
11277            FTPSERVER=${FTPSERVER#*@}
11278        else
11279            FTPUSER=ftp
11280            FTPPWD=ftp
11281        fi
11282        # the "pass" command does not work on some
11283        # ftp clients (read ftp.exe) but if it works,
11284        # passive mode is better!
11285        (\
11286            echo "user $FTPUSER $FTPPWD"        ;\
11287            echo "pass"                         ;\
11288            echo "bin"                          ;\
11289            echo "get $FTPPATH $tmpfile"              ;\
11290        ) | ftp -in $FTPSERVER
11291    fi
11292    if test "x$VALID_TOOL" != xyes; then
11293       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11294    fi
11295
11296        mv $tmpfile $installdir/$filename
11297        if test ! -s $installdir/$filename; then
11298            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11299        fi
11300        case "$extension" in
11301            zip)  echo "Unzipping $installdir/$filename..."
11302               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11303            ;;
11304            tar.gz) echo "Untaring $installdir/$filename..."
11305               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11306            ;;
11307            tgz) echo "Untaring $installdir/$filename..."
11308               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11309            ;;
11310            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11311            ;;
11312        esac
11313    fi
11314    if test -f $installdir/$filename.unpacked; then
11315        depdir=$installdir
11316    fi
11317
11318	    fi
11319            # Source the builddeps file again, because in the previous command, the depdir
11320            # was updated to point at the current build dependency install directory.
11321            . $builddepsfile
11322            # Now extract variables from the builddeps.conf files.
11323            theroot=${builddep_bootjdk_ROOT}
11324            thecflags=${builddep_bootjdk_CFLAGS}
11325            thelibs=${builddep_bootjdk_LIBS}
11326            if test "x$depdir" = x; then
11327                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11328            fi
11329            BOOT_JDK=$depdir
11330            if test "x$theroot" != x; then
11331               BOOT_JDK="$theroot"
11332            fi
11333            if test "x$thecflags" != x; then
11334               BOOT_JDK_CFLAGS="$thecflags"
11335            fi
11336            if test "x$thelibs" != x; then
11337               BOOT_JDK_LIBS="$thelibs"
11338            fi
11339            BOOT_JDK_FOUND=maybe
11340            else BOOT_JDK_FOUND=no
11341
11342        fi
11343        else BOOT_JDK_FOUND=no
11344
11345    fi
11346
11347
11348
11349    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11350    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11351      # Do we have a bin/java?
11352      if test ! -x "$BOOT_JDK/bin/java"; then
11353        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11354$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11355        BOOT_JDK_FOUND=no
11356      else
11357        # Do we have a bin/javac?
11358        if test ! -x "$BOOT_JDK/bin/javac"; then
11359          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11360$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11361          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11362$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11363          BOOT_JDK_FOUND=no
11364        else
11365          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11366          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11367            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11369            BOOT_JDK_FOUND=no
11370          else
11371            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11372            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11373
11374            # Extra M4 quote needed to protect [] in grep expression.
11375            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11376            if test "x$FOUND_VERSION_78" = x; then
11377              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11378$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11379              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11380$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11381              BOOT_JDK_FOUND=no
11382            else
11383              # We're done! :-)
11384              BOOT_JDK_FOUND=yes
11385
11386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11387
11388  # Input might be given as Windows format, start by converting to
11389  # unix format.
11390  path="$BOOT_JDK"
11391  new_path=`$CYGPATH -u "$path"`
11392
11393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11396  # "foo.exe" is OK but "foo" is an error.
11397  #
11398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11399  # It is also a way to make sure we got the proper file name for the real test later on.
11400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11401  if test "x$test_shortpath" = x; then
11402    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11403$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11404    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11405  fi
11406
11407  # Call helper function which possibly converts this using DOS-style short mode.
11408  # If so, the updated path is stored in $new_path.
11409
11410  input_path="$new_path"
11411  # Check if we need to convert this using DOS-style short mode. If the path
11412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11413  # take no chances and rewrite it.
11414  # Note: m4 eats our [], so we need to use [ and ] instead.
11415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11416  if test "x$has_forbidden_chars" != x; then
11417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11421      # Going to short mode and back again did indeed matter. Since short mode is
11422      # case insensitive, let's make it lowercase to improve readability.
11423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11424      # Now convert it back to Unix-stile (cygpath)
11425      input_path=`$CYGPATH -u "$shortmode_path"`
11426      new_path="$input_path"
11427    fi
11428  fi
11429
11430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11431  if test "x$test_cygdrive_prefix" = x; then
11432    # As a simple fix, exclude /usr/bin since it's not a real path.
11433    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11435      # a path prefixed by /cygdrive for fixpath to work.
11436      new_path="$CYGWIN_ROOT_PATH$input_path"
11437    fi
11438  fi
11439
11440
11441  if test "x$path" != "x$new_path"; then
11442    BOOT_JDK="$new_path"
11443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11444$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11445  fi
11446
11447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11448
11449  path="$BOOT_JDK"
11450  has_colon=`$ECHO $path | $GREP ^.:`
11451  new_path="$path"
11452  if test "x$has_colon" = x; then
11453    # Not in mixed or Windows style, start by that.
11454    new_path=`cmd //c echo $path`
11455  fi
11456
11457
11458  input_path="$new_path"
11459  # Check if we need to convert this using DOS-style short mode. If the path
11460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11461  # take no chances and rewrite it.
11462  # Note: m4 eats our [], so we need to use [ and ] instead.
11463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11464  if test "x$has_forbidden_chars" != x; then
11465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11467  fi
11468
11469
11470  windows_path="$new_path"
11471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11472    unix_path=`$CYGPATH -u "$windows_path"`
11473    new_path="$unix_path"
11474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11476    new_path="$unix_path"
11477  fi
11478
11479  if test "x$path" != "x$new_path"; then
11480    BOOT_JDK="$new_path"
11481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11482$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11483  fi
11484
11485  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11486  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11487
11488  else
11489    # We're on a posix platform. Hooray! :)
11490    path="$BOOT_JDK"
11491
11492    if test ! -f "$path" && test ! -d "$path"; then
11493      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11494    fi
11495
11496    has_space=`$ECHO "$path" | $GREP " "`
11497    if test "x$has_space" != x; then
11498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11499$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11500      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11501    fi
11502  fi
11503
11504              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11505$as_echo_n "checking for Boot JDK... " >&6; }
11506              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11507$as_echo "$BOOT_JDK" >&6; }
11508              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11509$as_echo_n "checking Boot JDK version... " >&6; }
11510              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11511              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11512$as_echo "$BOOT_JDK_VERSION" >&6; }
11513            fi # end check jdk version
11514          fi # end check rt.jar
11515        fi # end check javac
11516      fi # end check java
11517    fi # end check boot jdk found
11518  fi
11519
11520
11521# Test: Is $JAVA_HOME set?
11522
11523  if test "x$BOOT_JDK_FOUND" = xno; then
11524    # Now execute the test
11525
11526    if test "x$JAVA_HOME" != x; then
11527        JAVA_HOME_PROCESSED="$JAVA_HOME"
11528
11529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11530
11531  # Input might be given as Windows format, start by converting to
11532  # unix format.
11533  path="$JAVA_HOME_PROCESSED"
11534  new_path=`$CYGPATH -u "$path"`
11535
11536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11539  # "foo.exe" is OK but "foo" is an error.
11540  #
11541  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11542  # It is also a way to make sure we got the proper file name for the real test later on.
11543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11544  if test "x$test_shortpath" = x; then
11545    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11546$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11547    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11548  fi
11549
11550  # Call helper function which possibly converts this using DOS-style short mode.
11551  # If so, the updated path is stored in $new_path.
11552
11553  input_path="$new_path"
11554  # Check if we need to convert this using DOS-style short mode. If the path
11555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11556  # take no chances and rewrite it.
11557  # Note: m4 eats our [], so we need to use [ and ] instead.
11558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11559  if test "x$has_forbidden_chars" != x; then
11560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11564      # Going to short mode and back again did indeed matter. Since short mode is
11565      # case insensitive, let's make it lowercase to improve readability.
11566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11567      # Now convert it back to Unix-stile (cygpath)
11568      input_path=`$CYGPATH -u "$shortmode_path"`
11569      new_path="$input_path"
11570    fi
11571  fi
11572
11573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11574  if test "x$test_cygdrive_prefix" = x; then
11575    # As a simple fix, exclude /usr/bin since it's not a real path.
11576    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11578      # a path prefixed by /cygdrive for fixpath to work.
11579      new_path="$CYGWIN_ROOT_PATH$input_path"
11580    fi
11581  fi
11582
11583
11584  if test "x$path" != "x$new_path"; then
11585    JAVA_HOME_PROCESSED="$new_path"
11586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11587$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11588  fi
11589
11590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11591
11592  path="$JAVA_HOME_PROCESSED"
11593  has_colon=`$ECHO $path | $GREP ^.:`
11594  new_path="$path"
11595  if test "x$has_colon" = x; then
11596    # Not in mixed or Windows style, start by that.
11597    new_path=`cmd //c echo $path`
11598  fi
11599
11600
11601  input_path="$new_path"
11602  # Check if we need to convert this using DOS-style short mode. If the path
11603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11604  # take no chances and rewrite it.
11605  # Note: m4 eats our [], so we need to use [ and ] instead.
11606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11607  if test "x$has_forbidden_chars" != x; then
11608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11610  fi
11611
11612
11613  windows_path="$new_path"
11614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11615    unix_path=`$CYGPATH -u "$windows_path"`
11616    new_path="$unix_path"
11617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11619    new_path="$unix_path"
11620  fi
11621
11622  if test "x$path" != "x$new_path"; then
11623    JAVA_HOME_PROCESSED="$new_path"
11624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11625$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11626  fi
11627
11628  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11629  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11630
11631  else
11632    # We're on a posix platform. Hooray! :)
11633    path="$JAVA_HOME_PROCESSED"
11634
11635    if test ! -f "$path" && test ! -d "$path"; then
11636      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11637    fi
11638
11639    has_space=`$ECHO "$path" | $GREP " "`
11640    if test "x$has_space" != x; then
11641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11642$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11643      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11644    fi
11645  fi
11646
11647        if test ! -d "$JAVA_HOME_PROCESSED"; then
11648            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11649$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11650        else
11651          # Aha, the user has set a JAVA_HOME
11652          # let us use that as the Boot JDK.
11653          BOOT_JDK="$JAVA_HOME_PROCESSED"
11654          BOOT_JDK_FOUND=maybe
11655          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11656$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11657        fi
11658    fi
11659
11660
11661    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11662    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11663      # Do we have a bin/java?
11664      if test ! -x "$BOOT_JDK/bin/java"; then
11665        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11666$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11667        BOOT_JDK_FOUND=no
11668      else
11669        # Do we have a bin/javac?
11670        if test ! -x "$BOOT_JDK/bin/javac"; then
11671          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11672$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11673          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11674$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11675          BOOT_JDK_FOUND=no
11676        else
11677          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11678          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11679            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11681            BOOT_JDK_FOUND=no
11682          else
11683            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11684            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11685
11686            # Extra M4 quote needed to protect [] in grep expression.
11687            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11688            if test "x$FOUND_VERSION_78" = x; then
11689              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11691              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11692$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11693              BOOT_JDK_FOUND=no
11694            else
11695              # We're done! :-)
11696              BOOT_JDK_FOUND=yes
11697
11698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11699
11700  # Input might be given as Windows format, start by converting to
11701  # unix format.
11702  path="$BOOT_JDK"
11703  new_path=`$CYGPATH -u "$path"`
11704
11705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11708  # "foo.exe" is OK but "foo" is an error.
11709  #
11710  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11711  # It is also a way to make sure we got the proper file name for the real test later on.
11712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11713  if test "x$test_shortpath" = x; then
11714    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11715$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11716    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11717  fi
11718
11719  # Call helper function which possibly converts this using DOS-style short mode.
11720  # If so, the updated path is stored in $new_path.
11721
11722  input_path="$new_path"
11723  # Check if we need to convert this using DOS-style short mode. If the path
11724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11725  # take no chances and rewrite it.
11726  # Note: m4 eats our [], so we need to use [ and ] instead.
11727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11728  if test "x$has_forbidden_chars" != x; then
11729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11730    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11731    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11732    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11733      # Going to short mode and back again did indeed matter. Since short mode is
11734      # case insensitive, let's make it lowercase to improve readability.
11735      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11736      # Now convert it back to Unix-stile (cygpath)
11737      input_path=`$CYGPATH -u "$shortmode_path"`
11738      new_path="$input_path"
11739    fi
11740  fi
11741
11742  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11743  if test "x$test_cygdrive_prefix" = x; then
11744    # As a simple fix, exclude /usr/bin since it's not a real path.
11745    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11746      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11747      # a path prefixed by /cygdrive for fixpath to work.
11748      new_path="$CYGWIN_ROOT_PATH$input_path"
11749    fi
11750  fi
11751
11752
11753  if test "x$path" != "x$new_path"; then
11754    BOOT_JDK="$new_path"
11755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11756$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11757  fi
11758
11759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11760
11761  path="$BOOT_JDK"
11762  has_colon=`$ECHO $path | $GREP ^.:`
11763  new_path="$path"
11764  if test "x$has_colon" = x; then
11765    # Not in mixed or Windows style, start by that.
11766    new_path=`cmd //c echo $path`
11767  fi
11768
11769
11770  input_path="$new_path"
11771  # Check if we need to convert this using DOS-style short mode. If the path
11772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11773  # take no chances and rewrite it.
11774  # Note: m4 eats our [], so we need to use [ and ] instead.
11775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11776  if test "x$has_forbidden_chars" != x; then
11777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11778    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11779  fi
11780
11781
11782  windows_path="$new_path"
11783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11784    unix_path=`$CYGPATH -u "$windows_path"`
11785    new_path="$unix_path"
11786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11788    new_path="$unix_path"
11789  fi
11790
11791  if test "x$path" != "x$new_path"; then
11792    BOOT_JDK="$new_path"
11793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11794$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11795  fi
11796
11797  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11798  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11799
11800  else
11801    # We're on a posix platform. Hooray! :)
11802    path="$BOOT_JDK"
11803
11804    if test ! -f "$path" && test ! -d "$path"; then
11805      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11806    fi
11807
11808    has_space=`$ECHO "$path" | $GREP " "`
11809    if test "x$has_space" != x; then
11810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11811$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11812      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11813    fi
11814  fi
11815
11816              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11817$as_echo_n "checking for Boot JDK... " >&6; }
11818              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11819$as_echo "$BOOT_JDK" >&6; }
11820              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11821$as_echo_n "checking Boot JDK version... " >&6; }
11822              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11823              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11824$as_echo "$BOOT_JDK_VERSION" >&6; }
11825            fi # end check jdk version
11826          fi # end check rt.jar
11827        fi # end check javac
11828      fi # end check java
11829    fi # end check boot jdk found
11830  fi
11831
11832
11833# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11834
11835  if test "x$BOOT_JDK_FOUND" = xno; then
11836    # Now execute the test
11837
11838    if test -x /usr/libexec/java_home; then
11839        BOOT_JDK=`/usr/libexec/java_home`
11840        BOOT_JDK_FOUND=maybe
11841        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11842$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11843    fi
11844
11845
11846    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11847    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11848      # Do we have a bin/java?
11849      if test ! -x "$BOOT_JDK/bin/java"; then
11850        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11852        BOOT_JDK_FOUND=no
11853      else
11854        # Do we have a bin/javac?
11855        if test ! -x "$BOOT_JDK/bin/javac"; then
11856          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11858          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11859$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11860          BOOT_JDK_FOUND=no
11861        else
11862          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11863          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11864            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11865$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11866            BOOT_JDK_FOUND=no
11867          else
11868            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11869            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11870
11871            # Extra M4 quote needed to protect [] in grep expression.
11872            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11873            if test "x$FOUND_VERSION_78" = x; then
11874              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11876              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11877$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11878              BOOT_JDK_FOUND=no
11879            else
11880              # We're done! :-)
11881              BOOT_JDK_FOUND=yes
11882
11883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11884
11885  # Input might be given as Windows format, start by converting to
11886  # unix format.
11887  path="$BOOT_JDK"
11888  new_path=`$CYGPATH -u "$path"`
11889
11890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11893  # "foo.exe" is OK but "foo" is an error.
11894  #
11895  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11896  # It is also a way to make sure we got the proper file name for the real test later on.
11897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11898  if test "x$test_shortpath" = x; then
11899    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11900$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11901    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11902  fi
11903
11904  # Call helper function which possibly converts this using DOS-style short mode.
11905  # If so, the updated path is stored in $new_path.
11906
11907  input_path="$new_path"
11908  # Check if we need to convert this using DOS-style short mode. If the path
11909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11910  # take no chances and rewrite it.
11911  # Note: m4 eats our [], so we need to use [ and ] instead.
11912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11913  if test "x$has_forbidden_chars" != x; then
11914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11918      # Going to short mode and back again did indeed matter. Since short mode is
11919      # case insensitive, let's make it lowercase to improve readability.
11920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11921      # Now convert it back to Unix-stile (cygpath)
11922      input_path=`$CYGPATH -u "$shortmode_path"`
11923      new_path="$input_path"
11924    fi
11925  fi
11926
11927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11928  if test "x$test_cygdrive_prefix" = x; then
11929    # As a simple fix, exclude /usr/bin since it's not a real path.
11930    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11932      # a path prefixed by /cygdrive for fixpath to work.
11933      new_path="$CYGWIN_ROOT_PATH$input_path"
11934    fi
11935  fi
11936
11937
11938  if test "x$path" != "x$new_path"; then
11939    BOOT_JDK="$new_path"
11940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11941$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11942  fi
11943
11944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11945
11946  path="$BOOT_JDK"
11947  has_colon=`$ECHO $path | $GREP ^.:`
11948  new_path="$path"
11949  if test "x$has_colon" = x; then
11950    # Not in mixed or Windows style, start by that.
11951    new_path=`cmd //c echo $path`
11952  fi
11953
11954
11955  input_path="$new_path"
11956  # Check if we need to convert this using DOS-style short mode. If the path
11957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11958  # take no chances and rewrite it.
11959  # Note: m4 eats our [], so we need to use [ and ] instead.
11960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11961  if test "x$has_forbidden_chars" != x; then
11962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11964  fi
11965
11966
11967  windows_path="$new_path"
11968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11969    unix_path=`$CYGPATH -u "$windows_path"`
11970    new_path="$unix_path"
11971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11973    new_path="$unix_path"
11974  fi
11975
11976  if test "x$path" != "x$new_path"; then
11977    BOOT_JDK="$new_path"
11978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11979$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11980  fi
11981
11982  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11983  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11984
11985  else
11986    # We're on a posix platform. Hooray! :)
11987    path="$BOOT_JDK"
11988
11989    if test ! -f "$path" && test ! -d "$path"; then
11990      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11991    fi
11992
11993    has_space=`$ECHO "$path" | $GREP " "`
11994    if test "x$has_space" != x; then
11995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11996$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11997      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11998    fi
11999  fi
12000
12001              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12002$as_echo_n "checking for Boot JDK... " >&6; }
12003              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12004$as_echo "$BOOT_JDK" >&6; }
12005              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12006$as_echo_n "checking Boot JDK version... " >&6; }
12007              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12008              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12009$as_echo "$BOOT_JDK_VERSION" >&6; }
12010            fi # end check jdk version
12011          fi # end check rt.jar
12012        fi # end check javac
12013      fi # end check java
12014    fi # end check boot jdk found
12015  fi
12016
12017
12018# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12019
12020  if test "x$BOOT_JDK_FOUND" = xno; then
12021    # Now execute the test
12022
12023    # Extract the first word of "javac", so it can be a program name with args.
12024set dummy javac; ac_word=$2
12025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12026$as_echo_n "checking for $ac_word... " >&6; }
12027if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
12028  $as_echo_n "(cached) " >&6
12029else
12030  case $JAVAC_CHECK in
12031  [\\/]* | ?:[\\/]*)
12032  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12033  ;;
12034  *)
12035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12036for as_dir in $PATH
12037do
12038  IFS=$as_save_IFS
12039  test -z "$as_dir" && as_dir=.
12040    for ac_exec_ext in '' $ac_executable_extensions; do
12041  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12042    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12044    break 2
12045  fi
12046done
12047  done
12048IFS=$as_save_IFS
12049
12050  ;;
12051esac
12052fi
12053JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12054if test -n "$JAVAC_CHECK"; then
12055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12056$as_echo "$JAVAC_CHECK" >&6; }
12057else
12058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12059$as_echo "no" >&6; }
12060fi
12061
12062
12063    # Extract the first word of "java", so it can be a program name with args.
12064set dummy java; ac_word=$2
12065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12066$as_echo_n "checking for $ac_word... " >&6; }
12067if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12068  $as_echo_n "(cached) " >&6
12069else
12070  case $JAVA_CHECK in
12071  [\\/]* | ?:[\\/]*)
12072  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12073  ;;
12074  *)
12075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12076for as_dir in $PATH
12077do
12078  IFS=$as_save_IFS
12079  test -z "$as_dir" && as_dir=.
12080    for ac_exec_ext in '' $ac_executable_extensions; do
12081  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12082    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12084    break 2
12085  fi
12086done
12087  done
12088IFS=$as_save_IFS
12089
12090  ;;
12091esac
12092fi
12093JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12094if test -n "$JAVA_CHECK"; then
12095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12096$as_echo "$JAVA_CHECK" >&6; }
12097else
12098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12099$as_echo "no" >&6; }
12100fi
12101
12102
12103    BINARY="$JAVAC_CHECK"
12104    if test "x$JAVAC_CHECK" = x; then
12105        BINARY="$JAVA_CHECK"
12106    fi
12107    if test "x$BINARY" != x; then
12108        # So there is a java(c) binary, it might be part of a JDK.
12109        # Lets find the JDK/JRE directory by following symbolic links.
12110        # Linux/GNU systems often have links from /usr/bin/java to
12111        # /etc/alternatives/java to the real JDK binary.
12112
12113    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12114        # Follow a chain of symbolic links. Use readlink
12115        # where it exists, else fall back to horribly
12116        # complicated shell code.
12117        if test "x$READLINK_TESTED" != yes; then
12118            # On MacOSX there is a readlink tool with a different
12119            # purpose than the GNU readlink tool. Check the found readlink.
12120            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12121            if test "x$ISGNU" = x; then
12122                 # A readlink that we do not know how to use.
12123                 # Are there other non-GNU readlinks out there?
12124                 READLINK_TESTED=yes
12125                 READLINK=
12126            fi
12127        fi
12128
12129        if test "x$READLINK" != x; then
12130            BINARY=`$READLINK -f $BINARY`
12131        else
12132            # Save the current directory for restoring afterwards
12133            STARTDIR=$PWD
12134            COUNTER=0
12135            sym_link_dir=`$DIRNAME $BINARY`
12136            sym_link_file=`$BASENAME $BINARY`
12137            # Use the system pwd and not the shell builtin to resolve directory symlinks
12138            cd $sym_link_dir
12139            cd `$THEPWDCMD`
12140            sym_link_dir=`$THEPWDCMD`
12141            # Resolve file symlinks
12142            while test $COUNTER -lt 20; do
12143                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12144                if test "x$ISLINK" == x; then
12145                    # This is not a symbolic link! We are done!
12146                    break
12147                fi
12148                # Again resolve directory symlinks since the target of the just found
12149                # link could be in a different directory
12150                cd `$DIRNAME $ISLINK`
12151                sym_link_dir=`$THEPWDCMD`
12152                sym_link_file=`$BASENAME $ISLINK`
12153                let COUNTER=COUNTER+1
12154            done
12155            cd $STARTDIR
12156            BINARY=$sym_link_dir/$sym_link_file
12157        fi
12158    fi
12159
12160        BOOT_JDK=`dirname "$BINARY"`
12161        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12162        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12163            # Looks like we found ourselves an JDK
12164            BOOT_JDK_FOUND=maybe
12165            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12166$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12167        fi
12168    fi
12169
12170
12171    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12172    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12173      # Do we have a bin/java?
12174      if test ! -x "$BOOT_JDK/bin/java"; then
12175        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12177        BOOT_JDK_FOUND=no
12178      else
12179        # Do we have a bin/javac?
12180        if test ! -x "$BOOT_JDK/bin/javac"; then
12181          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12183          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12184$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12185          BOOT_JDK_FOUND=no
12186        else
12187          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12188          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12189            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12191            BOOT_JDK_FOUND=no
12192          else
12193            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12194            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12195
12196            # Extra M4 quote needed to protect [] in grep expression.
12197            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12198            if test "x$FOUND_VERSION_78" = x; then
12199              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12201              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12202$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12203              BOOT_JDK_FOUND=no
12204            else
12205              # We're done! :-)
12206              BOOT_JDK_FOUND=yes
12207
12208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12209
12210  # Input might be given as Windows format, start by converting to
12211  # unix format.
12212  path="$BOOT_JDK"
12213  new_path=`$CYGPATH -u "$path"`
12214
12215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12218  # "foo.exe" is OK but "foo" is an error.
12219  #
12220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12221  # It is also a way to make sure we got the proper file name for the real test later on.
12222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12223  if test "x$test_shortpath" = x; then
12224    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12226    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12227  fi
12228
12229  # Call helper function which possibly converts this using DOS-style short mode.
12230  # If so, the updated path is stored in $new_path.
12231
12232  input_path="$new_path"
12233  # Check if we need to convert this using DOS-style short mode. If the path
12234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12235  # take no chances and rewrite it.
12236  # Note: m4 eats our [], so we need to use [ and ] instead.
12237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12238  if test "x$has_forbidden_chars" != x; then
12239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12243      # Going to short mode and back again did indeed matter. Since short mode is
12244      # case insensitive, let's make it lowercase to improve readability.
12245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12246      # Now convert it back to Unix-stile (cygpath)
12247      input_path=`$CYGPATH -u "$shortmode_path"`
12248      new_path="$input_path"
12249    fi
12250  fi
12251
12252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12253  if test "x$test_cygdrive_prefix" = x; then
12254    # As a simple fix, exclude /usr/bin since it's not a real path.
12255    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12257      # a path prefixed by /cygdrive for fixpath to work.
12258      new_path="$CYGWIN_ROOT_PATH$input_path"
12259    fi
12260  fi
12261
12262
12263  if test "x$path" != "x$new_path"; then
12264    BOOT_JDK="$new_path"
12265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12267  fi
12268
12269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12270
12271  path="$BOOT_JDK"
12272  has_colon=`$ECHO $path | $GREP ^.:`
12273  new_path="$path"
12274  if test "x$has_colon" = x; then
12275    # Not in mixed or Windows style, start by that.
12276    new_path=`cmd //c echo $path`
12277  fi
12278
12279
12280  input_path="$new_path"
12281  # Check if we need to convert this using DOS-style short mode. If the path
12282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12283  # take no chances and rewrite it.
12284  # Note: m4 eats our [], so we need to use [ and ] instead.
12285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12286  if test "x$has_forbidden_chars" != x; then
12287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12289  fi
12290
12291
12292  windows_path="$new_path"
12293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12294    unix_path=`$CYGPATH -u "$windows_path"`
12295    new_path="$unix_path"
12296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12298    new_path="$unix_path"
12299  fi
12300
12301  if test "x$path" != "x$new_path"; then
12302    BOOT_JDK="$new_path"
12303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12304$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12305  fi
12306
12307  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12308  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12309
12310  else
12311    # We're on a posix platform. Hooray! :)
12312    path="$BOOT_JDK"
12313
12314    if test ! -f "$path" && test ! -d "$path"; then
12315      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12316    fi
12317
12318    has_space=`$ECHO "$path" | $GREP " "`
12319    if test "x$has_space" != x; then
12320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12321$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12322      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12323    fi
12324  fi
12325
12326              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12327$as_echo_n "checking for Boot JDK... " >&6; }
12328              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12329$as_echo "$BOOT_JDK" >&6; }
12330              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12331$as_echo_n "checking Boot JDK version... " >&6; }
12332              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12333              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12334$as_echo "$BOOT_JDK_VERSION" >&6; }
12335            fi # end check jdk version
12336          fi # end check rt.jar
12337        fi # end check javac
12338      fi # end check java
12339    fi # end check boot jdk found
12340  fi
12341
12342
12343# Test: Is there a JDK installed in default, well-known locations?
12344
12345  if test "x$BOOT_JDK_FOUND" = xno; then
12346    # Now execute the test
12347
12348  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12349
12350  if test "x$BOOT_JDK_FOUND" = xno; then
12351    # Now execute the test
12352
12353  if test "x$ProgramW6432" != x; then
12354    VIRTUAL_DIR="$ProgramW6432/Java"
12355
12356  windows_path="$VIRTUAL_DIR"
12357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12358    unix_path=`$CYGPATH -u "$windows_path"`
12359    VIRTUAL_DIR="$unix_path"
12360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12362    VIRTUAL_DIR="$unix_path"
12363  fi
12364
12365
12366  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12367  BOOT_JDK_SUFFIX=""
12368  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12369  if test "x$ALL_JDKS_FOUND" != x; then
12370    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12371
12372  if test "x$BOOT_JDK_FOUND" = xno; then
12373    # Now execute the test
12374
12375        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12376        if test -d "$BOOT_JDK"; then
12377          BOOT_JDK_FOUND=maybe
12378          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12379$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12380        fi
12381
12382
12383    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12384    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12385      # Do we have a bin/java?
12386      if test ! -x "$BOOT_JDK/bin/java"; then
12387        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12388$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12389        BOOT_JDK_FOUND=no
12390      else
12391        # Do we have a bin/javac?
12392        if test ! -x "$BOOT_JDK/bin/javac"; then
12393          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12395          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12396$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12397          BOOT_JDK_FOUND=no
12398        else
12399          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12400          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12401            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12403            BOOT_JDK_FOUND=no
12404          else
12405            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12406            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12407
12408            # Extra M4 quote needed to protect [] in grep expression.
12409            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12410            if test "x$FOUND_VERSION_78" = x; then
12411              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12412$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12413              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12414$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12415              BOOT_JDK_FOUND=no
12416            else
12417              # We're done! :-)
12418              BOOT_JDK_FOUND=yes
12419
12420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12421
12422  # Input might be given as Windows format, start by converting to
12423  # unix format.
12424  path="$BOOT_JDK"
12425  new_path=`$CYGPATH -u "$path"`
12426
12427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12430  # "foo.exe" is OK but "foo" is an error.
12431  #
12432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12433  # It is also a way to make sure we got the proper file name for the real test later on.
12434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12435  if test "x$test_shortpath" = x; then
12436    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12437$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12438    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12439  fi
12440
12441  # Call helper function which possibly converts this using DOS-style short mode.
12442  # If so, the updated path is stored in $new_path.
12443
12444  input_path="$new_path"
12445  # Check if we need to convert this using DOS-style short mode. If the path
12446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12447  # take no chances and rewrite it.
12448  # Note: m4 eats our [], so we need to use [ and ] instead.
12449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12450  if test "x$has_forbidden_chars" != x; then
12451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12455      # Going to short mode and back again did indeed matter. Since short mode is
12456      # case insensitive, let's make it lowercase to improve readability.
12457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12458      # Now convert it back to Unix-stile (cygpath)
12459      input_path=`$CYGPATH -u "$shortmode_path"`
12460      new_path="$input_path"
12461    fi
12462  fi
12463
12464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12465  if test "x$test_cygdrive_prefix" = x; then
12466    # As a simple fix, exclude /usr/bin since it's not a real path.
12467    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12469      # a path prefixed by /cygdrive for fixpath to work.
12470      new_path="$CYGWIN_ROOT_PATH$input_path"
12471    fi
12472  fi
12473
12474
12475  if test "x$path" != "x$new_path"; then
12476    BOOT_JDK="$new_path"
12477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12478$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12479  fi
12480
12481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12482
12483  path="$BOOT_JDK"
12484  has_colon=`$ECHO $path | $GREP ^.:`
12485  new_path="$path"
12486  if test "x$has_colon" = x; then
12487    # Not in mixed or Windows style, start by that.
12488    new_path=`cmd //c echo $path`
12489  fi
12490
12491
12492  input_path="$new_path"
12493  # Check if we need to convert this using DOS-style short mode. If the path
12494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12495  # take no chances and rewrite it.
12496  # Note: m4 eats our [], so we need to use [ and ] instead.
12497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12498  if test "x$has_forbidden_chars" != x; then
12499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12501  fi
12502
12503
12504  windows_path="$new_path"
12505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12506    unix_path=`$CYGPATH -u "$windows_path"`
12507    new_path="$unix_path"
12508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12510    new_path="$unix_path"
12511  fi
12512
12513  if test "x$path" != "x$new_path"; then
12514    BOOT_JDK="$new_path"
12515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12516$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12517  fi
12518
12519  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12520  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12521
12522  else
12523    # We're on a posix platform. Hooray! :)
12524    path="$BOOT_JDK"
12525
12526    if test ! -f "$path" && test ! -d "$path"; then
12527      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12528    fi
12529
12530    has_space=`$ECHO "$path" | $GREP " "`
12531    if test "x$has_space" != x; then
12532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12533$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12534      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12535    fi
12536  fi
12537
12538              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12539$as_echo_n "checking for Boot JDK... " >&6; }
12540              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12541$as_echo "$BOOT_JDK" >&6; }
12542              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12543$as_echo_n "checking Boot JDK version... " >&6; }
12544              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12545              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12546$as_echo "$BOOT_JDK_VERSION" >&6; }
12547            fi # end check jdk version
12548          fi # end check rt.jar
12549        fi # end check javac
12550      fi # end check java
12551    fi # end check boot jdk found
12552  fi
12553
12554    done
12555  fi
12556
12557  fi
12558
12559
12560    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12561    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12562      # Do we have a bin/java?
12563      if test ! -x "$BOOT_JDK/bin/java"; then
12564        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12565$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12566        BOOT_JDK_FOUND=no
12567      else
12568        # Do we have a bin/javac?
12569        if test ! -x "$BOOT_JDK/bin/javac"; then
12570          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12572          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12573$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12574          BOOT_JDK_FOUND=no
12575        else
12576          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12577          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12578            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12580            BOOT_JDK_FOUND=no
12581          else
12582            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12583            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12584
12585            # Extra M4 quote needed to protect [] in grep expression.
12586            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12587            if test "x$FOUND_VERSION_78" = x; then
12588              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12590              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12591$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12592              BOOT_JDK_FOUND=no
12593            else
12594              # We're done! :-)
12595              BOOT_JDK_FOUND=yes
12596
12597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12598
12599  # Input might be given as Windows format, start by converting to
12600  # unix format.
12601  path="$BOOT_JDK"
12602  new_path=`$CYGPATH -u "$path"`
12603
12604  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12605  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12606  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12607  # "foo.exe" is OK but "foo" is an error.
12608  #
12609  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12610  # It is also a way to make sure we got the proper file name for the real test later on.
12611  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12612  if test "x$test_shortpath" = x; then
12613    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12614$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12615    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12616  fi
12617
12618  # Call helper function which possibly converts this using DOS-style short mode.
12619  # If so, the updated path is stored in $new_path.
12620
12621  input_path="$new_path"
12622  # Check if we need to convert this using DOS-style short mode. If the path
12623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12624  # take no chances and rewrite it.
12625  # Note: m4 eats our [], so we need to use [ and ] instead.
12626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12627  if test "x$has_forbidden_chars" != x; then
12628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12629    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12630    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12631    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12632      # Going to short mode and back again did indeed matter. Since short mode is
12633      # case insensitive, let's make it lowercase to improve readability.
12634      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12635      # Now convert it back to Unix-stile (cygpath)
12636      input_path=`$CYGPATH -u "$shortmode_path"`
12637      new_path="$input_path"
12638    fi
12639  fi
12640
12641  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12642  if test "x$test_cygdrive_prefix" = x; then
12643    # As a simple fix, exclude /usr/bin since it's not a real path.
12644    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12645      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12646      # a path prefixed by /cygdrive for fixpath to work.
12647      new_path="$CYGWIN_ROOT_PATH$input_path"
12648    fi
12649  fi
12650
12651
12652  if test "x$path" != "x$new_path"; then
12653    BOOT_JDK="$new_path"
12654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12655$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12656  fi
12657
12658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12659
12660  path="$BOOT_JDK"
12661  has_colon=`$ECHO $path | $GREP ^.:`
12662  new_path="$path"
12663  if test "x$has_colon" = x; then
12664    # Not in mixed or Windows style, start by that.
12665    new_path=`cmd //c echo $path`
12666  fi
12667
12668
12669  input_path="$new_path"
12670  # Check if we need to convert this using DOS-style short mode. If the path
12671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12672  # take no chances and rewrite it.
12673  # Note: m4 eats our [], so we need to use [ and ] instead.
12674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12675  if test "x$has_forbidden_chars" != x; then
12676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12677    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12678  fi
12679
12680
12681  windows_path="$new_path"
12682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12683    unix_path=`$CYGPATH -u "$windows_path"`
12684    new_path="$unix_path"
12685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12687    new_path="$unix_path"
12688  fi
12689
12690  if test "x$path" != "x$new_path"; then
12691    BOOT_JDK="$new_path"
12692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12693$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12694  fi
12695
12696  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12697  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12698
12699  else
12700    # We're on a posix platform. Hooray! :)
12701    path="$BOOT_JDK"
12702
12703    if test ! -f "$path" && test ! -d "$path"; then
12704      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12705    fi
12706
12707    has_space=`$ECHO "$path" | $GREP " "`
12708    if test "x$has_space" != x; then
12709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12710$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12711      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12712    fi
12713  fi
12714
12715              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12716$as_echo_n "checking for Boot JDK... " >&6; }
12717              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12718$as_echo "$BOOT_JDK" >&6; }
12719              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12720$as_echo_n "checking Boot JDK version... " >&6; }
12721              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12722              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12723$as_echo "$BOOT_JDK_VERSION" >&6; }
12724            fi # end check jdk version
12725          fi # end check rt.jar
12726        fi # end check javac
12727      fi # end check java
12728    fi # end check boot jdk found
12729  fi
12730
12731
12732  if test "x$BOOT_JDK_FOUND" = xno; then
12733    # Now execute the test
12734
12735  if test "x$PROGRAMW6432" != x; then
12736    VIRTUAL_DIR="$PROGRAMW6432/Java"
12737
12738  windows_path="$VIRTUAL_DIR"
12739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12740    unix_path=`$CYGPATH -u "$windows_path"`
12741    VIRTUAL_DIR="$unix_path"
12742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12744    VIRTUAL_DIR="$unix_path"
12745  fi
12746
12747
12748  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12749  BOOT_JDK_SUFFIX=""
12750  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12751  if test "x$ALL_JDKS_FOUND" != x; then
12752    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12753
12754  if test "x$BOOT_JDK_FOUND" = xno; then
12755    # Now execute the test
12756
12757        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12758        if test -d "$BOOT_JDK"; then
12759          BOOT_JDK_FOUND=maybe
12760          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12761$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12762        fi
12763
12764
12765    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12766    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12767      # Do we have a bin/java?
12768      if test ! -x "$BOOT_JDK/bin/java"; then
12769        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12771        BOOT_JDK_FOUND=no
12772      else
12773        # Do we have a bin/javac?
12774        if test ! -x "$BOOT_JDK/bin/javac"; then
12775          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12777          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12778$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12779          BOOT_JDK_FOUND=no
12780        else
12781          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12782          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12783            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12785            BOOT_JDK_FOUND=no
12786          else
12787            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12788            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12789
12790            # Extra M4 quote needed to protect [] in grep expression.
12791            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12792            if test "x$FOUND_VERSION_78" = x; then
12793              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12795              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12796$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12797              BOOT_JDK_FOUND=no
12798            else
12799              # We're done! :-)
12800              BOOT_JDK_FOUND=yes
12801
12802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12803
12804  # Input might be given as Windows format, start by converting to
12805  # unix format.
12806  path="$BOOT_JDK"
12807  new_path=`$CYGPATH -u "$path"`
12808
12809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12812  # "foo.exe" is OK but "foo" is an error.
12813  #
12814  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12815  # It is also a way to make sure we got the proper file name for the real test later on.
12816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12817  if test "x$test_shortpath" = x; then
12818    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12819$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12820    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12821  fi
12822
12823  # Call helper function which possibly converts this using DOS-style short mode.
12824  # If so, the updated path is stored in $new_path.
12825
12826  input_path="$new_path"
12827  # Check if we need to convert this using DOS-style short mode. If the path
12828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12829  # take no chances and rewrite it.
12830  # Note: m4 eats our [], so we need to use [ and ] instead.
12831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12832  if test "x$has_forbidden_chars" != x; then
12833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12837      # Going to short mode and back again did indeed matter. Since short mode is
12838      # case insensitive, let's make it lowercase to improve readability.
12839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12840      # Now convert it back to Unix-stile (cygpath)
12841      input_path=`$CYGPATH -u "$shortmode_path"`
12842      new_path="$input_path"
12843    fi
12844  fi
12845
12846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12847  if test "x$test_cygdrive_prefix" = x; then
12848    # As a simple fix, exclude /usr/bin since it's not a real path.
12849    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12851      # a path prefixed by /cygdrive for fixpath to work.
12852      new_path="$CYGWIN_ROOT_PATH$input_path"
12853    fi
12854  fi
12855
12856
12857  if test "x$path" != "x$new_path"; then
12858    BOOT_JDK="$new_path"
12859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12860$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12861  fi
12862
12863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12864
12865  path="$BOOT_JDK"
12866  has_colon=`$ECHO $path | $GREP ^.:`
12867  new_path="$path"
12868  if test "x$has_colon" = x; then
12869    # Not in mixed or Windows style, start by that.
12870    new_path=`cmd //c echo $path`
12871  fi
12872
12873
12874  input_path="$new_path"
12875  # Check if we need to convert this using DOS-style short mode. If the path
12876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12877  # take no chances and rewrite it.
12878  # Note: m4 eats our [], so we need to use [ and ] instead.
12879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12880  if test "x$has_forbidden_chars" != x; then
12881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12883  fi
12884
12885
12886  windows_path="$new_path"
12887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12888    unix_path=`$CYGPATH -u "$windows_path"`
12889    new_path="$unix_path"
12890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12892    new_path="$unix_path"
12893  fi
12894
12895  if test "x$path" != "x$new_path"; then
12896    BOOT_JDK="$new_path"
12897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12898$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12899  fi
12900
12901  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12902  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12903
12904  else
12905    # We're on a posix platform. Hooray! :)
12906    path="$BOOT_JDK"
12907
12908    if test ! -f "$path" && test ! -d "$path"; then
12909      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12910    fi
12911
12912    has_space=`$ECHO "$path" | $GREP " "`
12913    if test "x$has_space" != x; then
12914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12916      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12917    fi
12918  fi
12919
12920              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12921$as_echo_n "checking for Boot JDK... " >&6; }
12922              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12923$as_echo "$BOOT_JDK" >&6; }
12924              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12925$as_echo_n "checking Boot JDK version... " >&6; }
12926              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12927              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12928$as_echo "$BOOT_JDK_VERSION" >&6; }
12929            fi # end check jdk version
12930          fi # end check rt.jar
12931        fi # end check javac
12932      fi # end check java
12933    fi # end check boot jdk found
12934  fi
12935
12936    done
12937  fi
12938
12939  fi
12940
12941
12942    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12943    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12944      # Do we have a bin/java?
12945      if test ! -x "$BOOT_JDK/bin/java"; then
12946        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12948        BOOT_JDK_FOUND=no
12949      else
12950        # Do we have a bin/javac?
12951        if test ! -x "$BOOT_JDK/bin/javac"; then
12952          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12954          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12955$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12956          BOOT_JDK_FOUND=no
12957        else
12958          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12959          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12960            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12962            BOOT_JDK_FOUND=no
12963          else
12964            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12965            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12966
12967            # Extra M4 quote needed to protect [] in grep expression.
12968            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12969            if test "x$FOUND_VERSION_78" = x; then
12970              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12972              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12973$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12974              BOOT_JDK_FOUND=no
12975            else
12976              # We're done! :-)
12977              BOOT_JDK_FOUND=yes
12978
12979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12980
12981  # Input might be given as Windows format, start by converting to
12982  # unix format.
12983  path="$BOOT_JDK"
12984  new_path=`$CYGPATH -u "$path"`
12985
12986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12989  # "foo.exe" is OK but "foo" is an error.
12990  #
12991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12992  # It is also a way to make sure we got the proper file name for the real test later on.
12993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12994  if test "x$test_shortpath" = x; then
12995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12996$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12997    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12998  fi
12999
13000  # Call helper function which possibly converts this using DOS-style short mode.
13001  # If so, the updated path is stored in $new_path.
13002
13003  input_path="$new_path"
13004  # Check if we need to convert this using DOS-style short mode. If the path
13005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13006  # take no chances and rewrite it.
13007  # Note: m4 eats our [], so we need to use [ and ] instead.
13008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13009  if test "x$has_forbidden_chars" != x; then
13010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13014      # Going to short mode and back again did indeed matter. Since short mode is
13015      # case insensitive, let's make it lowercase to improve readability.
13016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13017      # Now convert it back to Unix-stile (cygpath)
13018      input_path=`$CYGPATH -u "$shortmode_path"`
13019      new_path="$input_path"
13020    fi
13021  fi
13022
13023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13024  if test "x$test_cygdrive_prefix" = x; then
13025    # As a simple fix, exclude /usr/bin since it's not a real path.
13026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13028      # a path prefixed by /cygdrive for fixpath to work.
13029      new_path="$CYGWIN_ROOT_PATH$input_path"
13030    fi
13031  fi
13032
13033
13034  if test "x$path" != "x$new_path"; then
13035    BOOT_JDK="$new_path"
13036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13037$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13038  fi
13039
13040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13041
13042  path="$BOOT_JDK"
13043  has_colon=`$ECHO $path | $GREP ^.:`
13044  new_path="$path"
13045  if test "x$has_colon" = x; then
13046    # Not in mixed or Windows style, start by that.
13047    new_path=`cmd //c echo $path`
13048  fi
13049
13050
13051  input_path="$new_path"
13052  # Check if we need to convert this using DOS-style short mode. If the path
13053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13054  # take no chances and rewrite it.
13055  # Note: m4 eats our [], so we need to use [ and ] instead.
13056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13057  if test "x$has_forbidden_chars" != x; then
13058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13060  fi
13061
13062
13063  windows_path="$new_path"
13064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13065    unix_path=`$CYGPATH -u "$windows_path"`
13066    new_path="$unix_path"
13067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13069    new_path="$unix_path"
13070  fi
13071
13072  if test "x$path" != "x$new_path"; then
13073    BOOT_JDK="$new_path"
13074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13076  fi
13077
13078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13080
13081  else
13082    # We're on a posix platform. Hooray! :)
13083    path="$BOOT_JDK"
13084
13085    if test ! -f "$path" && test ! -d "$path"; then
13086      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13087    fi
13088
13089    has_space=`$ECHO "$path" | $GREP " "`
13090    if test "x$has_space" != x; then
13091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13092$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13093      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13094    fi
13095  fi
13096
13097              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13098$as_echo_n "checking for Boot JDK... " >&6; }
13099              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13100$as_echo "$BOOT_JDK" >&6; }
13101              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13102$as_echo_n "checking Boot JDK version... " >&6; }
13103              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13104              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13105$as_echo "$BOOT_JDK_VERSION" >&6; }
13106            fi # end check jdk version
13107          fi # end check rt.jar
13108        fi # end check javac
13109      fi # end check java
13110    fi # end check boot jdk found
13111  fi
13112
13113
13114  if test "x$BOOT_JDK_FOUND" = xno; then
13115    # Now execute the test
13116
13117  if test "x$PROGRAMFILES" != x; then
13118    VIRTUAL_DIR="$PROGRAMFILES/Java"
13119
13120  windows_path="$VIRTUAL_DIR"
13121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13122    unix_path=`$CYGPATH -u "$windows_path"`
13123    VIRTUAL_DIR="$unix_path"
13124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13126    VIRTUAL_DIR="$unix_path"
13127  fi
13128
13129
13130  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13131  BOOT_JDK_SUFFIX=""
13132  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13133  if test "x$ALL_JDKS_FOUND" != x; then
13134    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13135
13136  if test "x$BOOT_JDK_FOUND" = xno; then
13137    # Now execute the test
13138
13139        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13140        if test -d "$BOOT_JDK"; then
13141          BOOT_JDK_FOUND=maybe
13142          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13143$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13144        fi
13145
13146
13147    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13148    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13149      # Do we have a bin/java?
13150      if test ! -x "$BOOT_JDK/bin/java"; then
13151        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13153        BOOT_JDK_FOUND=no
13154      else
13155        # Do we have a bin/javac?
13156        if test ! -x "$BOOT_JDK/bin/javac"; then
13157          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13159          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13160$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13161          BOOT_JDK_FOUND=no
13162        else
13163          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13164          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13165            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13167            BOOT_JDK_FOUND=no
13168          else
13169            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13170            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13171
13172            # Extra M4 quote needed to protect [] in grep expression.
13173            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13174            if test "x$FOUND_VERSION_78" = x; then
13175              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13177              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13178$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13179              BOOT_JDK_FOUND=no
13180            else
13181              # We're done! :-)
13182              BOOT_JDK_FOUND=yes
13183
13184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13185
13186  # Input might be given as Windows format, start by converting to
13187  # unix format.
13188  path="$BOOT_JDK"
13189  new_path=`$CYGPATH -u "$path"`
13190
13191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13194  # "foo.exe" is OK but "foo" is an error.
13195  #
13196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13197  # It is also a way to make sure we got the proper file name for the real test later on.
13198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13199  if test "x$test_shortpath" = x; then
13200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13201$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13202    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13203  fi
13204
13205  # Call helper function which possibly converts this using DOS-style short mode.
13206  # If so, the updated path is stored in $new_path.
13207
13208  input_path="$new_path"
13209  # Check if we need to convert this using DOS-style short mode. If the path
13210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13211  # take no chances and rewrite it.
13212  # Note: m4 eats our [], so we need to use [ and ] instead.
13213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13214  if test "x$has_forbidden_chars" != x; then
13215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13219      # Going to short mode and back again did indeed matter. Since short mode is
13220      # case insensitive, let's make it lowercase to improve readability.
13221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13222      # Now convert it back to Unix-stile (cygpath)
13223      input_path=`$CYGPATH -u "$shortmode_path"`
13224      new_path="$input_path"
13225    fi
13226  fi
13227
13228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13229  if test "x$test_cygdrive_prefix" = x; then
13230    # As a simple fix, exclude /usr/bin since it's not a real path.
13231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13233      # a path prefixed by /cygdrive for fixpath to work.
13234      new_path="$CYGWIN_ROOT_PATH$input_path"
13235    fi
13236  fi
13237
13238
13239  if test "x$path" != "x$new_path"; then
13240    BOOT_JDK="$new_path"
13241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13242$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13243  fi
13244
13245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13246
13247  path="$BOOT_JDK"
13248  has_colon=`$ECHO $path | $GREP ^.:`
13249  new_path="$path"
13250  if test "x$has_colon" = x; then
13251    # Not in mixed or Windows style, start by that.
13252    new_path=`cmd //c echo $path`
13253  fi
13254
13255
13256  input_path="$new_path"
13257  # Check if we need to convert this using DOS-style short mode. If the path
13258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13259  # take no chances and rewrite it.
13260  # Note: m4 eats our [], so we need to use [ and ] instead.
13261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13262  if test "x$has_forbidden_chars" != x; then
13263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13265  fi
13266
13267
13268  windows_path="$new_path"
13269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13270    unix_path=`$CYGPATH -u "$windows_path"`
13271    new_path="$unix_path"
13272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13274    new_path="$unix_path"
13275  fi
13276
13277  if test "x$path" != "x$new_path"; then
13278    BOOT_JDK="$new_path"
13279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13280$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13281  fi
13282
13283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13285
13286  else
13287    # We're on a posix platform. Hooray! :)
13288    path="$BOOT_JDK"
13289
13290    if test ! -f "$path" && test ! -d "$path"; then
13291      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13292    fi
13293
13294    has_space=`$ECHO "$path" | $GREP " "`
13295    if test "x$has_space" != x; then
13296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13297$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13298      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13299    fi
13300  fi
13301
13302              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13303$as_echo_n "checking for Boot JDK... " >&6; }
13304              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13305$as_echo "$BOOT_JDK" >&6; }
13306              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13307$as_echo_n "checking Boot JDK version... " >&6; }
13308              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13309              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13310$as_echo "$BOOT_JDK_VERSION" >&6; }
13311            fi # end check jdk version
13312          fi # end check rt.jar
13313        fi # end check javac
13314      fi # end check java
13315    fi # end check boot jdk found
13316  fi
13317
13318    done
13319  fi
13320
13321  fi
13322
13323
13324    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13325    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13326      # Do we have a bin/java?
13327      if test ! -x "$BOOT_JDK/bin/java"; then
13328        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13330        BOOT_JDK_FOUND=no
13331      else
13332        # Do we have a bin/javac?
13333        if test ! -x "$BOOT_JDK/bin/javac"; then
13334          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13336          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13337$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13338          BOOT_JDK_FOUND=no
13339        else
13340          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13341          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13342            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13344            BOOT_JDK_FOUND=no
13345          else
13346            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13347            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13348
13349            # Extra M4 quote needed to protect [] in grep expression.
13350            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13351            if test "x$FOUND_VERSION_78" = x; then
13352              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13353$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13354              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13355$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13356              BOOT_JDK_FOUND=no
13357            else
13358              # We're done! :-)
13359              BOOT_JDK_FOUND=yes
13360
13361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13362
13363  # Input might be given as Windows format, start by converting to
13364  # unix format.
13365  path="$BOOT_JDK"
13366  new_path=`$CYGPATH -u "$path"`
13367
13368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13371  # "foo.exe" is OK but "foo" is an error.
13372  #
13373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13374  # It is also a way to make sure we got the proper file name for the real test later on.
13375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13376  if test "x$test_shortpath" = x; then
13377    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13378$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13379    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13380  fi
13381
13382  # Call helper function which possibly converts this using DOS-style short mode.
13383  # If so, the updated path is stored in $new_path.
13384
13385  input_path="$new_path"
13386  # Check if we need to convert this using DOS-style short mode. If the path
13387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13388  # take no chances and rewrite it.
13389  # Note: m4 eats our [], so we need to use [ and ] instead.
13390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13391  if test "x$has_forbidden_chars" != x; then
13392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13396      # Going to short mode and back again did indeed matter. Since short mode is
13397      # case insensitive, let's make it lowercase to improve readability.
13398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13399      # Now convert it back to Unix-stile (cygpath)
13400      input_path=`$CYGPATH -u "$shortmode_path"`
13401      new_path="$input_path"
13402    fi
13403  fi
13404
13405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13406  if test "x$test_cygdrive_prefix" = x; then
13407    # As a simple fix, exclude /usr/bin since it's not a real path.
13408    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13410      # a path prefixed by /cygdrive for fixpath to work.
13411      new_path="$CYGWIN_ROOT_PATH$input_path"
13412    fi
13413  fi
13414
13415
13416  if test "x$path" != "x$new_path"; then
13417    BOOT_JDK="$new_path"
13418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13419$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13420  fi
13421
13422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13423
13424  path="$BOOT_JDK"
13425  has_colon=`$ECHO $path | $GREP ^.:`
13426  new_path="$path"
13427  if test "x$has_colon" = x; then
13428    # Not in mixed or Windows style, start by that.
13429    new_path=`cmd //c echo $path`
13430  fi
13431
13432
13433  input_path="$new_path"
13434  # Check if we need to convert this using DOS-style short mode. If the path
13435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13436  # take no chances and rewrite it.
13437  # Note: m4 eats our [], so we need to use [ and ] instead.
13438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13439  if test "x$has_forbidden_chars" != x; then
13440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13442  fi
13443
13444
13445  windows_path="$new_path"
13446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13447    unix_path=`$CYGPATH -u "$windows_path"`
13448    new_path="$unix_path"
13449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13451    new_path="$unix_path"
13452  fi
13453
13454  if test "x$path" != "x$new_path"; then
13455    BOOT_JDK="$new_path"
13456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13457$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13458  fi
13459
13460  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13461  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13462
13463  else
13464    # We're on a posix platform. Hooray! :)
13465    path="$BOOT_JDK"
13466
13467    if test ! -f "$path" && test ! -d "$path"; then
13468      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13469    fi
13470
13471    has_space=`$ECHO "$path" | $GREP " "`
13472    if test "x$has_space" != x; then
13473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13474$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13475      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13476    fi
13477  fi
13478
13479              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13480$as_echo_n "checking for Boot JDK... " >&6; }
13481              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13482$as_echo "$BOOT_JDK" >&6; }
13483              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13484$as_echo_n "checking Boot JDK version... " >&6; }
13485              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13486              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13487$as_echo "$BOOT_JDK_VERSION" >&6; }
13488            fi # end check jdk version
13489          fi # end check rt.jar
13490        fi # end check javac
13491      fi # end check java
13492    fi # end check boot jdk found
13493  fi
13494
13495
13496  if test "x$BOOT_JDK_FOUND" = xno; then
13497    # Now execute the test
13498
13499  if test "x$ProgramFiles" != x; then
13500    VIRTUAL_DIR="$ProgramFiles/Java"
13501
13502  windows_path="$VIRTUAL_DIR"
13503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13504    unix_path=`$CYGPATH -u "$windows_path"`
13505    VIRTUAL_DIR="$unix_path"
13506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13508    VIRTUAL_DIR="$unix_path"
13509  fi
13510
13511
13512  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13513  BOOT_JDK_SUFFIX=""
13514  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13515  if test "x$ALL_JDKS_FOUND" != x; then
13516    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13517
13518  if test "x$BOOT_JDK_FOUND" = xno; then
13519    # Now execute the test
13520
13521        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13522        if test -d "$BOOT_JDK"; then
13523          BOOT_JDK_FOUND=maybe
13524          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13525$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13526        fi
13527
13528
13529    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13530    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13531      # Do we have a bin/java?
13532      if test ! -x "$BOOT_JDK/bin/java"; then
13533        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13535        BOOT_JDK_FOUND=no
13536      else
13537        # Do we have a bin/javac?
13538        if test ! -x "$BOOT_JDK/bin/javac"; then
13539          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13541          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13542$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13543          BOOT_JDK_FOUND=no
13544        else
13545          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13546          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13547            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13549            BOOT_JDK_FOUND=no
13550          else
13551            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13552            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13553
13554            # Extra M4 quote needed to protect [] in grep expression.
13555            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13556            if test "x$FOUND_VERSION_78" = x; then
13557              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13559              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13560$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13561              BOOT_JDK_FOUND=no
13562            else
13563              # We're done! :-)
13564              BOOT_JDK_FOUND=yes
13565
13566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13567
13568  # Input might be given as Windows format, start by converting to
13569  # unix format.
13570  path="$BOOT_JDK"
13571  new_path=`$CYGPATH -u "$path"`
13572
13573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13576  # "foo.exe" is OK but "foo" is an error.
13577  #
13578  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13579  # It is also a way to make sure we got the proper file name for the real test later on.
13580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13581  if test "x$test_shortpath" = x; then
13582    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13583$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13584    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13585  fi
13586
13587  # Call helper function which possibly converts this using DOS-style short mode.
13588  # If so, the updated path is stored in $new_path.
13589
13590  input_path="$new_path"
13591  # Check if we need to convert this using DOS-style short mode. If the path
13592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13593  # take no chances and rewrite it.
13594  # Note: m4 eats our [], so we need to use [ and ] instead.
13595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13596  if test "x$has_forbidden_chars" != x; then
13597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13601      # Going to short mode and back again did indeed matter. Since short mode is
13602      # case insensitive, let's make it lowercase to improve readability.
13603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13604      # Now convert it back to Unix-stile (cygpath)
13605      input_path=`$CYGPATH -u "$shortmode_path"`
13606      new_path="$input_path"
13607    fi
13608  fi
13609
13610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13611  if test "x$test_cygdrive_prefix" = x; then
13612    # As a simple fix, exclude /usr/bin since it's not a real path.
13613    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13615      # a path prefixed by /cygdrive for fixpath to work.
13616      new_path="$CYGWIN_ROOT_PATH$input_path"
13617    fi
13618  fi
13619
13620
13621  if test "x$path" != "x$new_path"; then
13622    BOOT_JDK="$new_path"
13623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13624$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13625  fi
13626
13627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13628
13629  path="$BOOT_JDK"
13630  has_colon=`$ECHO $path | $GREP ^.:`
13631  new_path="$path"
13632  if test "x$has_colon" = x; then
13633    # Not in mixed or Windows style, start by that.
13634    new_path=`cmd //c echo $path`
13635  fi
13636
13637
13638  input_path="$new_path"
13639  # Check if we need to convert this using DOS-style short mode. If the path
13640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13641  # take no chances and rewrite it.
13642  # Note: m4 eats our [], so we need to use [ and ] instead.
13643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13644  if test "x$has_forbidden_chars" != x; then
13645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13647  fi
13648
13649
13650  windows_path="$new_path"
13651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13652    unix_path=`$CYGPATH -u "$windows_path"`
13653    new_path="$unix_path"
13654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13656    new_path="$unix_path"
13657  fi
13658
13659  if test "x$path" != "x$new_path"; then
13660    BOOT_JDK="$new_path"
13661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13662$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13663  fi
13664
13665  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13666  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13667
13668  else
13669    # We're on a posix platform. Hooray! :)
13670    path="$BOOT_JDK"
13671
13672    if test ! -f "$path" && test ! -d "$path"; then
13673      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13674    fi
13675
13676    has_space=`$ECHO "$path" | $GREP " "`
13677    if test "x$has_space" != x; then
13678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13679$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13680      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13681    fi
13682  fi
13683
13684              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13685$as_echo_n "checking for Boot JDK... " >&6; }
13686              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13687$as_echo "$BOOT_JDK" >&6; }
13688              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13689$as_echo_n "checking Boot JDK version... " >&6; }
13690              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13691              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13692$as_echo "$BOOT_JDK_VERSION" >&6; }
13693            fi # end check jdk version
13694          fi # end check rt.jar
13695        fi # end check javac
13696      fi # end check java
13697    fi # end check boot jdk found
13698  fi
13699
13700    done
13701  fi
13702
13703  fi
13704
13705
13706    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13707    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13708      # Do we have a bin/java?
13709      if test ! -x "$BOOT_JDK/bin/java"; then
13710        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13712        BOOT_JDK_FOUND=no
13713      else
13714        # Do we have a bin/javac?
13715        if test ! -x "$BOOT_JDK/bin/javac"; then
13716          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13718          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13719$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13720          BOOT_JDK_FOUND=no
13721        else
13722          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13723          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13724            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13726            BOOT_JDK_FOUND=no
13727          else
13728            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13729            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13730
13731            # Extra M4 quote needed to protect [] in grep expression.
13732            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13733            if test "x$FOUND_VERSION_78" = x; then
13734              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13736              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13737$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13738              BOOT_JDK_FOUND=no
13739            else
13740              # We're done! :-)
13741              BOOT_JDK_FOUND=yes
13742
13743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13744
13745  # Input might be given as Windows format, start by converting to
13746  # unix format.
13747  path="$BOOT_JDK"
13748  new_path=`$CYGPATH -u "$path"`
13749
13750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13753  # "foo.exe" is OK but "foo" is an error.
13754  #
13755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13756  # It is also a way to make sure we got the proper file name for the real test later on.
13757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13758  if test "x$test_shortpath" = x; then
13759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13761    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13762  fi
13763
13764  # Call helper function which possibly converts this using DOS-style short mode.
13765  # If so, the updated path is stored in $new_path.
13766
13767  input_path="$new_path"
13768  # Check if we need to convert this using DOS-style short mode. If the path
13769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13770  # take no chances and rewrite it.
13771  # Note: m4 eats our [], so we need to use [ and ] instead.
13772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13773  if test "x$has_forbidden_chars" != x; then
13774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13778      # Going to short mode and back again did indeed matter. Since short mode is
13779      # case insensitive, let's make it lowercase to improve readability.
13780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13781      # Now convert it back to Unix-stile (cygpath)
13782      input_path=`$CYGPATH -u "$shortmode_path"`
13783      new_path="$input_path"
13784    fi
13785  fi
13786
13787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13788  if test "x$test_cygdrive_prefix" = x; then
13789    # As a simple fix, exclude /usr/bin since it's not a real path.
13790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13792      # a path prefixed by /cygdrive for fixpath to work.
13793      new_path="$CYGWIN_ROOT_PATH$input_path"
13794    fi
13795  fi
13796
13797
13798  if test "x$path" != "x$new_path"; then
13799    BOOT_JDK="$new_path"
13800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13801$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13802  fi
13803
13804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13805
13806  path="$BOOT_JDK"
13807  has_colon=`$ECHO $path | $GREP ^.:`
13808  new_path="$path"
13809  if test "x$has_colon" = x; then
13810    # Not in mixed or Windows style, start by that.
13811    new_path=`cmd //c echo $path`
13812  fi
13813
13814
13815  input_path="$new_path"
13816  # Check if we need to convert this using DOS-style short mode. If the path
13817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13818  # take no chances and rewrite it.
13819  # Note: m4 eats our [], so we need to use [ and ] instead.
13820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13821  if test "x$has_forbidden_chars" != x; then
13822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13824  fi
13825
13826
13827  windows_path="$new_path"
13828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13829    unix_path=`$CYGPATH -u "$windows_path"`
13830    new_path="$unix_path"
13831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13833    new_path="$unix_path"
13834  fi
13835
13836  if test "x$path" != "x$new_path"; then
13837    BOOT_JDK="$new_path"
13838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13839$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13840  fi
13841
13842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13844
13845  else
13846    # We're on a posix platform. Hooray! :)
13847    path="$BOOT_JDK"
13848
13849    if test ! -f "$path" && test ! -d "$path"; then
13850      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13851    fi
13852
13853    has_space=`$ECHO "$path" | $GREP " "`
13854    if test "x$has_space" != x; then
13855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13856$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13857      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13858    fi
13859  fi
13860
13861              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13862$as_echo_n "checking for Boot JDK... " >&6; }
13863              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13864$as_echo "$BOOT_JDK" >&6; }
13865              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13866$as_echo_n "checking Boot JDK version... " >&6; }
13867              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13868              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13869$as_echo "$BOOT_JDK_VERSION" >&6; }
13870            fi # end check jdk version
13871          fi # end check rt.jar
13872        fi # end check javac
13873      fi # end check java
13874    fi # end check boot jdk found
13875  fi
13876
13877
13878  if test "x$BOOT_JDK_FOUND" = xno; then
13879    # Now execute the test
13880
13881  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13882  BOOT_JDK_SUFFIX=""
13883  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13884  if test "x$ALL_JDKS_FOUND" != x; then
13885    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13886
13887  if test "x$BOOT_JDK_FOUND" = xno; then
13888    # Now execute the test
13889
13890        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13891        if test -d "$BOOT_JDK"; then
13892          BOOT_JDK_FOUND=maybe
13893          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13894$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13895        fi
13896
13897
13898    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13899    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13900      # Do we have a bin/java?
13901      if test ! -x "$BOOT_JDK/bin/java"; then
13902        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13904        BOOT_JDK_FOUND=no
13905      else
13906        # Do we have a bin/javac?
13907        if test ! -x "$BOOT_JDK/bin/javac"; then
13908          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13910          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13911$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13912          BOOT_JDK_FOUND=no
13913        else
13914          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13915          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13916            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13918            BOOT_JDK_FOUND=no
13919          else
13920            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13921            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13922
13923            # Extra M4 quote needed to protect [] in grep expression.
13924            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13925            if test "x$FOUND_VERSION_78" = x; then
13926              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13928              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13929$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13930              BOOT_JDK_FOUND=no
13931            else
13932              # We're done! :-)
13933              BOOT_JDK_FOUND=yes
13934
13935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13936
13937  # Input might be given as Windows format, start by converting to
13938  # unix format.
13939  path="$BOOT_JDK"
13940  new_path=`$CYGPATH -u "$path"`
13941
13942  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13943  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13944  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13945  # "foo.exe" is OK but "foo" is an error.
13946  #
13947  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13948  # It is also a way to make sure we got the proper file name for the real test later on.
13949  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13950  if test "x$test_shortpath" = x; then
13951    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13952$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13953    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13954  fi
13955
13956  # Call helper function which possibly converts this using DOS-style short mode.
13957  # If so, the updated path is stored in $new_path.
13958
13959  input_path="$new_path"
13960  # Check if we need to convert this using DOS-style short mode. If the path
13961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13962  # take no chances and rewrite it.
13963  # Note: m4 eats our [], so we need to use [ and ] instead.
13964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13965  if test "x$has_forbidden_chars" != x; then
13966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13967    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13968    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13969    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13970      # Going to short mode and back again did indeed matter. Since short mode is
13971      # case insensitive, let's make it lowercase to improve readability.
13972      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13973      # Now convert it back to Unix-stile (cygpath)
13974      input_path=`$CYGPATH -u "$shortmode_path"`
13975      new_path="$input_path"
13976    fi
13977  fi
13978
13979  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13980  if test "x$test_cygdrive_prefix" = x; then
13981    # As a simple fix, exclude /usr/bin since it's not a real path.
13982    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13983      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13984      # a path prefixed by /cygdrive for fixpath to work.
13985      new_path="$CYGWIN_ROOT_PATH$input_path"
13986    fi
13987  fi
13988
13989
13990  if test "x$path" != "x$new_path"; then
13991    BOOT_JDK="$new_path"
13992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13993$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13994  fi
13995
13996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13997
13998  path="$BOOT_JDK"
13999  has_colon=`$ECHO $path | $GREP ^.:`
14000  new_path="$path"
14001  if test "x$has_colon" = x; then
14002    # Not in mixed or Windows style, start by that.
14003    new_path=`cmd //c echo $path`
14004  fi
14005
14006
14007  input_path="$new_path"
14008  # Check if we need to convert this using DOS-style short mode. If the path
14009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14010  # take no chances and rewrite it.
14011  # Note: m4 eats our [], so we need to use [ and ] instead.
14012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14013  if test "x$has_forbidden_chars" != x; then
14014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14015    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14016  fi
14017
14018
14019  windows_path="$new_path"
14020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14021    unix_path=`$CYGPATH -u "$windows_path"`
14022    new_path="$unix_path"
14023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14025    new_path="$unix_path"
14026  fi
14027
14028  if test "x$path" != "x$new_path"; then
14029    BOOT_JDK="$new_path"
14030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14031$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14032  fi
14033
14034  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14035  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14036
14037  else
14038    # We're on a posix platform. Hooray! :)
14039    path="$BOOT_JDK"
14040
14041    if test ! -f "$path" && test ! -d "$path"; then
14042      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14043    fi
14044
14045    has_space=`$ECHO "$path" | $GREP " "`
14046    if test "x$has_space" != x; then
14047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14048$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14049      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14050    fi
14051  fi
14052
14053              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14054$as_echo_n "checking for Boot JDK... " >&6; }
14055              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14056$as_echo "$BOOT_JDK" >&6; }
14057              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14058$as_echo_n "checking Boot JDK version... " >&6; }
14059              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14060              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14061$as_echo "$BOOT_JDK_VERSION" >&6; }
14062            fi # end check jdk version
14063          fi # end check rt.jar
14064        fi # end check javac
14065      fi # end check java
14066    fi # end check boot jdk found
14067  fi
14068
14069    done
14070  fi
14071
14072
14073    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14074    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14075      # Do we have a bin/java?
14076      if test ! -x "$BOOT_JDK/bin/java"; then
14077        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14079        BOOT_JDK_FOUND=no
14080      else
14081        # Do we have a bin/javac?
14082        if test ! -x "$BOOT_JDK/bin/javac"; then
14083          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14085          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14086$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14087          BOOT_JDK_FOUND=no
14088        else
14089          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14090          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14091            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14093            BOOT_JDK_FOUND=no
14094          else
14095            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14096            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14097
14098            # Extra M4 quote needed to protect [] in grep expression.
14099            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14100            if test "x$FOUND_VERSION_78" = x; then
14101              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14102$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14103              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14104$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14105              BOOT_JDK_FOUND=no
14106            else
14107              # We're done! :-)
14108              BOOT_JDK_FOUND=yes
14109
14110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14111
14112  # Input might be given as Windows format, start by converting to
14113  # unix format.
14114  path="$BOOT_JDK"
14115  new_path=`$CYGPATH -u "$path"`
14116
14117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14120  # "foo.exe" is OK but "foo" is an error.
14121  #
14122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14123  # It is also a way to make sure we got the proper file name for the real test later on.
14124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14125  if test "x$test_shortpath" = x; then
14126    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14127$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14128    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14129  fi
14130
14131  # Call helper function which possibly converts this using DOS-style short mode.
14132  # If so, the updated path is stored in $new_path.
14133
14134  input_path="$new_path"
14135  # Check if we need to convert this using DOS-style short mode. If the path
14136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14137  # take no chances and rewrite it.
14138  # Note: m4 eats our [], so we need to use [ and ] instead.
14139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14140  if test "x$has_forbidden_chars" != x; then
14141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14145      # Going to short mode and back again did indeed matter. Since short mode is
14146      # case insensitive, let's make it lowercase to improve readability.
14147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14148      # Now convert it back to Unix-stile (cygpath)
14149      input_path=`$CYGPATH -u "$shortmode_path"`
14150      new_path="$input_path"
14151    fi
14152  fi
14153
14154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14155  if test "x$test_cygdrive_prefix" = x; then
14156    # As a simple fix, exclude /usr/bin since it's not a real path.
14157    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14159      # a path prefixed by /cygdrive for fixpath to work.
14160      new_path="$CYGWIN_ROOT_PATH$input_path"
14161    fi
14162  fi
14163
14164
14165  if test "x$path" != "x$new_path"; then
14166    BOOT_JDK="$new_path"
14167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14168$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14169  fi
14170
14171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14172
14173  path="$BOOT_JDK"
14174  has_colon=`$ECHO $path | $GREP ^.:`
14175  new_path="$path"
14176  if test "x$has_colon" = x; then
14177    # Not in mixed or Windows style, start by that.
14178    new_path=`cmd //c echo $path`
14179  fi
14180
14181
14182  input_path="$new_path"
14183  # Check if we need to convert this using DOS-style short mode. If the path
14184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14185  # take no chances and rewrite it.
14186  # Note: m4 eats our [], so we need to use [ and ] instead.
14187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14188  if test "x$has_forbidden_chars" != x; then
14189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14191  fi
14192
14193
14194  windows_path="$new_path"
14195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14196    unix_path=`$CYGPATH -u "$windows_path"`
14197    new_path="$unix_path"
14198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14200    new_path="$unix_path"
14201  fi
14202
14203  if test "x$path" != "x$new_path"; then
14204    BOOT_JDK="$new_path"
14205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14206$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14207  fi
14208
14209  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14210  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14211
14212  else
14213    # We're on a posix platform. Hooray! :)
14214    path="$BOOT_JDK"
14215
14216    if test ! -f "$path" && test ! -d "$path"; then
14217      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14218    fi
14219
14220    has_space=`$ECHO "$path" | $GREP " "`
14221    if test "x$has_space" != x; then
14222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14223$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14224      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14225    fi
14226  fi
14227
14228              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14229$as_echo_n "checking for Boot JDK... " >&6; }
14230              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14231$as_echo "$BOOT_JDK" >&6; }
14232              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14233$as_echo_n "checking Boot JDK version... " >&6; }
14234              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14235              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14236$as_echo "$BOOT_JDK_VERSION" >&6; }
14237            fi # end check jdk version
14238          fi # end check rt.jar
14239        fi # end check javac
14240      fi # end check java
14241    fi # end check boot jdk found
14242  fi
14243
14244  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14245
14246  if test "x$BOOT_JDK_FOUND" = xno; then
14247    # Now execute the test
14248
14249  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14250  BOOT_JDK_SUFFIX="/Contents/Home"
14251  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14252  if test "x$ALL_JDKS_FOUND" != x; then
14253    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14254
14255  if test "x$BOOT_JDK_FOUND" = xno; then
14256    # Now execute the test
14257
14258        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14259        if test -d "$BOOT_JDK"; then
14260          BOOT_JDK_FOUND=maybe
14261          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14262$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14263        fi
14264
14265
14266    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14267    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14268      # Do we have a bin/java?
14269      if test ! -x "$BOOT_JDK/bin/java"; then
14270        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14272        BOOT_JDK_FOUND=no
14273      else
14274        # Do we have a bin/javac?
14275        if test ! -x "$BOOT_JDK/bin/javac"; then
14276          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14278          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14279$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14280          BOOT_JDK_FOUND=no
14281        else
14282          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14283          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14284            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14286            BOOT_JDK_FOUND=no
14287          else
14288            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14289            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14290
14291            # Extra M4 quote needed to protect [] in grep expression.
14292            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14293            if test "x$FOUND_VERSION_78" = x; then
14294              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14296              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14297$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14298              BOOT_JDK_FOUND=no
14299            else
14300              # We're done! :-)
14301              BOOT_JDK_FOUND=yes
14302
14303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14304
14305  # Input might be given as Windows format, start by converting to
14306  # unix format.
14307  path="$BOOT_JDK"
14308  new_path=`$CYGPATH -u "$path"`
14309
14310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14313  # "foo.exe" is OK but "foo" is an error.
14314  #
14315  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14316  # It is also a way to make sure we got the proper file name for the real test later on.
14317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14318  if test "x$test_shortpath" = x; then
14319    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14320$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14321    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14322  fi
14323
14324  # Call helper function which possibly converts this using DOS-style short mode.
14325  # If so, the updated path is stored in $new_path.
14326
14327  input_path="$new_path"
14328  # Check if we need to convert this using DOS-style short mode. If the path
14329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14330  # take no chances and rewrite it.
14331  # Note: m4 eats our [], so we need to use [ and ] instead.
14332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14333  if test "x$has_forbidden_chars" != x; then
14334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14338      # Going to short mode and back again did indeed matter. Since short mode is
14339      # case insensitive, let's make it lowercase to improve readability.
14340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14341      # Now convert it back to Unix-stile (cygpath)
14342      input_path=`$CYGPATH -u "$shortmode_path"`
14343      new_path="$input_path"
14344    fi
14345  fi
14346
14347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14348  if test "x$test_cygdrive_prefix" = x; then
14349    # As a simple fix, exclude /usr/bin since it's not a real path.
14350    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14352      # a path prefixed by /cygdrive for fixpath to work.
14353      new_path="$CYGWIN_ROOT_PATH$input_path"
14354    fi
14355  fi
14356
14357
14358  if test "x$path" != "x$new_path"; then
14359    BOOT_JDK="$new_path"
14360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14361$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14362  fi
14363
14364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14365
14366  path="$BOOT_JDK"
14367  has_colon=`$ECHO $path | $GREP ^.:`
14368  new_path="$path"
14369  if test "x$has_colon" = x; then
14370    # Not in mixed or Windows style, start by that.
14371    new_path=`cmd //c echo $path`
14372  fi
14373
14374
14375  input_path="$new_path"
14376  # Check if we need to convert this using DOS-style short mode. If the path
14377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14378  # take no chances and rewrite it.
14379  # Note: m4 eats our [], so we need to use [ and ] instead.
14380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14381  if test "x$has_forbidden_chars" != x; then
14382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14384  fi
14385
14386
14387  windows_path="$new_path"
14388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14389    unix_path=`$CYGPATH -u "$windows_path"`
14390    new_path="$unix_path"
14391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14393    new_path="$unix_path"
14394  fi
14395
14396  if test "x$path" != "x$new_path"; then
14397    BOOT_JDK="$new_path"
14398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14400  fi
14401
14402  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14403  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14404
14405  else
14406    # We're on a posix platform. Hooray! :)
14407    path="$BOOT_JDK"
14408
14409    if test ! -f "$path" && test ! -d "$path"; then
14410      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14411    fi
14412
14413    has_space=`$ECHO "$path" | $GREP " "`
14414    if test "x$has_space" != x; then
14415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14416$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14417      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14418    fi
14419  fi
14420
14421              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14422$as_echo_n "checking for Boot JDK... " >&6; }
14423              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14424$as_echo "$BOOT_JDK" >&6; }
14425              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14426$as_echo_n "checking Boot JDK version... " >&6; }
14427              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14428              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14429$as_echo "$BOOT_JDK_VERSION" >&6; }
14430            fi # end check jdk version
14431          fi # end check rt.jar
14432        fi # end check javac
14433      fi # end check java
14434    fi # end check boot jdk found
14435  fi
14436
14437    done
14438  fi
14439
14440
14441    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14442    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14443      # Do we have a bin/java?
14444      if test ! -x "$BOOT_JDK/bin/java"; then
14445        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14447        BOOT_JDK_FOUND=no
14448      else
14449        # Do we have a bin/javac?
14450        if test ! -x "$BOOT_JDK/bin/javac"; then
14451          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14453          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14454$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14455          BOOT_JDK_FOUND=no
14456        else
14457          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14458          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14459            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14461            BOOT_JDK_FOUND=no
14462          else
14463            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14464            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14465
14466            # Extra M4 quote needed to protect [] in grep expression.
14467            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14468            if test "x$FOUND_VERSION_78" = x; then
14469              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14470$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14471              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14472$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14473              BOOT_JDK_FOUND=no
14474            else
14475              # We're done! :-)
14476              BOOT_JDK_FOUND=yes
14477
14478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14479
14480  # Input might be given as Windows format, start by converting to
14481  # unix format.
14482  path="$BOOT_JDK"
14483  new_path=`$CYGPATH -u "$path"`
14484
14485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14488  # "foo.exe" is OK but "foo" is an error.
14489  #
14490  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14491  # It is also a way to make sure we got the proper file name for the real test later on.
14492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14493  if test "x$test_shortpath" = x; then
14494    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14495$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14496    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14497  fi
14498
14499  # Call helper function which possibly converts this using DOS-style short mode.
14500  # If so, the updated path is stored in $new_path.
14501
14502  input_path="$new_path"
14503  # Check if we need to convert this using DOS-style short mode. If the path
14504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14505  # take no chances and rewrite it.
14506  # Note: m4 eats our [], so we need to use [ and ] instead.
14507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14508  if test "x$has_forbidden_chars" != x; then
14509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14513      # Going to short mode and back again did indeed matter. Since short mode is
14514      # case insensitive, let's make it lowercase to improve readability.
14515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14516      # Now convert it back to Unix-stile (cygpath)
14517      input_path=`$CYGPATH -u "$shortmode_path"`
14518      new_path="$input_path"
14519    fi
14520  fi
14521
14522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14523  if test "x$test_cygdrive_prefix" = x; then
14524    # As a simple fix, exclude /usr/bin since it's not a real path.
14525    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14527      # a path prefixed by /cygdrive for fixpath to work.
14528      new_path="$CYGWIN_ROOT_PATH$input_path"
14529    fi
14530  fi
14531
14532
14533  if test "x$path" != "x$new_path"; then
14534    BOOT_JDK="$new_path"
14535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14536$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14537  fi
14538
14539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14540
14541  path="$BOOT_JDK"
14542  has_colon=`$ECHO $path | $GREP ^.:`
14543  new_path="$path"
14544  if test "x$has_colon" = x; then
14545    # Not in mixed or Windows style, start by that.
14546    new_path=`cmd //c echo $path`
14547  fi
14548
14549
14550  input_path="$new_path"
14551  # Check if we need to convert this using DOS-style short mode. If the path
14552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14553  # take no chances and rewrite it.
14554  # Note: m4 eats our [], so we need to use [ and ] instead.
14555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14556  if test "x$has_forbidden_chars" != x; then
14557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14559  fi
14560
14561
14562  windows_path="$new_path"
14563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14564    unix_path=`$CYGPATH -u "$windows_path"`
14565    new_path="$unix_path"
14566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14568    new_path="$unix_path"
14569  fi
14570
14571  if test "x$path" != "x$new_path"; then
14572    BOOT_JDK="$new_path"
14573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14574$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14575  fi
14576
14577  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14578  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14579
14580  else
14581    # We're on a posix platform. Hooray! :)
14582    path="$BOOT_JDK"
14583
14584    if test ! -f "$path" && test ! -d "$path"; then
14585      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14586    fi
14587
14588    has_space=`$ECHO "$path" | $GREP " "`
14589    if test "x$has_space" != x; then
14590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14591$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14592      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14593    fi
14594  fi
14595
14596              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14597$as_echo_n "checking for Boot JDK... " >&6; }
14598              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14599$as_echo "$BOOT_JDK" >&6; }
14600              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14601$as_echo_n "checking Boot JDK version... " >&6; }
14602              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14603              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14604$as_echo "$BOOT_JDK_VERSION" >&6; }
14605            fi # end check jdk version
14606          fi # end check rt.jar
14607        fi # end check javac
14608      fi # end check java
14609    fi # end check boot jdk found
14610  fi
14611
14612
14613  if test "x$BOOT_JDK_FOUND" = xno; then
14614    # Now execute the test
14615
14616  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14617  BOOT_JDK_SUFFIX="/Contents/Home"
14618  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14619  if test "x$ALL_JDKS_FOUND" != x; then
14620    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14621
14622  if test "x$BOOT_JDK_FOUND" = xno; then
14623    # Now execute the test
14624
14625        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14626        if test -d "$BOOT_JDK"; then
14627          BOOT_JDK_FOUND=maybe
14628          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14629$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14630        fi
14631
14632
14633    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14634    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14635      # Do we have a bin/java?
14636      if test ! -x "$BOOT_JDK/bin/java"; then
14637        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14639        BOOT_JDK_FOUND=no
14640      else
14641        # Do we have a bin/javac?
14642        if test ! -x "$BOOT_JDK/bin/javac"; then
14643          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14645          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14646$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14647          BOOT_JDK_FOUND=no
14648        else
14649          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14650          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14651            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14653            BOOT_JDK_FOUND=no
14654          else
14655            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14656            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14657
14658            # Extra M4 quote needed to protect [] in grep expression.
14659            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14660            if test "x$FOUND_VERSION_78" = x; then
14661              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14663              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14664$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14665              BOOT_JDK_FOUND=no
14666            else
14667              # We're done! :-)
14668              BOOT_JDK_FOUND=yes
14669
14670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14671
14672  # Input might be given as Windows format, start by converting to
14673  # unix format.
14674  path="$BOOT_JDK"
14675  new_path=`$CYGPATH -u "$path"`
14676
14677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14680  # "foo.exe" is OK but "foo" is an error.
14681  #
14682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14683  # It is also a way to make sure we got the proper file name for the real test later on.
14684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14685  if test "x$test_shortpath" = x; then
14686    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14687$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14688    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14689  fi
14690
14691  # Call helper function which possibly converts this using DOS-style short mode.
14692  # If so, the updated path is stored in $new_path.
14693
14694  input_path="$new_path"
14695  # Check if we need to convert this using DOS-style short mode. If the path
14696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14697  # take no chances and rewrite it.
14698  # Note: m4 eats our [], so we need to use [ and ] instead.
14699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14700  if test "x$has_forbidden_chars" != x; then
14701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14705      # Going to short mode and back again did indeed matter. Since short mode is
14706      # case insensitive, let's make it lowercase to improve readability.
14707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14708      # Now convert it back to Unix-stile (cygpath)
14709      input_path=`$CYGPATH -u "$shortmode_path"`
14710      new_path="$input_path"
14711    fi
14712  fi
14713
14714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14715  if test "x$test_cygdrive_prefix" = x; then
14716    # As a simple fix, exclude /usr/bin since it's not a real path.
14717    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14719      # a path prefixed by /cygdrive for fixpath to work.
14720      new_path="$CYGWIN_ROOT_PATH$input_path"
14721    fi
14722  fi
14723
14724
14725  if test "x$path" != "x$new_path"; then
14726    BOOT_JDK="$new_path"
14727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14728$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14729  fi
14730
14731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14732
14733  path="$BOOT_JDK"
14734  has_colon=`$ECHO $path | $GREP ^.:`
14735  new_path="$path"
14736  if test "x$has_colon" = x; then
14737    # Not in mixed or Windows style, start by that.
14738    new_path=`cmd //c echo $path`
14739  fi
14740
14741
14742  input_path="$new_path"
14743  # Check if we need to convert this using DOS-style short mode. If the path
14744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14745  # take no chances and rewrite it.
14746  # Note: m4 eats our [], so we need to use [ and ] instead.
14747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14748  if test "x$has_forbidden_chars" != x; then
14749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14751  fi
14752
14753
14754  windows_path="$new_path"
14755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14756    unix_path=`$CYGPATH -u "$windows_path"`
14757    new_path="$unix_path"
14758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14760    new_path="$unix_path"
14761  fi
14762
14763  if test "x$path" != "x$new_path"; then
14764    BOOT_JDK="$new_path"
14765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14766$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14767  fi
14768
14769  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14770  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14771
14772  else
14773    # We're on a posix platform. Hooray! :)
14774    path="$BOOT_JDK"
14775
14776    if test ! -f "$path" && test ! -d "$path"; then
14777      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14778    fi
14779
14780    has_space=`$ECHO "$path" | $GREP " "`
14781    if test "x$has_space" != x; then
14782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14783$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14784      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14785    fi
14786  fi
14787
14788              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14789$as_echo_n "checking for Boot JDK... " >&6; }
14790              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14791$as_echo "$BOOT_JDK" >&6; }
14792              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14793$as_echo_n "checking Boot JDK version... " >&6; }
14794              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14795              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14796$as_echo "$BOOT_JDK_VERSION" >&6; }
14797            fi # end check jdk version
14798          fi # end check rt.jar
14799        fi # end check javac
14800      fi # end check java
14801    fi # end check boot jdk found
14802  fi
14803
14804    done
14805  fi
14806
14807
14808    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14809    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14810      # Do we have a bin/java?
14811      if test ! -x "$BOOT_JDK/bin/java"; then
14812        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14814        BOOT_JDK_FOUND=no
14815      else
14816        # Do we have a bin/javac?
14817        if test ! -x "$BOOT_JDK/bin/javac"; then
14818          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14819$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14820          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14821$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14822          BOOT_JDK_FOUND=no
14823        else
14824          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14825          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14826            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14828            BOOT_JDK_FOUND=no
14829          else
14830            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14831            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14832
14833            # Extra M4 quote needed to protect [] in grep expression.
14834            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14835            if test "x$FOUND_VERSION_78" = x; then
14836              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14837$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14838              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14839$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14840              BOOT_JDK_FOUND=no
14841            else
14842              # We're done! :-)
14843              BOOT_JDK_FOUND=yes
14844
14845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14846
14847  # Input might be given as Windows format, start by converting to
14848  # unix format.
14849  path="$BOOT_JDK"
14850  new_path=`$CYGPATH -u "$path"`
14851
14852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14855  # "foo.exe" is OK but "foo" is an error.
14856  #
14857  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14858  # It is also a way to make sure we got the proper file name for the real test later on.
14859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14860  if test "x$test_shortpath" = x; then
14861    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14862$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14863    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14864  fi
14865
14866  # Call helper function which possibly converts this using DOS-style short mode.
14867  # If so, the updated path is stored in $new_path.
14868
14869  input_path="$new_path"
14870  # Check if we need to convert this using DOS-style short mode. If the path
14871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14872  # take no chances and rewrite it.
14873  # Note: m4 eats our [], so we need to use [ and ] instead.
14874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14875  if test "x$has_forbidden_chars" != x; then
14876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14880      # Going to short mode and back again did indeed matter. Since short mode is
14881      # case insensitive, let's make it lowercase to improve readability.
14882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14883      # Now convert it back to Unix-stile (cygpath)
14884      input_path=`$CYGPATH -u "$shortmode_path"`
14885      new_path="$input_path"
14886    fi
14887  fi
14888
14889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14890  if test "x$test_cygdrive_prefix" = x; then
14891    # As a simple fix, exclude /usr/bin since it's not a real path.
14892    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14894      # a path prefixed by /cygdrive for fixpath to work.
14895      new_path="$CYGWIN_ROOT_PATH$input_path"
14896    fi
14897  fi
14898
14899
14900  if test "x$path" != "x$new_path"; then
14901    BOOT_JDK="$new_path"
14902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14903$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14904  fi
14905
14906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14907
14908  path="$BOOT_JDK"
14909  has_colon=`$ECHO $path | $GREP ^.:`
14910  new_path="$path"
14911  if test "x$has_colon" = x; then
14912    # Not in mixed or Windows style, start by that.
14913    new_path=`cmd //c echo $path`
14914  fi
14915
14916
14917  input_path="$new_path"
14918  # Check if we need to convert this using DOS-style short mode. If the path
14919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14920  # take no chances and rewrite it.
14921  # Note: m4 eats our [], so we need to use [ and ] instead.
14922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14923  if test "x$has_forbidden_chars" != x; then
14924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14926  fi
14927
14928
14929  windows_path="$new_path"
14930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14931    unix_path=`$CYGPATH -u "$windows_path"`
14932    new_path="$unix_path"
14933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14935    new_path="$unix_path"
14936  fi
14937
14938  if test "x$path" != "x$new_path"; then
14939    BOOT_JDK="$new_path"
14940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14941$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14942  fi
14943
14944  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14945  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14946
14947  else
14948    # We're on a posix platform. Hooray! :)
14949    path="$BOOT_JDK"
14950
14951    if test ! -f "$path" && test ! -d "$path"; then
14952      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14953    fi
14954
14955    has_space=`$ECHO "$path" | $GREP " "`
14956    if test "x$has_space" != x; then
14957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14958$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14959      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14960    fi
14961  fi
14962
14963              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14964$as_echo_n "checking for Boot JDK... " >&6; }
14965              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14966$as_echo "$BOOT_JDK" >&6; }
14967              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14968$as_echo_n "checking Boot JDK version... " >&6; }
14969              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14970              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14971$as_echo "$BOOT_JDK_VERSION" >&6; }
14972            fi # end check jdk version
14973          fi # end check rt.jar
14974        fi # end check javac
14975      fi # end check java
14976    fi # end check boot jdk found
14977  fi
14978
14979  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14980
14981  if test "x$BOOT_JDK_FOUND" = xno; then
14982    # Now execute the test
14983
14984  BOOT_JDK_PREFIX="/usr/lib/jvm"
14985  BOOT_JDK_SUFFIX=""
14986  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14987  if test "x$ALL_JDKS_FOUND" != x; then
14988    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14989
14990  if test "x$BOOT_JDK_FOUND" = xno; then
14991    # Now execute the test
14992
14993        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14994        if test -d "$BOOT_JDK"; then
14995          BOOT_JDK_FOUND=maybe
14996          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14997$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14998        fi
14999
15000
15001    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15002    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15003      # Do we have a bin/java?
15004      if test ! -x "$BOOT_JDK/bin/java"; then
15005        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15007        BOOT_JDK_FOUND=no
15008      else
15009        # Do we have a bin/javac?
15010        if test ! -x "$BOOT_JDK/bin/javac"; then
15011          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15013          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15014$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15015          BOOT_JDK_FOUND=no
15016        else
15017          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15018          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15019            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15021            BOOT_JDK_FOUND=no
15022          else
15023            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15024            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15025
15026            # Extra M4 quote needed to protect [] in grep expression.
15027            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15028            if test "x$FOUND_VERSION_78" = x; then
15029              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15031              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15032$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15033              BOOT_JDK_FOUND=no
15034            else
15035              # We're done! :-)
15036              BOOT_JDK_FOUND=yes
15037
15038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15039
15040  # Input might be given as Windows format, start by converting to
15041  # unix format.
15042  path="$BOOT_JDK"
15043  new_path=`$CYGPATH -u "$path"`
15044
15045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15048  # "foo.exe" is OK but "foo" is an error.
15049  #
15050  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15051  # It is also a way to make sure we got the proper file name for the real test later on.
15052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15053  if test "x$test_shortpath" = x; then
15054    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15055$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15056    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15057  fi
15058
15059  # Call helper function which possibly converts this using DOS-style short mode.
15060  # If so, the updated path is stored in $new_path.
15061
15062  input_path="$new_path"
15063  # Check if we need to convert this using DOS-style short mode. If the path
15064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15065  # take no chances and rewrite it.
15066  # Note: m4 eats our [], so we need to use [ and ] instead.
15067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15068  if test "x$has_forbidden_chars" != x; then
15069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15073      # Going to short mode and back again did indeed matter. Since short mode is
15074      # case insensitive, let's make it lowercase to improve readability.
15075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15076      # Now convert it back to Unix-stile (cygpath)
15077      input_path=`$CYGPATH -u "$shortmode_path"`
15078      new_path="$input_path"
15079    fi
15080  fi
15081
15082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15083  if test "x$test_cygdrive_prefix" = x; then
15084    # As a simple fix, exclude /usr/bin since it's not a real path.
15085    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15087      # a path prefixed by /cygdrive for fixpath to work.
15088      new_path="$CYGWIN_ROOT_PATH$input_path"
15089    fi
15090  fi
15091
15092
15093  if test "x$path" != "x$new_path"; then
15094    BOOT_JDK="$new_path"
15095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15096$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15097  fi
15098
15099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15100
15101  path="$BOOT_JDK"
15102  has_colon=`$ECHO $path | $GREP ^.:`
15103  new_path="$path"
15104  if test "x$has_colon" = x; then
15105    # Not in mixed or Windows style, start by that.
15106    new_path=`cmd //c echo $path`
15107  fi
15108
15109
15110  input_path="$new_path"
15111  # Check if we need to convert this using DOS-style short mode. If the path
15112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15113  # take no chances and rewrite it.
15114  # Note: m4 eats our [], so we need to use [ and ] instead.
15115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15116  if test "x$has_forbidden_chars" != x; then
15117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15118    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15119  fi
15120
15121
15122  windows_path="$new_path"
15123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15124    unix_path=`$CYGPATH -u "$windows_path"`
15125    new_path="$unix_path"
15126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15128    new_path="$unix_path"
15129  fi
15130
15131  if test "x$path" != "x$new_path"; then
15132    BOOT_JDK="$new_path"
15133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15134$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15135  fi
15136
15137  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15138  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15139
15140  else
15141    # We're on a posix platform. Hooray! :)
15142    path="$BOOT_JDK"
15143
15144    if test ! -f "$path" && test ! -d "$path"; then
15145      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15146    fi
15147
15148    has_space=`$ECHO "$path" | $GREP " "`
15149    if test "x$has_space" != x; then
15150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15151$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15152      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15153    fi
15154  fi
15155
15156              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15157$as_echo_n "checking for Boot JDK... " >&6; }
15158              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15159$as_echo "$BOOT_JDK" >&6; }
15160              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15161$as_echo_n "checking Boot JDK version... " >&6; }
15162              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15163              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15164$as_echo "$BOOT_JDK_VERSION" >&6; }
15165            fi # end check jdk version
15166          fi # end check rt.jar
15167        fi # end check javac
15168      fi # end check java
15169    fi # end check boot jdk found
15170  fi
15171
15172    done
15173  fi
15174
15175
15176    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15177    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15178      # Do we have a bin/java?
15179      if test ! -x "$BOOT_JDK/bin/java"; then
15180        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15182        BOOT_JDK_FOUND=no
15183      else
15184        # Do we have a bin/javac?
15185        if test ! -x "$BOOT_JDK/bin/javac"; then
15186          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15188          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15189$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15190          BOOT_JDK_FOUND=no
15191        else
15192          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15193          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15194            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15196            BOOT_JDK_FOUND=no
15197          else
15198            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15199            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15200
15201            # Extra M4 quote needed to protect [] in grep expression.
15202            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15203            if test "x$FOUND_VERSION_78" = x; then
15204              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15206              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15207$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15208              BOOT_JDK_FOUND=no
15209            else
15210              # We're done! :-)
15211              BOOT_JDK_FOUND=yes
15212
15213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15214
15215  # Input might be given as Windows format, start by converting to
15216  # unix format.
15217  path="$BOOT_JDK"
15218  new_path=`$CYGPATH -u "$path"`
15219
15220  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15221  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15222  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15223  # "foo.exe" is OK but "foo" is an error.
15224  #
15225  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15226  # It is also a way to make sure we got the proper file name for the real test later on.
15227  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15228  if test "x$test_shortpath" = x; then
15229    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15230$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15231    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15232  fi
15233
15234  # Call helper function which possibly converts this using DOS-style short mode.
15235  # If so, the updated path is stored in $new_path.
15236
15237  input_path="$new_path"
15238  # Check if we need to convert this using DOS-style short mode. If the path
15239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15240  # take no chances and rewrite it.
15241  # Note: m4 eats our [], so we need to use [ and ] instead.
15242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15243  if test "x$has_forbidden_chars" != x; then
15244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15248      # Going to short mode and back again did indeed matter. Since short mode is
15249      # case insensitive, let's make it lowercase to improve readability.
15250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15251      # Now convert it back to Unix-stile (cygpath)
15252      input_path=`$CYGPATH -u "$shortmode_path"`
15253      new_path="$input_path"
15254    fi
15255  fi
15256
15257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15258  if test "x$test_cygdrive_prefix" = x; then
15259    # As a simple fix, exclude /usr/bin since it's not a real path.
15260    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15262      # a path prefixed by /cygdrive for fixpath to work.
15263      new_path="$CYGWIN_ROOT_PATH$input_path"
15264    fi
15265  fi
15266
15267
15268  if test "x$path" != "x$new_path"; then
15269    BOOT_JDK="$new_path"
15270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15271$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15272  fi
15273
15274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15275
15276  path="$BOOT_JDK"
15277  has_colon=`$ECHO $path | $GREP ^.:`
15278  new_path="$path"
15279  if test "x$has_colon" = x; then
15280    # Not in mixed or Windows style, start by that.
15281    new_path=`cmd //c echo $path`
15282  fi
15283
15284
15285  input_path="$new_path"
15286  # Check if we need to convert this using DOS-style short mode. If the path
15287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15288  # take no chances and rewrite it.
15289  # Note: m4 eats our [], so we need to use [ and ] instead.
15290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15291  if test "x$has_forbidden_chars" != x; then
15292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15293    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15294  fi
15295
15296
15297  windows_path="$new_path"
15298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15299    unix_path=`$CYGPATH -u "$windows_path"`
15300    new_path="$unix_path"
15301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15303    new_path="$unix_path"
15304  fi
15305
15306  if test "x$path" != "x$new_path"; then
15307    BOOT_JDK="$new_path"
15308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15309$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15310  fi
15311
15312  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15313  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15314
15315  else
15316    # We're on a posix platform. Hooray! :)
15317    path="$BOOT_JDK"
15318
15319    if test ! -f "$path" && test ! -d "$path"; then
15320      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15321    fi
15322
15323    has_space=`$ECHO "$path" | $GREP " "`
15324    if test "x$has_space" != x; then
15325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15326$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15327      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15328    fi
15329  fi
15330
15331              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15332$as_echo_n "checking for Boot JDK... " >&6; }
15333              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15334$as_echo "$BOOT_JDK" >&6; }
15335              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15336$as_echo_n "checking Boot JDK version... " >&6; }
15337              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15338              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15339$as_echo "$BOOT_JDK_VERSION" >&6; }
15340            fi # end check jdk version
15341          fi # end check rt.jar
15342        fi # end check javac
15343      fi # end check java
15344    fi # end check boot jdk found
15345  fi
15346
15347  fi
15348
15349
15350    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15351    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15352      # Do we have a bin/java?
15353      if test ! -x "$BOOT_JDK/bin/java"; then
15354        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15355$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15356        BOOT_JDK_FOUND=no
15357      else
15358        # Do we have a bin/javac?
15359        if test ! -x "$BOOT_JDK/bin/javac"; then
15360          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15362          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15363$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15364          BOOT_JDK_FOUND=no
15365        else
15366          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15367          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15368            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15370            BOOT_JDK_FOUND=no
15371          else
15372            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15373            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15374
15375            # Extra M4 quote needed to protect [] in grep expression.
15376            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15377            if test "x$FOUND_VERSION_78" = x; then
15378              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15380              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15381$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15382              BOOT_JDK_FOUND=no
15383            else
15384              # We're done! :-)
15385              BOOT_JDK_FOUND=yes
15386
15387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15388
15389  # Input might be given as Windows format, start by converting to
15390  # unix format.
15391  path="$BOOT_JDK"
15392  new_path=`$CYGPATH -u "$path"`
15393
15394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15397  # "foo.exe" is OK but "foo" is an error.
15398  #
15399  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15400  # It is also a way to make sure we got the proper file name for the real test later on.
15401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15402  if test "x$test_shortpath" = x; then
15403    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15404$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15405    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15406  fi
15407
15408  # Call helper function which possibly converts this using DOS-style short mode.
15409  # If so, the updated path is stored in $new_path.
15410
15411  input_path="$new_path"
15412  # Check if we need to convert this using DOS-style short mode. If the path
15413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15414  # take no chances and rewrite it.
15415  # Note: m4 eats our [], so we need to use [ and ] instead.
15416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15417  if test "x$has_forbidden_chars" != x; then
15418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15422      # Going to short mode and back again did indeed matter. Since short mode is
15423      # case insensitive, let's make it lowercase to improve readability.
15424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15425      # Now convert it back to Unix-stile (cygpath)
15426      input_path=`$CYGPATH -u "$shortmode_path"`
15427      new_path="$input_path"
15428    fi
15429  fi
15430
15431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15432  if test "x$test_cygdrive_prefix" = x; then
15433    # As a simple fix, exclude /usr/bin since it's not a real path.
15434    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15436      # a path prefixed by /cygdrive for fixpath to work.
15437      new_path="$CYGWIN_ROOT_PATH$input_path"
15438    fi
15439  fi
15440
15441
15442  if test "x$path" != "x$new_path"; then
15443    BOOT_JDK="$new_path"
15444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15445$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15446  fi
15447
15448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15449
15450  path="$BOOT_JDK"
15451  has_colon=`$ECHO $path | $GREP ^.:`
15452  new_path="$path"
15453  if test "x$has_colon" = x; then
15454    # Not in mixed or Windows style, start by that.
15455    new_path=`cmd //c echo $path`
15456  fi
15457
15458
15459  input_path="$new_path"
15460  # Check if we need to convert this using DOS-style short mode. If the path
15461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15462  # take no chances and rewrite it.
15463  # Note: m4 eats our [], so we need to use [ and ] instead.
15464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15465  if test "x$has_forbidden_chars" != x; then
15466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15468  fi
15469
15470
15471  windows_path="$new_path"
15472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15473    unix_path=`$CYGPATH -u "$windows_path"`
15474    new_path="$unix_path"
15475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15477    new_path="$unix_path"
15478  fi
15479
15480  if test "x$path" != "x$new_path"; then
15481    BOOT_JDK="$new_path"
15482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15483$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15484  fi
15485
15486  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15487  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15488
15489  else
15490    # We're on a posix platform. Hooray! :)
15491    path="$BOOT_JDK"
15492
15493    if test ! -f "$path" && test ! -d "$path"; then
15494      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15495    fi
15496
15497    has_space=`$ECHO "$path" | $GREP " "`
15498    if test "x$has_space" != x; then
15499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15500$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15501      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15502    fi
15503  fi
15504
15505              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15506$as_echo_n "checking for Boot JDK... " >&6; }
15507              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15508$as_echo "$BOOT_JDK" >&6; }
15509              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15510$as_echo_n "checking Boot JDK version... " >&6; }
15511              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15512              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15513$as_echo "$BOOT_JDK_VERSION" >&6; }
15514            fi # end check jdk version
15515          fi # end check rt.jar
15516        fi # end check javac
15517      fi # end check java
15518    fi # end check boot jdk found
15519  fi
15520
15521
15522# If we haven't found anything yet, we've truly lost. Give up.
15523if test "x$BOOT_JDK_FOUND" = xno; then
15524
15525    # Print a helpful message on how to acquire the necessary build dependency.
15526    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15527    MISSING_DEPENDENCY=openjdk
15528    PKGHANDLER_COMMAND=
15529
15530    case $PKGHANDLER in
15531	apt-get)
15532                apt_help     $MISSING_DEPENDENCY ;;
15533    yum)
15534                yum_help     $MISSING_DEPENDENCY ;;
15535	port)
15536                port_help    $MISSING_DEPENDENCY ;;
15537	pkgutil)
15538                pkgutil_help $MISSING_DEPENDENCY ;;
15539	pkgadd)
15540                pkgadd_help  $MISSING_DEPENDENCY ;;
15541    * )
15542      break ;;
15543    esac
15544
15545    if test "x$PKGHANDLER_COMMAND" != x; then
15546        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15547    fi
15548
15549  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15550$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15551  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15552$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15553  as_fn_error $? "Cannot continue" "$LINENO" 5
15554fi
15555
15556# Setup proper paths for what we found
15557BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15558if test ! -f "$BOOT_RTJAR"; then
15559    # On MacOSX it is called classes.jar
15560    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15561    if test -f "$BOOT_RTJAR"; then
15562      # Remove the ..
15563      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15564    fi
15565fi
15566BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15567BOOT_JDK="$BOOT_JDK"
15568
15569
15570
15571
15572# Setup tools from the Boot JDK.
15573
15574  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15575$as_echo_n "checking for java in Boot JDK... " >&6; }
15576  JAVA=$BOOT_JDK/bin/java
15577  if test ! -x $JAVA; then
15578      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15579$as_echo "not found" >&6; }
15580      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15581$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15582      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15583  fi
15584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15585$as_echo "ok" >&6; }
15586
15587
15588  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15589$as_echo_n "checking for javac in Boot JDK... " >&6; }
15590  JAVAC=$BOOT_JDK/bin/javac
15591  if test ! -x $JAVAC; then
15592      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15593$as_echo "not found" >&6; }
15594      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15595$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15596      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15597  fi
15598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15599$as_echo "ok" >&6; }
15600
15601
15602  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15603$as_echo_n "checking for javah in Boot JDK... " >&6; }
15604  JAVAH=$BOOT_JDK/bin/javah
15605  if test ! -x $JAVAH; then
15606      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15607$as_echo "not found" >&6; }
15608      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15609$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15610      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15611  fi
15612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15613$as_echo "ok" >&6; }
15614
15615
15616  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15617$as_echo_n "checking for javap in Boot JDK... " >&6; }
15618  JAVAP=$BOOT_JDK/bin/javap
15619  if test ! -x $JAVAP; then
15620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15621$as_echo "not found" >&6; }
15622      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15623$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15624      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15625  fi
15626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15627$as_echo "ok" >&6; }
15628
15629
15630  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15631$as_echo_n "checking for jar in Boot JDK... " >&6; }
15632  JAR=$BOOT_JDK/bin/jar
15633  if test ! -x $JAR; then
15634      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15635$as_echo "not found" >&6; }
15636      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15637$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15638      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15639  fi
15640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15641$as_echo "ok" >&6; }
15642
15643
15644  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15645$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15646  RMIC=$BOOT_JDK/bin/rmic
15647  if test ! -x $RMIC; then
15648      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15649$as_echo "not found" >&6; }
15650      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15651$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15652      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15653  fi
15654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15655$as_echo "ok" >&6; }
15656
15657
15658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15659$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15660  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15661  if test ! -x $NATIVE2ASCII; then
15662      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15663$as_echo "not found" >&6; }
15664      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15665$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15666      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15667  fi
15668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15669$as_echo "ok" >&6; }
15670
15671
15672# Finally, set some other options...
15673
15674# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15675BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15676
15677
15678
15679
15680##############################################################################
15681#
15682# Specify options for anything that is run with the Boot JDK.
15683#
15684
15685# Check whether --with-boot-jdk-jvmargs was given.
15686if test "${with_boot_jdk_jvmargs+set}" = set; then :
15687  withval=$with_boot_jdk_jvmargs;
15688fi
15689
15690
15691if test "x$with_boot_jdk_jvmargs" = x; then
15692    # Not all JVM:s accept the same arguments on the command line.
15693    # OpenJDK specific increase in thread stack for JDK build,
15694    # well more specifically, when running javac.
15695    if test "x$BUILD_NUM_BITS" = x32; then
15696       STACK_SIZE=768
15697    else
15698       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15699       # since 64-bit pointers are pushed on the stach. Apparently, we need
15700       # to increase the stack space when javacing the JDK....
15701       STACK_SIZE=1536
15702    fi
15703
15704    # Minimum amount of heap memory.
15705
15706    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15707    $ECHO "Command: $JAVA -Xms64M -version" >&5
15708    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15709    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15710    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15711    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15712        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15713	JVM_ARG_OK=true
15714    else
15715	$ECHO "Arg failed:" >&5
15716	$ECHO "$OUTPUT" >&5
15717	JVM_ARG_OK=false
15718    fi
15719
15720    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15721        # Why does macosx need more heap? Its the huge JDK batch.
15722
15723    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15724    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15725    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15726    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15727    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15728    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15729        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15730	JVM_ARG_OK=true
15731    else
15732	$ECHO "Arg failed:" >&5
15733	$ECHO "$OUTPUT" >&5
15734	JVM_ARG_OK=false
15735    fi
15736
15737    else
15738
15739    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15740    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15741    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15742    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15743    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15744    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15745        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15746	JVM_ARG_OK=true
15747    else
15748	$ECHO "Arg failed:" >&5
15749	$ECHO "$OUTPUT" >&5
15750	JVM_ARG_OK=false
15751    fi
15752
15753    fi
15754    # When is adding -client something that speeds up the JVM?
15755    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15756
15757    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15758    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15759    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15760    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15761    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15762    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15763        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15764	JVM_ARG_OK=true
15765    else
15766	$ECHO "Arg failed:" >&5
15767	$ECHO "$OUTPUT" >&5
15768	JVM_ARG_OK=false
15769    fi
15770
15771
15772    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15773    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15774    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15775    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15776    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15777    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15778        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15779	JVM_ARG_OK=true
15780    else
15781	$ECHO "Arg failed:" >&5
15782	$ECHO "$OUTPUT" >&5
15783	JVM_ARG_OK=false
15784    fi
15785
15786
15787    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15788    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15789    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15790    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15791    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15792    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15793        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15794	JVM_ARG_OK=true
15795    else
15796	$ECHO "Arg failed:" >&5
15797	$ECHO "$OUTPUT" >&5
15798	JVM_ARG_OK=false
15799    fi
15800
15801    # Disable special log output when a debug build is used as Boot JDK...
15802
15803    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15804    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15805    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15806    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15807    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15808    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15809        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15810	JVM_ARG_OK=true
15811    else
15812	$ECHO "Arg failed:" >&5
15813	$ECHO "$OUTPUT" >&5
15814	JVM_ARG_OK=false
15815    fi
15816
15817fi
15818
15819BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15820
15821
15822
15823###############################################################################
15824#
15825# Configure the sources to use. We can add or override individual directories.
15826#
15827###############################################################################
15828
15829
15830
15831# Where are the sources. Any of these can be overridden
15832# using --with-override-corba and the likes.
15833LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15834CORBA_TOPDIR="$SRC_ROOT/corba"
15835JAXP_TOPDIR="$SRC_ROOT/jaxp"
15836JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15837HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15838NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15839JDK_TOPDIR="$SRC_ROOT/jdk"
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850###############################################################################
15851#
15852# Pickup additional source for a component from outside of the source root
15853# or override source for a component.
15854#
15855
15856# Check whether --with-add-source-root was given.
15857if test "${with_add_source_root+set}" = set; then :
15858  withval=$with_add_source_root;
15859fi
15860
15861
15862
15863# Check whether --with-override-source-root was given.
15864if test "${with_override_source_root+set}" = set; then :
15865  withval=$with_override_source_root;
15866fi
15867
15868
15869
15870# Check whether --with-adds-and-overrides was given.
15871if test "${with_adds_and_overrides+set}" = set; then :
15872  withval=$with_adds_and_overrides;
15873fi
15874
15875
15876if test "x$with_adds_and_overrides" != x; then
15877    with_add_source_root="$with_adds_and_overrides/adds"
15878    with_override_source_root="$with_adds_and_overrides/overrides"
15879fi
15880
15881if test "x$with_add_source_root" != x; then
15882    if ! test -d $with_add_source_root; then
15883       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15884    fi
15885    CURDIR="$PWD"
15886    cd "$with_add_source_root"
15887    ADD_SRC_ROOT="`pwd`"
15888    cd "$CURDIR"
15889    # Verify that the addon source root does not have any root makefiles.
15890    # If it does, then it is usually an error, prevent this.
15891    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15892       test -f $with_add_source_root/langtools/make/Makefile; then
15893        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
15894    fi
15895    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15896       test -f $with_add_source_root/corba/make/Makefile; then
15897        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
15898    fi
15899    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15900       test -f $with_add_source_root/jaxp/make/Makefile; then
15901        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
15902    fi
15903    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15904       test -f $with_add_source_root/jaxws/make/Makefile; then
15905        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
15906    fi
15907    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15908       test -f $with_add_source_root/hotspot/make/Makefile; then
15909        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
15910    fi
15911    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15912       test -f $with_add_source_root/jdk/make/Makefile; then
15913        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
15914    fi
15915fi
15916
15917
15918if test "x$with_override_source_root" != x; then
15919    if ! test -d $with_override_source_root; then
15920       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15921    fi
15922    CURDIR="$PWD"
15923    cd "$with_override_source_root"
15924    OVERRIDE_SRC_ROOT="`pwd`"
15925    cd "$CURDIR"
15926    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15927       test -f $with_override_source_root/langtools/make/Makefile; then
15928        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
15929    fi
15930    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15931       test -f $with_override_source_root/corba/make/Makefile; then
15932        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
15933    fi
15934    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15935       test -f $with_override_source_root/jaxp/make/Makefile; then
15936        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
15937    fi
15938    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15939       test -f $with_override_source_root/jaxws/make/Makefile; then
15940        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
15941    fi
15942    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15943       test -f $with_override_source_root/hotspot/make/Makefile; then
15944        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
15945    fi
15946    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15947       test -f $with_override_source_root/jdk/make/Makefile; then
15948        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
15949    fi
15950fi
15951
15952
15953###############################################################################
15954#
15955# Override a repo completely, this is used for example when you have 3 small
15956# development sandboxes of the langtools sources and want to avoid having 3 full
15957# OpenJDK sources checked out on disk.
15958#
15959# Assuming that the 3 langtools sandboxes are located here:
15960# /home/fredrik/sandbox1/langtools
15961# /home/fredrik/sandbox2/langtools
15962# /home/fredrik/sandbox3/langtools
15963#
15964# From the source root you create build subdirs manually:
15965#     mkdir -p build1 build2 build3
15966# in each build directory run:
15967#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15968#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15969#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15970#
15971
15972
15973# Check whether --with-override-langtools was given.
15974if test "${with_override_langtools+set}" = set; then :
15975  withval=$with_override_langtools;
15976fi
15977
15978
15979
15980# Check whether --with-override-corba was given.
15981if test "${with_override_corba+set}" = set; then :
15982  withval=$with_override_corba;
15983fi
15984
15985
15986
15987# Check whether --with-override-jaxp was given.
15988if test "${with_override_jaxp+set}" = set; then :
15989  withval=$with_override_jaxp;
15990fi
15991
15992
15993
15994# Check whether --with-override-jaxws was given.
15995if test "${with_override_jaxws+set}" = set; then :
15996  withval=$with_override_jaxws;
15997fi
15998
15999
16000
16001# Check whether --with-override-hotspot was given.
16002if test "${with_override_hotspot+set}" = set; then :
16003  withval=$with_override_hotspot;
16004fi
16005
16006
16007
16008# Check whether --with-override-jdk was given.
16009if test "${with_override_jdk+set}" = set; then :
16010  withval=$with_override_jdk;
16011fi
16012
16013
16014if test "x$with_override_langtools" != x; then
16015    CURDIR="$PWD"
16016    cd "$with_override_langtools"
16017    LANGTOOLS_TOPDIR="`pwd`"
16018    cd "$CURDIR"
16019    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16020        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16021    fi
16022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16023$as_echo_n "checking if langtools should be overridden... " >&6; }
16024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16025$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16026fi
16027if test "x$with_override_corba" != x; then
16028    CURDIR="$PWD"
16029    cd "$with_override_corba"
16030    CORBA_TOPDIR="`pwd`"
16031    cd "$CURDIR"
16032    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16033        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16034    fi
16035    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16036$as_echo_n "checking if corba should be overridden... " >&6; }
16037    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16038$as_echo "yes with $CORBA_TOPDIR" >&6; }
16039fi
16040if test "x$with_override_jaxp" != x; then
16041    CURDIR="$PWD"
16042    cd "$with_override_jaxp"
16043    JAXP_TOPDIR="`pwd`"
16044    cd "$CURDIR"
16045    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16046        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16047    fi
16048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16049$as_echo_n "checking if jaxp should be overridden... " >&6; }
16050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16051$as_echo "yes with $JAXP_TOPDIR" >&6; }
16052fi
16053if test "x$with_override_jaxws" != x; then
16054    CURDIR="$PWD"
16055    cd "$with_override_jaxws"
16056    JAXWS_TOPDIR="`pwd`"
16057    cd "$CURDIR"
16058    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16059        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16060    fi
16061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16062$as_echo_n "checking if jaxws should be overridden... " >&6; }
16063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16064$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16065fi
16066if test "x$with_override_hotspot" != x; then
16067    CURDIR="$PWD"
16068    cd "$with_override_hotspot"
16069    HOTSPOT_TOPDIR="`pwd`"
16070    cd "$CURDIR"
16071    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16072       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16073        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16074    fi
16075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16076$as_echo_n "checking if hotspot should be overridden... " >&6; }
16077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16078$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16079fi
16080if test "x$with_override_nashorn" != x; then
16081    CURDIR="$PWD"
16082    cd "$with_override_nashorn"
16083    NASHORN_TOPDIR="`pwd`"
16084    cd "$CURDIR"
16085    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16086        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16087    fi
16088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16089$as_echo_n "checking if nashorn should be overridden... " >&6; }
16090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16091$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16092fi
16093if test "x$with_override_jdk" != x; then
16094    CURDIR="$PWD"
16095    cd "$with_override_jdk"
16096    JDK_TOPDIR="`pwd`"
16097    cd "$CURDIR"
16098    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16099        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16100    fi
16101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16102$as_echo_n "checking if JDK should be overridden... " >&6; }
16103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16104$as_echo "yes with $JDK_TOPDIR" >&6; }
16105fi
16106
16107
16108
16109BUILD_OUTPUT="$OUTPUT_ROOT"
16110
16111
16112HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16113BUILD_HOTSPOT=true
16114
16115
16116
16117# Check whether --with-import-hotspot was given.
16118if test "${with_import_hotspot+set}" = set; then :
16119  withval=$with_import_hotspot;
16120fi
16121
16122if test "x$with_import_hotspot" != x; then
16123    CURDIR="$PWD"
16124    cd "$with_import_hotspot"
16125    HOTSPOT_DIST="`pwd`"
16126    cd "$CURDIR"
16127    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16128        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16129    fi
16130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16131$as_echo_n "checking if hotspot should be imported... " >&6; }
16132    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16133$as_echo "yes from $HOTSPOT_DIST" >&6; }
16134    BUILD_HOTSPOT=false
16135fi
16136
16137JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16138
16139
16140###############################################################################
16141#
16142# Setup the toolchain (compilers etc), i.e. the tools that need to be
16143# cross-compilation aware.
16144#
16145###############################################################################
16146
16147
16148###############################################################################
16149#
16150# Configure the development tool paths and potential sysroot.
16151#
16152ac_ext=cpp
16153ac_cpp='$CXXCPP $CPPFLAGS'
16154ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16155ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16156ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16157
16158
16159# The option used to specify the target .o,.a or .so file.
16160# When compiling, how to specify the to be created object file.
16161CC_OUT_OPTION='-o$(SPACE)'
16162# When linking, how to specify the to be created executable.
16163EXE_OUT_OPTION='-o$(SPACE)'
16164# When linking, how to specify the to be created dynamically linkable library.
16165LD_OUT_OPTION='-o$(SPACE)'
16166# When archiving, how to specify the to be create static archive for object files.
16167AR_OUT_OPTION='rcs$(SPACE)'
16168
16169
16170
16171
16172
16173# Locate the actual tools
16174
16175if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16176
16177  # Store path to cygwin link.exe to help excluding it when searching for
16178  # VS linker. This must be done before changing the PATH when looking for VS.
16179  # Extract the first word of "link", so it can be a program name with args.
16180set dummy link; ac_word=$2
16181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16182$as_echo_n "checking for $ac_word... " >&6; }
16183if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16184  $as_echo_n "(cached) " >&6
16185else
16186  case $CYGWIN_LINK in
16187  [\\/]* | ?:[\\/]*)
16188  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16189  ;;
16190  *)
16191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16192for as_dir in $PATH
16193do
16194  IFS=$as_save_IFS
16195  test -z "$as_dir" && as_dir=.
16196    for ac_exec_ext in '' $ac_executable_extensions; do
16197  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16198    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16200    break 2
16201  fi
16202done
16203  done
16204IFS=$as_save_IFS
16205
16206  ;;
16207esac
16208fi
16209CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16210if test -n "$CYGWIN_LINK"; then
16211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16212$as_echo "$CYGWIN_LINK" >&6; }
16213else
16214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16215$as_echo "no" >&6; }
16216fi
16217
16218
16219  if test "x$CYGWIN_LINK" != x; then
16220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16221$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16222    "$CYGWIN_LINK" --version > /dev/null
16223    if test $? -eq 0 ; then
16224      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16225$as_echo "yes" >&6; }
16226    else
16227      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16228$as_echo "no" >&6; }
16229      # This might be the VS linker. Don't exclude it later on.
16230      CYGWIN_LINK=""
16231    fi
16232  fi
16233
16234  # First-hand choice is to locate and run the vsvars bat file.
16235
16236  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16237    VCVARSFILE="vc/bin/vcvars32.bat"
16238  else
16239    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16240  fi
16241
16242  VS_ENV_CMD=""
16243  VS_ENV_ARGS=""
16244  if test "x$with_toolsdir" != x; then
16245
16246  if test "x$VS_ENV_CMD" = x; then
16247    VS100BASE="$with_toolsdir/../.."
16248    METHOD="--with-tools-dir"
16249
16250  windows_path="$VS100BASE"
16251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16252    unix_path=`$CYGPATH -u "$windows_path"`
16253    VS100BASE="$unix_path"
16254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16256    VS100BASE="$unix_path"
16257  fi
16258
16259    if test -d "$VS100BASE"; then
16260      if test -f "$VS100BASE/$VCVARSFILE"; then
16261        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16262$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16263        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16264      else
16265        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16266$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16267        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16268$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16269      fi
16270    fi
16271  fi
16272
16273  fi
16274
16275  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16276    # Having specified an argument which is incorrect will produce an instant failure;
16277    # we should not go on looking
16278    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16279$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16280    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16281$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16282    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16283  fi
16284
16285  if test "x$ProgramW6432" != x; then
16286
16287  if test "x$VS_ENV_CMD" = x; then
16288    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16289    METHOD="well-known name"
16290
16291  windows_path="$WIN_SDK_BASE"
16292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16293    unix_path=`$CYGPATH -u "$windows_path"`
16294    WIN_SDK_BASE="$unix_path"
16295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16297    WIN_SDK_BASE="$unix_path"
16298  fi
16299
16300    if test -d "$WIN_SDK_BASE"; then
16301      # There have been cases of partial or broken SDK installations. A missing
16302      # lib dir is not going to work.
16303      if test ! -d "$WIN_SDK_BASE/../lib"; then
16304        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16305$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16306        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16307$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16308      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16309        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16310$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16311        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16312        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16313          VS_ENV_ARGS="/x86"
16314        else
16315          VS_ENV_ARGS="/x64"
16316        fi
16317      else
16318        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16319$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16320        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16321$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16322      fi
16323    fi
16324  fi
16325
16326  fi
16327  if test "x$PROGRAMW6432" != x; then
16328
16329  if test "x$VS_ENV_CMD" = x; then
16330    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16331    METHOD="well-known name"
16332
16333  windows_path="$WIN_SDK_BASE"
16334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16335    unix_path=`$CYGPATH -u "$windows_path"`
16336    WIN_SDK_BASE="$unix_path"
16337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16339    WIN_SDK_BASE="$unix_path"
16340  fi
16341
16342    if test -d "$WIN_SDK_BASE"; then
16343      # There have been cases of partial or broken SDK installations. A missing
16344      # lib dir is not going to work.
16345      if test ! -d "$WIN_SDK_BASE/../lib"; then
16346        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16347$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16348        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16349$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16350      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16351        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16352$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16353        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16354        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16355          VS_ENV_ARGS="/x86"
16356        else
16357          VS_ENV_ARGS="/x64"
16358        fi
16359      else
16360        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16361$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16362        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16363$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16364      fi
16365    fi
16366  fi
16367
16368  fi
16369  if test "x$PROGRAMFILES" != x; then
16370
16371  if test "x$VS_ENV_CMD" = x; then
16372    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16373    METHOD="well-known name"
16374
16375  windows_path="$WIN_SDK_BASE"
16376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16377    unix_path=`$CYGPATH -u "$windows_path"`
16378    WIN_SDK_BASE="$unix_path"
16379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16381    WIN_SDK_BASE="$unix_path"
16382  fi
16383
16384    if test -d "$WIN_SDK_BASE"; then
16385      # There have been cases of partial or broken SDK installations. A missing
16386      # lib dir is not going to work.
16387      if test ! -d "$WIN_SDK_BASE/../lib"; then
16388        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16389$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16390        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16391$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16392      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16393        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16394$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16395        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16396        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16397          VS_ENV_ARGS="/x86"
16398        else
16399          VS_ENV_ARGS="/x64"
16400        fi
16401      else
16402        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16403$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16404        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16405$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16406      fi
16407    fi
16408  fi
16409
16410  fi
16411
16412  if test "x$VS_ENV_CMD" = x; then
16413    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16414    METHOD="well-known name"
16415
16416  windows_path="$WIN_SDK_BASE"
16417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16418    unix_path=`$CYGPATH -u "$windows_path"`
16419    WIN_SDK_BASE="$unix_path"
16420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16422    WIN_SDK_BASE="$unix_path"
16423  fi
16424
16425    if test -d "$WIN_SDK_BASE"; then
16426      # There have been cases of partial or broken SDK installations. A missing
16427      # lib dir is not going to work.
16428      if test ! -d "$WIN_SDK_BASE/../lib"; then
16429        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16430$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16431        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16432$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16433      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16434        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16435$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16436        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16437        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16438          VS_ENV_ARGS="/x86"
16439        else
16440          VS_ENV_ARGS="/x64"
16441        fi
16442      else
16443        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16444$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16445        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16446$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16447      fi
16448    fi
16449  fi
16450
16451
16452  if test "x$VS_ENV_CMD" = x; then
16453    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16454    METHOD="well-known name"
16455
16456  windows_path="$WIN_SDK_BASE"
16457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16458    unix_path=`$CYGPATH -u "$windows_path"`
16459    WIN_SDK_BASE="$unix_path"
16460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16462    WIN_SDK_BASE="$unix_path"
16463  fi
16464
16465    if test -d "$WIN_SDK_BASE"; then
16466      # There have been cases of partial or broken SDK installations. A missing
16467      # lib dir is not going to work.
16468      if test ! -d "$WIN_SDK_BASE/../lib"; then
16469        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16470$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16471        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16472$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16473      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16474        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16475$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16476        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16477        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16478          VS_ENV_ARGS="/x86"
16479        else
16480          VS_ENV_ARGS="/x64"
16481        fi
16482      else
16483        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16484$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16485        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16486$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16487      fi
16488    fi
16489  fi
16490
16491
16492  if test "x$VS100COMNTOOLS" != x; then
16493
16494  if test "x$VS_ENV_CMD" = x; then
16495    VS100BASE="$VS100COMNTOOLS/../.."
16496    METHOD="VS100COMNTOOLS variable"
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  fi
16522  if test "x$PROGRAMFILES" != x; then
16523
16524  if test "x$VS_ENV_CMD" = x; then
16525    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16526    METHOD="well-known name"
16527
16528  windows_path="$VS100BASE"
16529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16530    unix_path=`$CYGPATH -u "$windows_path"`
16531    VS100BASE="$unix_path"
16532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16534    VS100BASE="$unix_path"
16535  fi
16536
16537    if test -d "$VS100BASE"; then
16538      if test -f "$VS100BASE/$VCVARSFILE"; then
16539        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16540$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16541        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16542      else
16543        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16544$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16545        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16546$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16547      fi
16548    fi
16549  fi
16550
16551  fi
16552
16553  if test "x$VS_ENV_CMD" = x; then
16554    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16555    METHOD="well-known name"
16556
16557  windows_path="$VS100BASE"
16558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16559    unix_path=`$CYGPATH -u "$windows_path"`
16560    VS100BASE="$unix_path"
16561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16563    VS100BASE="$unix_path"
16564  fi
16565
16566    if test -d "$VS100BASE"; then
16567      if test -f "$VS100BASE/$VCVARSFILE"; then
16568        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16569$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16570        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16571      else
16572        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16573$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16574        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16575$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16576      fi
16577    fi
16578  fi
16579
16580
16581  if test "x$VS_ENV_CMD" = x; then
16582    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16583    METHOD="well-known name"
16584
16585  windows_path="$VS100BASE"
16586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16587    unix_path=`$CYGPATH -u "$windows_path"`
16588    VS100BASE="$unix_path"
16589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16591    VS100BASE="$unix_path"
16592  fi
16593
16594    if test -d "$VS100BASE"; then
16595      if test -f "$VS100BASE/$VCVARSFILE"; then
16596        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16597$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16598        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16599      else
16600        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16601$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16602        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16603$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16604      fi
16605    fi
16606  fi
16607
16608
16609  if test "x$VS_ENV_CMD" != x; then
16610    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16611
16612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16613
16614  # First separate the path from the arguments. This will split at the first
16615  # space.
16616  complete="$VS_ENV_CMD"
16617  path="${complete%% *}"
16618  tmp="$complete EOL"
16619  arguments="${tmp#* }"
16620
16621  # Input might be given as Windows format, start by converting to
16622  # unix format.
16623  new_path=`$CYGPATH -u "$path"`
16624
16625  # Now try to locate executable using which
16626  new_path=`$WHICH "$new_path" 2> /dev/null`
16627  # bat and cmd files are not always considered executable in cygwin causing which
16628  # to not find them
16629  if test "x$new_path" = x \
16630           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16631           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16632    new_path=`$CYGPATH -u "$path"`
16633  fi
16634  if test "x$new_path" = x; then
16635    # Oops. Which didn't find the executable.
16636    # The splitting of arguments from the executable at a space might have been incorrect,
16637    # since paths with space are more likely in Windows. Give it another try with the whole
16638    # argument.
16639    path="$complete"
16640    arguments="EOL"
16641    new_path=`$CYGPATH -u "$path"`
16642    new_path=`$WHICH "$new_path" 2> /dev/null`
16643    # bat and cmd files are not always considered executable in cygwin causing which
16644    # to not find them
16645    if test "x$new_path" = x \
16646             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16647             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16648      new_path=`$CYGPATH -u "$path"`
16649    fi
16650    if test "x$new_path" = x; then
16651      # It's still not found. Now this is an unrecoverable error.
16652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16653$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16654      has_space=`$ECHO "$complete" | $GREP " "`
16655      if test "x$has_space" != x; then
16656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16658      fi
16659      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16660    fi
16661  fi
16662
16663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16666  # "foo.exe" is OK but "foo" is an error.
16667  #
16668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16669  # It is also a way to make sure we got the proper file name for the real test later on.
16670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16671  if test "x$test_shortpath" = x; then
16672    # Short path failed, file does not exist as specified.
16673    # Try adding .exe or .cmd
16674    if test -f "${new_path}.exe"; then
16675       input_to_shortpath="${new_path}.exe"
16676    elif test -f "${new_path}.cmd"; then
16677       input_to_shortpath="${new_path}.cmd"
16678    else
16679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16680$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16681      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16682$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16683      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16684    fi
16685  else
16686    input_to_shortpath="$new_path"
16687  fi
16688
16689  # Call helper function which possibly converts this using DOS-style short mode.
16690  # If so, the updated path is stored in $new_path.
16691  new_path="$input_to_shortpath"
16692
16693  input_path="$input_to_shortpath"
16694  # Check if we need to convert this using DOS-style short mode. If the path
16695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16696  # take no chances and rewrite it.
16697  # Note: m4 eats our [], so we need to use [ and ] instead.
16698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16699  if test "x$has_forbidden_chars" != x; then
16700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16704      # Going to short mode and back again did indeed matter. Since short mode is
16705      # case insensitive, let's make it lowercase to improve readability.
16706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16707      # Now convert it back to Unix-stile (cygpath)
16708      input_path=`$CYGPATH -u "$shortmode_path"`
16709      new_path="$input_path"
16710    fi
16711  fi
16712
16713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16714  if test "x$test_cygdrive_prefix" = x; then
16715    # As a simple fix, exclude /usr/bin since it's not a real path.
16716    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16718      # a path prefixed by /cygdrive for fixpath to work.
16719      new_path="$CYGWIN_ROOT_PATH$input_path"
16720    fi
16721  fi
16722
16723  # remove trailing .exe if any
16724  new_path="${new_path/%.exe/}"
16725
16726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16727
16728  # First separate the path from the arguments. This will split at the first
16729  # space.
16730  complete="$VS_ENV_CMD"
16731  path="${complete%% *}"
16732  tmp="$complete EOL"
16733  arguments="${tmp#* }"
16734
16735  # Input might be given as Windows format, start by converting to
16736  # unix format.
16737  new_path="$path"
16738
16739  windows_path="$new_path"
16740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16741    unix_path=`$CYGPATH -u "$windows_path"`
16742    new_path="$unix_path"
16743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16745    new_path="$unix_path"
16746  fi
16747
16748
16749  # Now try to locate executable using which
16750  new_path=`$WHICH "$new_path" 2> /dev/null`
16751
16752  if test "x$new_path" = x; then
16753    # Oops. Which didn't find the executable.
16754    # The splitting of arguments from the executable at a space might have been incorrect,
16755    # since paths with space are more likely in Windows. Give it another try with the whole
16756    # argument.
16757    path="$complete"
16758    arguments="EOL"
16759    new_path="$path"
16760
16761  windows_path="$new_path"
16762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16763    unix_path=`$CYGPATH -u "$windows_path"`
16764    new_path="$unix_path"
16765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16767    new_path="$unix_path"
16768  fi
16769
16770
16771    new_path=`$WHICH "$new_path" 2> /dev/null`
16772
16773    if test "x$new_path" = x; then
16774      # It's still not found. Now this is an unrecoverable error.
16775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16776$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16777      has_space=`$ECHO "$complete" | $GREP " "`
16778      if test "x$has_space" != x; then
16779        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16780$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16781      fi
16782      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16783    fi
16784  fi
16785
16786  # Now new_path has a complete unix path to the binary
16787  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16788    # Keep paths in /bin as-is, but remove trailing .exe if any
16789    new_path="${new_path/%.exe/}"
16790    # Do not save /bin paths to all_fixpath_prefixes!
16791  else
16792    # Not in mixed or Windows style, start by that.
16793    new_path=`cmd //c echo $new_path`
16794
16795  input_path="$new_path"
16796  # Check if we need to convert this using DOS-style short mode. If the path
16797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16798  # take no chances and rewrite it.
16799  # Note: m4 eats our [], so we need to use [ and ] instead.
16800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16801  if test "x$has_forbidden_chars" != x; then
16802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16804  fi
16805
16806    # Output is in $new_path
16807
16808  windows_path="$new_path"
16809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16810    unix_path=`$CYGPATH -u "$windows_path"`
16811    new_path="$unix_path"
16812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16814    new_path="$unix_path"
16815  fi
16816
16817    # remove trailing .exe if any
16818    new_path="${new_path/%.exe/}"
16819
16820    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16821    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16822  fi
16823
16824  else
16825    # We're on a posix platform. Hooray! :)
16826    # First separate the path from the arguments. This will split at the first
16827    # space.
16828    complete="$VS_ENV_CMD"
16829    path="${complete%% *}"
16830    tmp="$complete EOL"
16831    arguments="${tmp#* }"
16832
16833    # Cannot rely on the command "which" here since it doesn't always work.
16834    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16835    if test -z "$is_absolute_path"; then
16836      # Path to executable is not absolute. Find it.
16837      IFS_save="$IFS"
16838      IFS=:
16839      for p in $PATH; do
16840        if test -f "$p/$path" && test -x "$p/$path"; then
16841          new_path="$p/$path"
16842          break
16843        fi
16844      done
16845      IFS="$IFS_save"
16846    else
16847      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16848$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16849      new_path="$path"
16850    fi
16851
16852    if test "x$new_path" = x; then
16853        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16854$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16855        has_space=`$ECHO "$complete" | $GREP " "`
16856        if test "x$has_space" != x; then
16857          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16858$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16859        fi
16860        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16861      fi
16862  fi
16863
16864      # Now join together the path and the arguments once again
16865      if test "x$arguments" != xEOL; then
16866        new_complete="$new_path ${arguments% *}"
16867      else
16868        new_complete="$new_path"
16869      fi
16870
16871  if test "x$complete" != "x$new_complete"; then
16872      VS_ENV_CMD="$new_complete"
16873      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16874$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16875    fi
16876
16877
16878    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16879    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16880$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16881    cd $OUTPUT_ROOT
16882    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16883    # to autoconf standards.
16884
16885    #----
16886
16887    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16888    # but calculate the difference in Cygwin environment before/after running it and then
16889    # apply the diff.
16890
16891    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16892      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16893      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16894      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16895    else
16896      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16897      _dosbash=`cmd //c echo \`which bash\``
16898    fi
16899
16900    # generate the set of exported vars before/after the vs10 setup
16901    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16902    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16903    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16904    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16905
16906    # Now execute the newly created bat file.
16907    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16908    cmd /c localdevenvtmp.bat | cat
16909
16910    # apply the diff (less some non-vs10 vars named by "!")
16911    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16912    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16913    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16914
16915    # cleanup
16916    $RM localdevenvtmp*
16917    #----
16918    cd $CURDIR
16919    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16920      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16921$as_echo "no" >&6; }
16922      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16923$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16924      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16925$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16926      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16927$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16928      as_fn_error $? "Cannot continue" "$LINENO" 5
16929    fi
16930
16931    # Now set all paths and other env variables. This will allow the rest of
16932    # the configure script to find and run the compiler in the proper way.
16933    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16934$as_echo "$as_me: Setting extracted environment variables" >&6;}
16935    . $OUTPUT_ROOT/localdevenv.sh
16936  else
16937    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16938    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16939$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16940  fi
16941
16942  # At this point, we should have corrent variables in the environment, or we can't continue.
16943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16944$as_echo_n "checking for Visual Studio variables... " >&6; }
16945
16946  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16947    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16948      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16949$as_echo "present but broken" >&6; }
16950      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16951    else
16952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16953$as_echo "ok" >&6; }
16954      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16955      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16956      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16957      VS_PATH="$PATH"
16958
16959
16960
16961    fi
16962  else
16963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16964$as_echo "not found" >&6; }
16965
16966    if test "x$VS_ENV_CMD" = x; then
16967      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16968$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16969      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16970$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16971    else
16972      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16973$as_echo "$as_me: Running the extraction script failed." >&6;}
16974    fi
16975    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16976$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16977    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16978$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16979    as_fn_error $? "Cannot continue" "$LINENO" 5
16980  fi
16981
16982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16983$as_echo_n "checking for msvcr100.dll... " >&6; }
16984
16985# Check whether --with-msvcr-dll was given.
16986if test "${with_msvcr_dll+set}" = set; then :
16987  withval=$with_msvcr_dll;
16988fi
16989
16990  if test "x$with_msvcr_dll" != x; then
16991    MSVCR_DLL="$with_msvcr_dll"
16992  else
16993    if test "x$VCINSTALLDIR" != x; then
16994      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16995        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16996      else
16997        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16998        if test "x$MSVCR_DLL" = x; then
16999          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17000        fi
17001      fi
17002      if test "x$MSVCR_DLL" != x; then
17003        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17004$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17005      else
17006        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17007$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17008      fi
17009    fi
17010    if test "x$MSVCR_DLL" = x; then
17011      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17012        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17013$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17014        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17015      fi
17016    fi
17017  fi
17018  if test "x$MSVCR_DLL" = x; then
17019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17020$as_echo "no" >&6; }
17021    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17022  fi
17023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17024$as_echo "$MSVCR_DLL" >&6; }
17025
17026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17027
17028  # Input might be given as Windows format, start by converting to
17029  # unix format.
17030  path="$MSVCR_DLL"
17031  new_path=`$CYGPATH -u "$path"`
17032
17033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17036  # "foo.exe" is OK but "foo" is an error.
17037  #
17038  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17039  # It is also a way to make sure we got the proper file name for the real test later on.
17040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17041  if test "x$test_shortpath" = x; then
17042    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17043$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17044    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17045  fi
17046
17047  # Call helper function which possibly converts this using DOS-style short mode.
17048  # If so, the updated path is stored in $new_path.
17049
17050  input_path="$new_path"
17051  # Check if we need to convert this using DOS-style short mode. If the path
17052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17053  # take no chances and rewrite it.
17054  # Note: m4 eats our [], so we need to use [ and ] instead.
17055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17056  if test "x$has_forbidden_chars" != x; then
17057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17061      # Going to short mode and back again did indeed matter. Since short mode is
17062      # case insensitive, let's make it lowercase to improve readability.
17063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17064      # Now convert it back to Unix-stile (cygpath)
17065      input_path=`$CYGPATH -u "$shortmode_path"`
17066      new_path="$input_path"
17067    fi
17068  fi
17069
17070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17071  if test "x$test_cygdrive_prefix" = x; then
17072    # As a simple fix, exclude /usr/bin since it's not a real path.
17073    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17075      # a path prefixed by /cygdrive for fixpath to work.
17076      new_path="$CYGWIN_ROOT_PATH$input_path"
17077    fi
17078  fi
17079
17080
17081  if test "x$path" != "x$new_path"; then
17082    MSVCR_DLL="$new_path"
17083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17084$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17085  fi
17086
17087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17088
17089  path="$MSVCR_DLL"
17090  has_colon=`$ECHO $path | $GREP ^.:`
17091  new_path="$path"
17092  if test "x$has_colon" = x; then
17093    # Not in mixed or Windows style, start by that.
17094    new_path=`cmd //c echo $path`
17095  fi
17096
17097
17098  input_path="$new_path"
17099  # Check if we need to convert this using DOS-style short mode. If the path
17100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17101  # take no chances and rewrite it.
17102  # Note: m4 eats our [], so we need to use [ and ] instead.
17103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17104  if test "x$has_forbidden_chars" != x; then
17105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17106    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17107  fi
17108
17109
17110  windows_path="$new_path"
17111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17112    unix_path=`$CYGPATH -u "$windows_path"`
17113    new_path="$unix_path"
17114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17116    new_path="$unix_path"
17117  fi
17118
17119  if test "x$path" != "x$new_path"; then
17120    MSVCR_DLL="$new_path"
17121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17122$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17123  fi
17124
17125  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17126  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17127
17128  else
17129    # We're on a posix platform. Hooray! :)
17130    path="$MSVCR_DLL"
17131
17132    if test ! -f "$path" && test ! -d "$path"; then
17133      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17134    fi
17135
17136    has_space=`$ECHO "$path" | $GREP " "`
17137    if test "x$has_space" != x; then
17138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17139$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17140      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17141    fi
17142  fi
17143
17144
17145
17146
17147# Check whether --with-dxsdk was given.
17148if test "${with_dxsdk+set}" = set; then :
17149  withval=$with_dxsdk;
17150fi
17151
17152
17153# Check whether --with-dxsdk-lib was given.
17154if test "${with_dxsdk_lib+set}" = set; then :
17155  withval=$with_dxsdk_lib;
17156fi
17157
17158
17159# Check whether --with-dxsdk-include was given.
17160if test "${with_dxsdk_include+set}" = set; then :
17161  withval=$with_dxsdk_include;
17162fi
17163
17164
17165  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17166$as_echo_n "checking for DirectX SDK... " >&6; }
17167
17168  if test "x$with_dxsdk" != x; then
17169    dxsdk_path="$with_dxsdk"
17170  elif test "x$DXSDK_DIR" != x; then
17171    dxsdk_path="$DXSDK_DIR"
17172  elif test -d "C:/DXSDK"; then
17173    dxsdk_path="C:/DXSDK"
17174  else
17175    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17176  fi
17177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17178$as_echo "$dxsdk_path" >&6; }
17179
17180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17181
17182  # Input might be given as Windows format, start by converting to
17183  # unix format.
17184  path="$dxsdk_path"
17185  new_path=`$CYGPATH -u "$path"`
17186
17187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17190  # "foo.exe" is OK but "foo" is an error.
17191  #
17192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17193  # It is also a way to make sure we got the proper file name for the real test later on.
17194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17195  if test "x$test_shortpath" = x; then
17196    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17197$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17198    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17199  fi
17200
17201  # Call helper function which possibly converts this using DOS-style short mode.
17202  # If so, the updated path is stored in $new_path.
17203
17204  input_path="$new_path"
17205  # Check if we need to convert this using DOS-style short mode. If the path
17206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17207  # take no chances and rewrite it.
17208  # Note: m4 eats our [], so we need to use [ and ] instead.
17209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17210  if test "x$has_forbidden_chars" != x; then
17211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17215      # Going to short mode and back again did indeed matter. Since short mode is
17216      # case insensitive, let's make it lowercase to improve readability.
17217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17218      # Now convert it back to Unix-stile (cygpath)
17219      input_path=`$CYGPATH -u "$shortmode_path"`
17220      new_path="$input_path"
17221    fi
17222  fi
17223
17224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17225  if test "x$test_cygdrive_prefix" = x; then
17226    # As a simple fix, exclude /usr/bin since it's not a real path.
17227    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17229      # a path prefixed by /cygdrive for fixpath to work.
17230      new_path="$CYGWIN_ROOT_PATH$input_path"
17231    fi
17232  fi
17233
17234
17235  if test "x$path" != "x$new_path"; then
17236    dxsdk_path="$new_path"
17237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17238$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17239  fi
17240
17241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17242
17243  path="$dxsdk_path"
17244  has_colon=`$ECHO $path | $GREP ^.:`
17245  new_path="$path"
17246  if test "x$has_colon" = x; then
17247    # Not in mixed or Windows style, start by that.
17248    new_path=`cmd //c echo $path`
17249  fi
17250
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17261  fi
17262
17263
17264  windows_path="$new_path"
17265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17266    unix_path=`$CYGPATH -u "$windows_path"`
17267    new_path="$unix_path"
17268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17270    new_path="$unix_path"
17271  fi
17272
17273  if test "x$path" != "x$new_path"; then
17274    dxsdk_path="$new_path"
17275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17276$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17277  fi
17278
17279  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17280  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17281
17282  else
17283    # We're on a posix platform. Hooray! :)
17284    path="$dxsdk_path"
17285
17286    if test ! -f "$path" && test ! -d "$path"; then
17287      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17288    fi
17289
17290    has_space=`$ECHO "$path" | $GREP " "`
17291    if test "x$has_space" != x; then
17292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17293$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17294      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17295    fi
17296  fi
17297
17298
17299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17300$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17301  if test "x$with_dxsdk_lib" != x; then
17302    DXSDK_LIB_PATH="$with_dxsdk_lib"
17303  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17304    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17305  else
17306    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17307  fi
17308  # dsound.lib is linked to in jsoundds
17309  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17310    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17311  fi
17312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17313$as_echo "$DXSDK_LIB_PATH" >&6; }
17314
17315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17316
17317  # Input might be given as Windows format, start by converting to
17318  # unix format.
17319  path="$DXSDK_LIB_PATH"
17320  new_path=`$CYGPATH -u "$path"`
17321
17322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17325  # "foo.exe" is OK but "foo" is an error.
17326  #
17327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17328  # It is also a way to make sure we got the proper file name for the real test later on.
17329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17330  if test "x$test_shortpath" = x; then
17331    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17332$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17333    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17334  fi
17335
17336  # Call helper function which possibly converts this using DOS-style short mode.
17337  # If so, the updated path is stored in $new_path.
17338
17339  input_path="$new_path"
17340  # Check if we need to convert this using DOS-style short mode. If the path
17341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17342  # take no chances and rewrite it.
17343  # Note: m4 eats our [], so we need to use [ and ] instead.
17344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17345  if test "x$has_forbidden_chars" != x; then
17346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17350      # Going to short mode and back again did indeed matter. Since short mode is
17351      # case insensitive, let's make it lowercase to improve readability.
17352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17353      # Now convert it back to Unix-stile (cygpath)
17354      input_path=`$CYGPATH -u "$shortmode_path"`
17355      new_path="$input_path"
17356    fi
17357  fi
17358
17359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17360  if test "x$test_cygdrive_prefix" = x; then
17361    # As a simple fix, exclude /usr/bin since it's not a real path.
17362    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17364      # a path prefixed by /cygdrive for fixpath to work.
17365      new_path="$CYGWIN_ROOT_PATH$input_path"
17366    fi
17367  fi
17368
17369
17370  if test "x$path" != "x$new_path"; then
17371    DXSDK_LIB_PATH="$new_path"
17372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17373$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17374  fi
17375
17376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17377
17378  path="$DXSDK_LIB_PATH"
17379  has_colon=`$ECHO $path | $GREP ^.:`
17380  new_path="$path"
17381  if test "x$has_colon" = x; then
17382    # Not in mixed or Windows style, start by that.
17383    new_path=`cmd //c echo $path`
17384  fi
17385
17386
17387  input_path="$new_path"
17388  # Check if we need to convert this using DOS-style short mode. If the path
17389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17390  # take no chances and rewrite it.
17391  # Note: m4 eats our [], so we need to use [ and ] instead.
17392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17393  if test "x$has_forbidden_chars" != x; then
17394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17396  fi
17397
17398
17399  windows_path="$new_path"
17400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17401    unix_path=`$CYGPATH -u "$windows_path"`
17402    new_path="$unix_path"
17403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17405    new_path="$unix_path"
17406  fi
17407
17408  if test "x$path" != "x$new_path"; then
17409    DXSDK_LIB_PATH="$new_path"
17410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17411$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17412  fi
17413
17414  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17415  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17416
17417  else
17418    # We're on a posix platform. Hooray! :)
17419    path="$DXSDK_LIB_PATH"
17420
17421    if test ! -f "$path" && test ! -d "$path"; then
17422      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17423    fi
17424
17425    has_space=`$ECHO "$path" | $GREP " "`
17426    if test "x$has_space" != x; then
17427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17428$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17429      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17430    fi
17431  fi
17432
17433
17434  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17435$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17436  if test "x$with_dxsdk_include" != x; then
17437    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17438  else
17439    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17440  fi
17441  # dsound.h is included in jsoundds
17442  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17443    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17444  fi
17445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17446$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17447
17448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17449
17450  # Input might be given as Windows format, start by converting to
17451  # unix format.
17452  path="$DXSDK_INCLUDE_PATH"
17453  new_path=`$CYGPATH -u "$path"`
17454
17455  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17456  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17457  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17458  # "foo.exe" is OK but "foo" is an error.
17459  #
17460  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17461  # It is also a way to make sure we got the proper file name for the real test later on.
17462  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17463  if test "x$test_shortpath" = x; then
17464    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17465$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17466    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17467  fi
17468
17469  # Call helper function which possibly converts this using DOS-style short mode.
17470  # If so, the updated path is stored in $new_path.
17471
17472  input_path="$new_path"
17473  # Check if we need to convert this using DOS-style short mode. If the path
17474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17475  # take no chances and rewrite it.
17476  # Note: m4 eats our [], so we need to use [ and ] instead.
17477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17478  if test "x$has_forbidden_chars" != x; then
17479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17480    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17481    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17482    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17483      # Going to short mode and back again did indeed matter. Since short mode is
17484      # case insensitive, let's make it lowercase to improve readability.
17485      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17486      # Now convert it back to Unix-stile (cygpath)
17487      input_path=`$CYGPATH -u "$shortmode_path"`
17488      new_path="$input_path"
17489    fi
17490  fi
17491
17492  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17493  if test "x$test_cygdrive_prefix" = x; then
17494    # As a simple fix, exclude /usr/bin since it's not a real path.
17495    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17496      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17497      # a path prefixed by /cygdrive for fixpath to work.
17498      new_path="$CYGWIN_ROOT_PATH$input_path"
17499    fi
17500  fi
17501
17502
17503  if test "x$path" != "x$new_path"; then
17504    DXSDK_INCLUDE_PATH="$new_path"
17505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17506$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17507  fi
17508
17509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17510
17511  path="$DXSDK_INCLUDE_PATH"
17512  has_colon=`$ECHO $path | $GREP ^.:`
17513  new_path="$path"
17514  if test "x$has_colon" = x; then
17515    # Not in mixed or Windows style, start by that.
17516    new_path=`cmd //c echo $path`
17517  fi
17518
17519
17520  input_path="$new_path"
17521  # Check if we need to convert this using DOS-style short mode. If the path
17522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17523  # take no chances and rewrite it.
17524  # Note: m4 eats our [], so we need to use [ and ] instead.
17525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17526  if test "x$has_forbidden_chars" != x; then
17527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17529  fi
17530
17531
17532  windows_path="$new_path"
17533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17534    unix_path=`$CYGPATH -u "$windows_path"`
17535    new_path="$unix_path"
17536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17538    new_path="$unix_path"
17539  fi
17540
17541  if test "x$path" != "x$new_path"; then
17542    DXSDK_INCLUDE_PATH="$new_path"
17543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17544$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17545  fi
17546
17547  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17548  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17549
17550  else
17551    # We're on a posix platform. Hooray! :)
17552    path="$DXSDK_INCLUDE_PATH"
17553
17554    if test ! -f "$path" && test ! -d "$path"; then
17555      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17556    fi
17557
17558    has_space=`$ECHO "$path" | $GREP " "`
17559    if test "x$has_space" != x; then
17560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17561$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17562      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17563    fi
17564  fi
17565
17566
17567
17568
17569  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17570
17571fi
17572
17573
17574
17575# If --build AND --host is set, then the configure script will find any
17576# cross compilation tools in the PATH. Cross compilation tools
17577# follows the cross compilation standard where they are prefixed with ${host}.
17578# For example the binary i686-sun-solaris2.10-gcc
17579# will cross compile for i686-sun-solaris2.10
17580# If neither of build and host is not set, then build=host and the
17581# default compiler found in the path will be used.
17582# Setting only --host, does not seem to be really supported.
17583# Please set both --build and --host if you want to cross compile.
17584
17585if test "x$COMPILE_TYPE" = "xcross"; then
17586    # Now we to find a C/C++ compiler that can build executables for the build
17587    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17588    # once. Also, we need to do this before adding a tools dir to the path,
17589    # otherwise we might pick up cross-compilers which don't use standard naming.
17590    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17591    # to wait until they are properly discovered.
17592    for ac_prog in cl cc gcc
17593do
17594  # Extract the first word of "$ac_prog", so it can be a program name with args.
17595set dummy $ac_prog; ac_word=$2
17596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17597$as_echo_n "checking for $ac_word... " >&6; }
17598if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17599  $as_echo_n "(cached) " >&6
17600else
17601  case $BUILD_CC in
17602  [\\/]* | ?:[\\/]*)
17603  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17604  ;;
17605  *)
17606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17607for as_dir in $PATH
17608do
17609  IFS=$as_save_IFS
17610  test -z "$as_dir" && as_dir=.
17611    for ac_exec_ext in '' $ac_executable_extensions; do
17612  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17613    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17615    break 2
17616  fi
17617done
17618  done
17619IFS=$as_save_IFS
17620
17621  ;;
17622esac
17623fi
17624BUILD_CC=$ac_cv_path_BUILD_CC
17625if test -n "$BUILD_CC"; then
17626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17627$as_echo "$BUILD_CC" >&6; }
17628else
17629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17630$as_echo "no" >&6; }
17631fi
17632
17633
17634  test -n "$BUILD_CC" && break
17635done
17636
17637
17638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17639
17640  # First separate the path from the arguments. This will split at the first
17641  # space.
17642  complete="$BUILD_CC"
17643  path="${complete%% *}"
17644  tmp="$complete EOL"
17645  arguments="${tmp#* }"
17646
17647  # Input might be given as Windows format, start by converting to
17648  # unix format.
17649  new_path=`$CYGPATH -u "$path"`
17650
17651  # Now try to locate executable using which
17652  new_path=`$WHICH "$new_path" 2> /dev/null`
17653  # bat and cmd files are not always considered executable in cygwin causing which
17654  # to not find them
17655  if test "x$new_path" = x \
17656           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17657           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17658    new_path=`$CYGPATH -u "$path"`
17659  fi
17660  if test "x$new_path" = x; then
17661    # Oops. Which didn't find the executable.
17662    # The splitting of arguments from the executable at a space might have been incorrect,
17663    # since paths with space are more likely in Windows. Give it another try with the whole
17664    # argument.
17665    path="$complete"
17666    arguments="EOL"
17667    new_path=`$CYGPATH -u "$path"`
17668    new_path=`$WHICH "$new_path" 2> /dev/null`
17669    # bat and cmd files are not always considered executable in cygwin causing which
17670    # to not find them
17671    if test "x$new_path" = x \
17672             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17673             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17674      new_path=`$CYGPATH -u "$path"`
17675    fi
17676    if test "x$new_path" = x; then
17677      # It's still not found. Now this is an unrecoverable error.
17678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17679$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17680      has_space=`$ECHO "$complete" | $GREP " "`
17681      if test "x$has_space" != x; then
17682        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17683$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17684      fi
17685      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17686    fi
17687  fi
17688
17689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17692  # "foo.exe" is OK but "foo" is an error.
17693  #
17694  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17695  # It is also a way to make sure we got the proper file name for the real test later on.
17696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17697  if test "x$test_shortpath" = x; then
17698    # Short path failed, file does not exist as specified.
17699    # Try adding .exe or .cmd
17700    if test -f "${new_path}.exe"; then
17701       input_to_shortpath="${new_path}.exe"
17702    elif test -f "${new_path}.cmd"; then
17703       input_to_shortpath="${new_path}.cmd"
17704    else
17705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17706$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17707      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17708$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17709      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17710    fi
17711  else
17712    input_to_shortpath="$new_path"
17713  fi
17714
17715  # Call helper function which possibly converts this using DOS-style short mode.
17716  # If so, the updated path is stored in $new_path.
17717  new_path="$input_to_shortpath"
17718
17719  input_path="$input_to_shortpath"
17720  # Check if we need to convert this using DOS-style short mode. If the path
17721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17722  # take no chances and rewrite it.
17723  # Note: m4 eats our [], so we need to use [ and ] instead.
17724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17725  if test "x$has_forbidden_chars" != x; then
17726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17730      # Going to short mode and back again did indeed matter. Since short mode is
17731      # case insensitive, let's make it lowercase to improve readability.
17732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17733      # Now convert it back to Unix-stile (cygpath)
17734      input_path=`$CYGPATH -u "$shortmode_path"`
17735      new_path="$input_path"
17736    fi
17737  fi
17738
17739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17740  if test "x$test_cygdrive_prefix" = x; then
17741    # As a simple fix, exclude /usr/bin since it's not a real path.
17742    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17744      # a path prefixed by /cygdrive for fixpath to work.
17745      new_path="$CYGWIN_ROOT_PATH$input_path"
17746    fi
17747  fi
17748
17749  # remove trailing .exe if any
17750  new_path="${new_path/%.exe/}"
17751
17752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17753
17754  # First separate the path from the arguments. This will split at the first
17755  # space.
17756  complete="$BUILD_CC"
17757  path="${complete%% *}"
17758  tmp="$complete EOL"
17759  arguments="${tmp#* }"
17760
17761  # Input might be given as Windows format, start by converting to
17762  # unix format.
17763  new_path="$path"
17764
17765  windows_path="$new_path"
17766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17767    unix_path=`$CYGPATH -u "$windows_path"`
17768    new_path="$unix_path"
17769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17771    new_path="$unix_path"
17772  fi
17773
17774
17775  # Now try to locate executable using which
17776  new_path=`$WHICH "$new_path" 2> /dev/null`
17777
17778  if test "x$new_path" = x; then
17779    # Oops. Which didn't find the executable.
17780    # The splitting of arguments from the executable at a space might have been incorrect,
17781    # since paths with space are more likely in Windows. Give it another try with the whole
17782    # argument.
17783    path="$complete"
17784    arguments="EOL"
17785    new_path="$path"
17786
17787  windows_path="$new_path"
17788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17789    unix_path=`$CYGPATH -u "$windows_path"`
17790    new_path="$unix_path"
17791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17793    new_path="$unix_path"
17794  fi
17795
17796
17797    new_path=`$WHICH "$new_path" 2> /dev/null`
17798
17799    if test "x$new_path" = x; then
17800      # It's still not found. Now this is an unrecoverable error.
17801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17802$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17803      has_space=`$ECHO "$complete" | $GREP " "`
17804      if test "x$has_space" != x; then
17805        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17806$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17807      fi
17808      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17809    fi
17810  fi
17811
17812  # Now new_path has a complete unix path to the binary
17813  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17814    # Keep paths in /bin as-is, but remove trailing .exe if any
17815    new_path="${new_path/%.exe/}"
17816    # Do not save /bin paths to all_fixpath_prefixes!
17817  else
17818    # Not in mixed or Windows style, start by that.
17819    new_path=`cmd //c echo $new_path`
17820
17821  input_path="$new_path"
17822  # Check if we need to convert this using DOS-style short mode. If the path
17823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17824  # take no chances and rewrite it.
17825  # Note: m4 eats our [], so we need to use [ and ] instead.
17826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17827  if test "x$has_forbidden_chars" != x; then
17828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17830  fi
17831
17832    # Output is in $new_path
17833
17834  windows_path="$new_path"
17835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17836    unix_path=`$CYGPATH -u "$windows_path"`
17837    new_path="$unix_path"
17838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17840    new_path="$unix_path"
17841  fi
17842
17843    # remove trailing .exe if any
17844    new_path="${new_path/%.exe/}"
17845
17846    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17847    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17848  fi
17849
17850  else
17851    # We're on a posix platform. Hooray! :)
17852    # First separate the path from the arguments. This will split at the first
17853    # space.
17854    complete="$BUILD_CC"
17855    path="${complete%% *}"
17856    tmp="$complete EOL"
17857    arguments="${tmp#* }"
17858
17859    # Cannot rely on the command "which" here since it doesn't always work.
17860    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17861    if test -z "$is_absolute_path"; then
17862      # Path to executable is not absolute. Find it.
17863      IFS_save="$IFS"
17864      IFS=:
17865      for p in $PATH; do
17866        if test -f "$p/$path" && test -x "$p/$path"; then
17867          new_path="$p/$path"
17868          break
17869        fi
17870      done
17871      IFS="$IFS_save"
17872    else
17873      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17874$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17875      new_path="$path"
17876    fi
17877
17878    if test "x$new_path" = x; then
17879        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17880$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17881        has_space=`$ECHO "$complete" | $GREP " "`
17882        if test "x$has_space" != x; then
17883          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17884$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17885        fi
17886        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17887      fi
17888  fi
17889
17890      # Now join together the path and the arguments once again
17891      if test "x$arguments" != xEOL; then
17892        new_complete="$new_path ${arguments% *}"
17893      else
17894        new_complete="$new_path"
17895      fi
17896
17897  if test "x$complete" != "x$new_complete"; then
17898      BUILD_CC="$new_complete"
17899      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17900$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17901    fi
17902
17903    for ac_prog in cl CC g++
17904do
17905  # Extract the first word of "$ac_prog", so it can be a program name with args.
17906set dummy $ac_prog; ac_word=$2
17907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17908$as_echo_n "checking for $ac_word... " >&6; }
17909if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17910  $as_echo_n "(cached) " >&6
17911else
17912  case $BUILD_CXX in
17913  [\\/]* | ?:[\\/]*)
17914  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17915  ;;
17916  *)
17917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17918for as_dir in $PATH
17919do
17920  IFS=$as_save_IFS
17921  test -z "$as_dir" && as_dir=.
17922    for ac_exec_ext in '' $ac_executable_extensions; do
17923  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17924    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17926    break 2
17927  fi
17928done
17929  done
17930IFS=$as_save_IFS
17931
17932  ;;
17933esac
17934fi
17935BUILD_CXX=$ac_cv_path_BUILD_CXX
17936if test -n "$BUILD_CXX"; then
17937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17938$as_echo "$BUILD_CXX" >&6; }
17939else
17940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17941$as_echo "no" >&6; }
17942fi
17943
17944
17945  test -n "$BUILD_CXX" && break
17946done
17947
17948
17949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17950
17951  # First separate the path from the arguments. This will split at the first
17952  # space.
17953  complete="$BUILD_CXX"
17954  path="${complete%% *}"
17955  tmp="$complete EOL"
17956  arguments="${tmp#* }"
17957
17958  # Input might be given as Windows format, start by converting to
17959  # unix format.
17960  new_path=`$CYGPATH -u "$path"`
17961
17962  # Now try to locate executable using which
17963  new_path=`$WHICH "$new_path" 2> /dev/null`
17964  # bat and cmd files are not always considered executable in cygwin causing which
17965  # to not find them
17966  if test "x$new_path" = x \
17967           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17968           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17969    new_path=`$CYGPATH -u "$path"`
17970  fi
17971  if test "x$new_path" = x; then
17972    # Oops. Which didn't find the executable.
17973    # The splitting of arguments from the executable at a space might have been incorrect,
17974    # since paths with space are more likely in Windows. Give it another try with the whole
17975    # argument.
17976    path="$complete"
17977    arguments="EOL"
17978    new_path=`$CYGPATH -u "$path"`
17979    new_path=`$WHICH "$new_path" 2> /dev/null`
17980    # bat and cmd files are not always considered executable in cygwin causing which
17981    # to not find them
17982    if test "x$new_path" = x \
17983             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17984             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17985      new_path=`$CYGPATH -u "$path"`
17986    fi
17987    if test "x$new_path" = x; then
17988      # It's still not found. Now this is an unrecoverable error.
17989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17990$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17991      has_space=`$ECHO "$complete" | $GREP " "`
17992      if test "x$has_space" != x; then
17993        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17994$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17995      fi
17996      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17997    fi
17998  fi
17999
18000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18003  # "foo.exe" is OK but "foo" is an error.
18004  #
18005  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18006  # It is also a way to make sure we got the proper file name for the real test later on.
18007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18008  if test "x$test_shortpath" = x; then
18009    # Short path failed, file does not exist as specified.
18010    # Try adding .exe or .cmd
18011    if test -f "${new_path}.exe"; then
18012       input_to_shortpath="${new_path}.exe"
18013    elif test -f "${new_path}.cmd"; then
18014       input_to_shortpath="${new_path}.cmd"
18015    else
18016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18017$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18018      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18019$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18020      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18021    fi
18022  else
18023    input_to_shortpath="$new_path"
18024  fi
18025
18026  # Call helper function which possibly converts this using DOS-style short mode.
18027  # If so, the updated path is stored in $new_path.
18028  new_path="$input_to_shortpath"
18029
18030  input_path="$input_to_shortpath"
18031  # Check if we need to convert this using DOS-style short mode. If the path
18032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18033  # take no chances and rewrite it.
18034  # Note: m4 eats our [], so we need to use [ and ] instead.
18035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18036  if test "x$has_forbidden_chars" != x; then
18037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18041      # Going to short mode and back again did indeed matter. Since short mode is
18042      # case insensitive, let's make it lowercase to improve readability.
18043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18044      # Now convert it back to Unix-stile (cygpath)
18045      input_path=`$CYGPATH -u "$shortmode_path"`
18046      new_path="$input_path"
18047    fi
18048  fi
18049
18050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18051  if test "x$test_cygdrive_prefix" = x; then
18052    # As a simple fix, exclude /usr/bin since it's not a real path.
18053    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18055      # a path prefixed by /cygdrive for fixpath to work.
18056      new_path="$CYGWIN_ROOT_PATH$input_path"
18057    fi
18058  fi
18059
18060  # remove trailing .exe if any
18061  new_path="${new_path/%.exe/}"
18062
18063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18064
18065  # First separate the path from the arguments. This will split at the first
18066  # space.
18067  complete="$BUILD_CXX"
18068  path="${complete%% *}"
18069  tmp="$complete EOL"
18070  arguments="${tmp#* }"
18071
18072  # Input might be given as Windows format, start by converting to
18073  # unix format.
18074  new_path="$path"
18075
18076  windows_path="$new_path"
18077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18078    unix_path=`$CYGPATH -u "$windows_path"`
18079    new_path="$unix_path"
18080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18082    new_path="$unix_path"
18083  fi
18084
18085
18086  # Now try to locate executable using which
18087  new_path=`$WHICH "$new_path" 2> /dev/null`
18088
18089  if test "x$new_path" = x; then
18090    # Oops. Which didn't find the executable.
18091    # The splitting of arguments from the executable at a space might have been incorrect,
18092    # since paths with space are more likely in Windows. Give it another try with the whole
18093    # argument.
18094    path="$complete"
18095    arguments="EOL"
18096    new_path="$path"
18097
18098  windows_path="$new_path"
18099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18100    unix_path=`$CYGPATH -u "$windows_path"`
18101    new_path="$unix_path"
18102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18104    new_path="$unix_path"
18105  fi
18106
18107
18108    new_path=`$WHICH "$new_path" 2> /dev/null`
18109
18110    if test "x$new_path" = x; then
18111      # It's still not found. Now this is an unrecoverable error.
18112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18113$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18114      has_space=`$ECHO "$complete" | $GREP " "`
18115      if test "x$has_space" != x; then
18116        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18117$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18118      fi
18119      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18120    fi
18121  fi
18122
18123  # Now new_path has a complete unix path to the binary
18124  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18125    # Keep paths in /bin as-is, but remove trailing .exe if any
18126    new_path="${new_path/%.exe/}"
18127    # Do not save /bin paths to all_fixpath_prefixes!
18128  else
18129    # Not in mixed or Windows style, start by that.
18130    new_path=`cmd //c echo $new_path`
18131
18132  input_path="$new_path"
18133  # Check if we need to convert this using DOS-style short mode. If the path
18134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18135  # take no chances and rewrite it.
18136  # Note: m4 eats our [], so we need to use [ and ] instead.
18137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18138  if test "x$has_forbidden_chars" != x; then
18139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18141  fi
18142
18143    # Output is in $new_path
18144
18145  windows_path="$new_path"
18146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18147    unix_path=`$CYGPATH -u "$windows_path"`
18148    new_path="$unix_path"
18149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18151    new_path="$unix_path"
18152  fi
18153
18154    # remove trailing .exe if any
18155    new_path="${new_path/%.exe/}"
18156
18157    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18158    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18159  fi
18160
18161  else
18162    # We're on a posix platform. Hooray! :)
18163    # First separate the path from the arguments. This will split at the first
18164    # space.
18165    complete="$BUILD_CXX"
18166    path="${complete%% *}"
18167    tmp="$complete EOL"
18168    arguments="${tmp#* }"
18169
18170    # Cannot rely on the command "which" here since it doesn't always work.
18171    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18172    if test -z "$is_absolute_path"; then
18173      # Path to executable is not absolute. Find it.
18174      IFS_save="$IFS"
18175      IFS=:
18176      for p in $PATH; do
18177        if test -f "$p/$path" && test -x "$p/$path"; then
18178          new_path="$p/$path"
18179          break
18180        fi
18181      done
18182      IFS="$IFS_save"
18183    else
18184      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18185$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18186      new_path="$path"
18187    fi
18188
18189    if test "x$new_path" = x; then
18190        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18191$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18192        has_space=`$ECHO "$complete" | $GREP " "`
18193        if test "x$has_space" != x; then
18194          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18195$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18196        fi
18197        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18198      fi
18199  fi
18200
18201      # Now join together the path and the arguments once again
18202      if test "x$arguments" != xEOL; then
18203        new_complete="$new_path ${arguments% *}"
18204      else
18205        new_complete="$new_path"
18206      fi
18207
18208  if test "x$complete" != "x$new_complete"; then
18209      BUILD_CXX="$new_complete"
18210      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18211$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18212    fi
18213
18214    # Extract the first word of "ld", so it can be a program name with args.
18215set dummy ld; ac_word=$2
18216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18217$as_echo_n "checking for $ac_word... " >&6; }
18218if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18219  $as_echo_n "(cached) " >&6
18220else
18221  case $BUILD_LD in
18222  [\\/]* | ?:[\\/]*)
18223  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18224  ;;
18225  *)
18226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18227for as_dir in $PATH
18228do
18229  IFS=$as_save_IFS
18230  test -z "$as_dir" && as_dir=.
18231    for ac_exec_ext in '' $ac_executable_extensions; do
18232  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18233    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18235    break 2
18236  fi
18237done
18238  done
18239IFS=$as_save_IFS
18240
18241  ;;
18242esac
18243fi
18244BUILD_LD=$ac_cv_path_BUILD_LD
18245if test -n "$BUILD_LD"; then
18246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18247$as_echo "$BUILD_LD" >&6; }
18248else
18249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18250$as_echo "no" >&6; }
18251fi
18252
18253
18254
18255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18256
18257  # First separate the path from the arguments. This will split at the first
18258  # space.
18259  complete="$BUILD_LD"
18260  path="${complete%% *}"
18261  tmp="$complete EOL"
18262  arguments="${tmp#* }"
18263
18264  # Input might be given as Windows format, start by converting to
18265  # unix format.
18266  new_path=`$CYGPATH -u "$path"`
18267
18268  # Now try to locate executable using which
18269  new_path=`$WHICH "$new_path" 2> /dev/null`
18270  # bat and cmd files are not always considered executable in cygwin causing which
18271  # to not find them
18272  if test "x$new_path" = x \
18273           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18274           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18275    new_path=`$CYGPATH -u "$path"`
18276  fi
18277  if test "x$new_path" = x; then
18278    # Oops. Which didn't find the executable.
18279    # The splitting of arguments from the executable at a space might have been incorrect,
18280    # since paths with space are more likely in Windows. Give it another try with the whole
18281    # argument.
18282    path="$complete"
18283    arguments="EOL"
18284    new_path=`$CYGPATH -u "$path"`
18285    new_path=`$WHICH "$new_path" 2> /dev/null`
18286    # bat and cmd files are not always considered executable in cygwin causing which
18287    # to not find them
18288    if test "x$new_path" = x \
18289             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18290             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18291      new_path=`$CYGPATH -u "$path"`
18292    fi
18293    if test "x$new_path" = x; then
18294      # It's still not found. Now this is an unrecoverable error.
18295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18296$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18297      has_space=`$ECHO "$complete" | $GREP " "`
18298      if test "x$has_space" != x; then
18299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18301      fi
18302      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18303    fi
18304  fi
18305
18306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18309  # "foo.exe" is OK but "foo" is an error.
18310  #
18311  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18312  # It is also a way to make sure we got the proper file name for the real test later on.
18313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18314  if test "x$test_shortpath" = x; then
18315    # Short path failed, file does not exist as specified.
18316    # Try adding .exe or .cmd
18317    if test -f "${new_path}.exe"; then
18318       input_to_shortpath="${new_path}.exe"
18319    elif test -f "${new_path}.cmd"; then
18320       input_to_shortpath="${new_path}.cmd"
18321    else
18322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18323$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18324      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18325$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18326      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18327    fi
18328  else
18329    input_to_shortpath="$new_path"
18330  fi
18331
18332  # Call helper function which possibly converts this using DOS-style short mode.
18333  # If so, the updated path is stored in $new_path.
18334  new_path="$input_to_shortpath"
18335
18336  input_path="$input_to_shortpath"
18337  # Check if we need to convert this using DOS-style short mode. If the path
18338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18339  # take no chances and rewrite it.
18340  # Note: m4 eats our [], so we need to use [ and ] instead.
18341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18342  if test "x$has_forbidden_chars" != x; then
18343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18347      # Going to short mode and back again did indeed matter. Since short mode is
18348      # case insensitive, let's make it lowercase to improve readability.
18349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18350      # Now convert it back to Unix-stile (cygpath)
18351      input_path=`$CYGPATH -u "$shortmode_path"`
18352      new_path="$input_path"
18353    fi
18354  fi
18355
18356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18357  if test "x$test_cygdrive_prefix" = x; then
18358    # As a simple fix, exclude /usr/bin since it's not a real path.
18359    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18361      # a path prefixed by /cygdrive for fixpath to work.
18362      new_path="$CYGWIN_ROOT_PATH$input_path"
18363    fi
18364  fi
18365
18366  # remove trailing .exe if any
18367  new_path="${new_path/%.exe/}"
18368
18369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18370
18371  # First separate the path from the arguments. This will split at the first
18372  # space.
18373  complete="$BUILD_LD"
18374  path="${complete%% *}"
18375  tmp="$complete EOL"
18376  arguments="${tmp#* }"
18377
18378  # Input might be given as Windows format, start by converting to
18379  # unix format.
18380  new_path="$path"
18381
18382  windows_path="$new_path"
18383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18384    unix_path=`$CYGPATH -u "$windows_path"`
18385    new_path="$unix_path"
18386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18388    new_path="$unix_path"
18389  fi
18390
18391
18392  # Now try to locate executable using which
18393  new_path=`$WHICH "$new_path" 2> /dev/null`
18394
18395  if test "x$new_path" = x; then
18396    # Oops. Which didn't find the executable.
18397    # The splitting of arguments from the executable at a space might have been incorrect,
18398    # since paths with space are more likely in Windows. Give it another try with the whole
18399    # argument.
18400    path="$complete"
18401    arguments="EOL"
18402    new_path="$path"
18403
18404  windows_path="$new_path"
18405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18406    unix_path=`$CYGPATH -u "$windows_path"`
18407    new_path="$unix_path"
18408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18410    new_path="$unix_path"
18411  fi
18412
18413
18414    new_path=`$WHICH "$new_path" 2> /dev/null`
18415
18416    if test "x$new_path" = x; then
18417      # It's still not found. Now this is an unrecoverable error.
18418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18419$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18420      has_space=`$ECHO "$complete" | $GREP " "`
18421      if test "x$has_space" != x; then
18422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18424      fi
18425      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18426    fi
18427  fi
18428
18429  # Now new_path has a complete unix path to the binary
18430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18431    # Keep paths in /bin as-is, but remove trailing .exe if any
18432    new_path="${new_path/%.exe/}"
18433    # Do not save /bin paths to all_fixpath_prefixes!
18434  else
18435    # Not in mixed or Windows style, start by that.
18436    new_path=`cmd //c echo $new_path`
18437
18438  input_path="$new_path"
18439  # Check if we need to convert this using DOS-style short mode. If the path
18440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18441  # take no chances and rewrite it.
18442  # Note: m4 eats our [], so we need to use [ and ] instead.
18443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18444  if test "x$has_forbidden_chars" != x; then
18445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18447  fi
18448
18449    # Output is in $new_path
18450
18451  windows_path="$new_path"
18452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18453    unix_path=`$CYGPATH -u "$windows_path"`
18454    new_path="$unix_path"
18455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18457    new_path="$unix_path"
18458  fi
18459
18460    # remove trailing .exe if any
18461    new_path="${new_path/%.exe/}"
18462
18463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18465  fi
18466
18467  else
18468    # We're on a posix platform. Hooray! :)
18469    # First separate the path from the arguments. This will split at the first
18470    # space.
18471    complete="$BUILD_LD"
18472    path="${complete%% *}"
18473    tmp="$complete EOL"
18474    arguments="${tmp#* }"
18475
18476    # Cannot rely on the command "which" here since it doesn't always work.
18477    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18478    if test -z "$is_absolute_path"; then
18479      # Path to executable is not absolute. Find it.
18480      IFS_save="$IFS"
18481      IFS=:
18482      for p in $PATH; do
18483        if test -f "$p/$path" && test -x "$p/$path"; then
18484          new_path="$p/$path"
18485          break
18486        fi
18487      done
18488      IFS="$IFS_save"
18489    else
18490      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18491$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18492      new_path="$path"
18493    fi
18494
18495    if test "x$new_path" = x; then
18496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18497$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18498        has_space=`$ECHO "$complete" | $GREP " "`
18499        if test "x$has_space" != x; then
18500          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18501$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18502        fi
18503        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18504      fi
18505  fi
18506
18507      # Now join together the path and the arguments once again
18508      if test "x$arguments" != xEOL; then
18509        new_complete="$new_path ${arguments% *}"
18510      else
18511        new_complete="$new_path"
18512      fi
18513
18514  if test "x$complete" != "x$new_complete"; then
18515      BUILD_LD="$new_complete"
18516      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18517$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18518    fi
18519
18520fi
18521
18522
18523
18524
18525# If a devkit is found on the builddeps server, then prepend its path to the
18526# PATH variable. If there are cross compilers available in the devkit, these
18527# will be found by AC_PROG_CC et al.
18528DEVKIT=
18529
18530
18531    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18532        # Source the builddeps file again, to make sure it uses the latest variables!
18533        . $builddepsfile
18534        # Look for a target and build machine specific resource!
18535        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18536        if test "x$resource" = x; then
18537            # Ok, lets instead look for a target specific resource
18538            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18539        fi
18540        if test "x$resource" = x; then
18541            # Ok, lets instead look for a build specific resource
18542            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18543        fi
18544        if test "x$resource" = x; then
18545            # Ok, lets instead look for a generic resource
18546            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18547            resource=${builddep_devkit}
18548        fi
18549        if test "x$resource" != x; then
18550            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18551$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18552	    # If the resource in the builddeps.conf file is an existing directory,
18553	    # for example /java/linux/cups
18554	    if test -d ${resource}; then
18555	       depdir=${resource}
18556	    else
18557
18558# devkit is for example mymodule
18559# $resource is for example libs/general/libmymod_1_2_3.zip
18560# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18561# $with_builddeps_dir is for example /localhome/builddeps
18562# depdir is the name of the variable into which we store the depdir, eg MYMOD
18563# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18564# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18565    filename=`basename $resource`
18566    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18567    filebase=${filename%%.*}
18568    extension=${filename#*.}
18569    installdir=$with_builddeps_dir/$filebase
18570    if test ! -f $installdir/$filename.unpacked; then
18571        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18572$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18573        if test ! -d $installdir; then
18574            mkdir -p $installdir
18575        fi
18576        if test ! -d $installdir; then
18577            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18578        fi
18579        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18580        touch $tmpfile
18581        if test ! -f $tmpfile; then
18582            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18583        fi
18584
18585    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18586    # $tmpfile is the local file name for the downloaded file.
18587    VALID_TOOL=no
18588    if test "x$BDEPS_FTP" = xwget; then
18589       VALID_TOOL=yes
18590       wget -O $tmpfile $with_builddeps_server/$resource
18591    fi
18592    if test "x$BDEPS_FTP" = xlftp; then
18593       VALID_TOOL=yes
18594       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18595    fi
18596    if test "x$BDEPS_FTP" = xftp; then
18597        VALID_TOOL=yes
18598        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18599        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18600        FTPUSERPWD=${FTPSERVER%%@*}
18601        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18602            FTPUSER=${userpwd%%:*}
18603            FTPPWD=${userpwd#*@}
18604            FTPSERVER=${FTPSERVER#*@}
18605        else
18606            FTPUSER=ftp
18607            FTPPWD=ftp
18608        fi
18609        # the "pass" command does not work on some
18610        # ftp clients (read ftp.exe) but if it works,
18611        # passive mode is better!
18612        (\
18613            echo "user $FTPUSER $FTPPWD"        ;\
18614            echo "pass"                         ;\
18615            echo "bin"                          ;\
18616            echo "get $FTPPATH $tmpfile"              ;\
18617        ) | ftp -in $FTPSERVER
18618    fi
18619    if test "x$VALID_TOOL" != xyes; then
18620       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18621    fi
18622
18623        mv $tmpfile $installdir/$filename
18624        if test ! -s $installdir/$filename; then
18625            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18626        fi
18627        case "$extension" in
18628            zip)  echo "Unzipping $installdir/$filename..."
18629               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18630            ;;
18631            tar.gz) echo "Untaring $installdir/$filename..."
18632               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18633            ;;
18634            tgz) echo "Untaring $installdir/$filename..."
18635               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18636            ;;
18637            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18638            ;;
18639        esac
18640    fi
18641    if test -f $installdir/$filename.unpacked; then
18642        depdir=$installdir
18643    fi
18644
18645	    fi
18646            # Source the builddeps file again, because in the previous command, the depdir
18647            # was updated to point at the current build dependency install directory.
18648            . $builddepsfile
18649            # Now extract variables from the builddeps.conf files.
18650            theroot=${builddep_devkit_ROOT}
18651            thecflags=${builddep_devkit_CFLAGS}
18652            thelibs=${builddep_devkit_LIBS}
18653            if test "x$depdir" = x; then
18654                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18655            fi
18656            DEVKIT=$depdir
18657            if test "x$theroot" != x; then
18658               DEVKIT="$theroot"
18659            fi
18660            if test "x$thecflags" != x; then
18661               DEVKIT_CFLAGS="$thecflags"
18662            fi
18663            if test "x$thelibs" != x; then
18664               DEVKIT_LIBS="$thelibs"
18665            fi
18666            # Found devkit
18667                     PATH="$DEVKIT/bin:$PATH"
18668                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18669                     if test "x$x_includes" = "xNONE"; then
18670                         x_includes="$SYS_ROOT/usr/include/X11"
18671                     fi
18672                     if test "x$x_libraries" = "xNONE"; then
18673                         x_libraries="$SYS_ROOT/usr/lib"
18674                     fi
18675
18676
18677        fi
18678
18679    fi
18680
18681
18682if test "x$SYS_ROOT" != "x/" ; then
18683    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18684    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18685    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18686    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18687    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18688    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18689fi
18690
18691# Store the CFLAGS etal passed to the configure script.
18692ORG_CFLAGS="$CFLAGS"
18693ORG_CXXFLAGS="$CXXFLAGS"
18694ORG_OBJCFLAGS="$OBJCFLAGS"
18695
18696# autoconf magic only relies on PATH, so update it if tools dir is specified
18697OLD_PATH="$PATH"
18698if test "x$TOOLS_DIR" != x; then
18699  PATH=$TOOLS_DIR:$PATH
18700fi
18701
18702
18703### Locate C compiler (CC)
18704
18705# On windows, only cl.exe is supported.
18706# On Solaris, cc is preferred to gcc.
18707# Elsewhere, gcc is preferred to cc.
18708
18709if test "x$CC" != x; then
18710  COMPILER_CHECK_LIST="$CC"
18711elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18712  COMPILER_CHECK_LIST="cl"
18713elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18714  COMPILER_CHECK_LIST="cc gcc"
18715else
18716  COMPILER_CHECK_LIST="gcc cc"
18717fi
18718
18719
18720  COMPILER_NAME=C
18721
18722  CC=
18723  # If TOOLS_DIR is set, check for all compiler names in there first
18724  # before checking the rest of the PATH.
18725  if test -n "$TOOLS_DIR"; then
18726    PATH_save="$PATH"
18727    PATH="$TOOLS_DIR"
18728    for ac_prog in $COMPILER_CHECK_LIST
18729do
18730  # Extract the first word of "$ac_prog", so it can be a program name with args.
18731set dummy $ac_prog; ac_word=$2
18732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18733$as_echo_n "checking for $ac_word... " >&6; }
18734if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18735  $as_echo_n "(cached) " >&6
18736else
18737  case $TOOLS_DIR_CC in
18738  [\\/]* | ?:[\\/]*)
18739  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18740  ;;
18741  *)
18742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18743for as_dir in $PATH
18744do
18745  IFS=$as_save_IFS
18746  test -z "$as_dir" && as_dir=.
18747    for ac_exec_ext in '' $ac_executable_extensions; do
18748  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18749    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18751    break 2
18752  fi
18753done
18754  done
18755IFS=$as_save_IFS
18756
18757  ;;
18758esac
18759fi
18760TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18761if test -n "$TOOLS_DIR_CC"; then
18762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18763$as_echo "$TOOLS_DIR_CC" >&6; }
18764else
18765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18766$as_echo "no" >&6; }
18767fi
18768
18769
18770  test -n "$TOOLS_DIR_CC" && break
18771done
18772
18773    CC=$TOOLS_DIR_CC
18774    PATH="$PATH_save"
18775  fi
18776
18777  # AC_PATH_PROGS can't be run multiple times with the same variable,
18778  # so create a new name for this run.
18779  if test "x$CC" = x; then
18780    for ac_prog in $COMPILER_CHECK_LIST
18781do
18782  # Extract the first word of "$ac_prog", so it can be a program name with args.
18783set dummy $ac_prog; ac_word=$2
18784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18785$as_echo_n "checking for $ac_word... " >&6; }
18786if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18787  $as_echo_n "(cached) " >&6
18788else
18789  case $POTENTIAL_CC in
18790  [\\/]* | ?:[\\/]*)
18791  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18792  ;;
18793  *)
18794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18795for as_dir in $PATH
18796do
18797  IFS=$as_save_IFS
18798  test -z "$as_dir" && as_dir=.
18799    for ac_exec_ext in '' $ac_executable_extensions; do
18800  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18801    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18803    break 2
18804  fi
18805done
18806  done
18807IFS=$as_save_IFS
18808
18809  ;;
18810esac
18811fi
18812POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18813if test -n "$POTENTIAL_CC"; then
18814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18815$as_echo "$POTENTIAL_CC" >&6; }
18816else
18817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18818$as_echo "no" >&6; }
18819fi
18820
18821
18822  test -n "$POTENTIAL_CC" && break
18823done
18824
18825    CC=$POTENTIAL_CC
18826  fi
18827
18828  if test "x$CC" = x; then
18829
18830    # Print a helpful message on how to acquire the necessary build dependency.
18831    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18832    MISSING_DEPENDENCY=devkit
18833    PKGHANDLER_COMMAND=
18834
18835    case $PKGHANDLER in
18836	apt-get)
18837                apt_help     $MISSING_DEPENDENCY ;;
18838    yum)
18839                yum_help     $MISSING_DEPENDENCY ;;
18840	port)
18841                port_help    $MISSING_DEPENDENCY ;;
18842	pkgutil)
18843                pkgutil_help $MISSING_DEPENDENCY ;;
18844	pkgadd)
18845                pkgadd_help  $MISSING_DEPENDENCY ;;
18846    * )
18847      break ;;
18848    esac
18849
18850    if test "x$PKGHANDLER_COMMAND" != x; then
18851        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18852    fi
18853
18854      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18855  fi
18856
18857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18858
18859  # First separate the path from the arguments. This will split at the first
18860  # space.
18861  complete="$CC"
18862  path="${complete%% *}"
18863  tmp="$complete EOL"
18864  arguments="${tmp#* }"
18865
18866  # Input might be given as Windows format, start by converting to
18867  # unix format.
18868  new_path=`$CYGPATH -u "$path"`
18869
18870  # Now try to locate executable using which
18871  new_path=`$WHICH "$new_path" 2> /dev/null`
18872  # bat and cmd files are not always considered executable in cygwin causing which
18873  # to not find them
18874  if test "x$new_path" = x \
18875           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18876           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18877    new_path=`$CYGPATH -u "$path"`
18878  fi
18879  if test "x$new_path" = x; then
18880    # Oops. Which didn't find the executable.
18881    # The splitting of arguments from the executable at a space might have been incorrect,
18882    # since paths with space are more likely in Windows. Give it another try with the whole
18883    # argument.
18884    path="$complete"
18885    arguments="EOL"
18886    new_path=`$CYGPATH -u "$path"`
18887    new_path=`$WHICH "$new_path" 2> /dev/null`
18888    # bat and cmd files are not always considered executable in cygwin causing which
18889    # to not find them
18890    if test "x$new_path" = x \
18891             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18892             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18893      new_path=`$CYGPATH -u "$path"`
18894    fi
18895    if test "x$new_path" = x; then
18896      # It's still not found. Now this is an unrecoverable error.
18897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18898$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18899      has_space=`$ECHO "$complete" | $GREP " "`
18900      if test "x$has_space" != x; then
18901        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18902$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18903      fi
18904      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18905    fi
18906  fi
18907
18908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18911  # "foo.exe" is OK but "foo" is an error.
18912  #
18913  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18914  # It is also a way to make sure we got the proper file name for the real test later on.
18915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18916  if test "x$test_shortpath" = x; then
18917    # Short path failed, file does not exist as specified.
18918    # Try adding .exe or .cmd
18919    if test -f "${new_path}.exe"; then
18920       input_to_shortpath="${new_path}.exe"
18921    elif test -f "${new_path}.cmd"; then
18922       input_to_shortpath="${new_path}.cmd"
18923    else
18924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18925$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18926      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18927$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18928      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18929    fi
18930  else
18931    input_to_shortpath="$new_path"
18932  fi
18933
18934  # Call helper function which possibly converts this using DOS-style short mode.
18935  # If so, the updated path is stored in $new_path.
18936  new_path="$input_to_shortpath"
18937
18938  input_path="$input_to_shortpath"
18939  # Check if we need to convert this using DOS-style short mode. If the path
18940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18941  # take no chances and rewrite it.
18942  # Note: m4 eats our [], so we need to use [ and ] instead.
18943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18944  if test "x$has_forbidden_chars" != x; then
18945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18949      # Going to short mode and back again did indeed matter. Since short mode is
18950      # case insensitive, let's make it lowercase to improve readability.
18951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18952      # Now convert it back to Unix-stile (cygpath)
18953      input_path=`$CYGPATH -u "$shortmode_path"`
18954      new_path="$input_path"
18955    fi
18956  fi
18957
18958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18959  if test "x$test_cygdrive_prefix" = x; then
18960    # As a simple fix, exclude /usr/bin since it's not a real path.
18961    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18963      # a path prefixed by /cygdrive for fixpath to work.
18964      new_path="$CYGWIN_ROOT_PATH$input_path"
18965    fi
18966  fi
18967
18968  # remove trailing .exe if any
18969  new_path="${new_path/%.exe/}"
18970
18971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18972
18973  # First separate the path from the arguments. This will split at the first
18974  # space.
18975  complete="$CC"
18976  path="${complete%% *}"
18977  tmp="$complete EOL"
18978  arguments="${tmp#* }"
18979
18980  # Input might be given as Windows format, start by converting to
18981  # unix format.
18982  new_path="$path"
18983
18984  windows_path="$new_path"
18985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18986    unix_path=`$CYGPATH -u "$windows_path"`
18987    new_path="$unix_path"
18988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18990    new_path="$unix_path"
18991  fi
18992
18993
18994  # Now try to locate executable using which
18995  new_path=`$WHICH "$new_path" 2> /dev/null`
18996
18997  if test "x$new_path" = x; then
18998    # Oops. Which didn't find the executable.
18999    # The splitting of arguments from the executable at a space might have been incorrect,
19000    # since paths with space are more likely in Windows. Give it another try with the whole
19001    # argument.
19002    path="$complete"
19003    arguments="EOL"
19004    new_path="$path"
19005
19006  windows_path="$new_path"
19007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19008    unix_path=`$CYGPATH -u "$windows_path"`
19009    new_path="$unix_path"
19010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19012    new_path="$unix_path"
19013  fi
19014
19015
19016    new_path=`$WHICH "$new_path" 2> /dev/null`
19017
19018    if test "x$new_path" = x; then
19019      # It's still not found. Now this is an unrecoverable error.
19020      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19021$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19022      has_space=`$ECHO "$complete" | $GREP " "`
19023      if test "x$has_space" != x; then
19024        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19025$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19026      fi
19027      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19028    fi
19029  fi
19030
19031  # Now new_path has a complete unix path to the binary
19032  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19033    # Keep paths in /bin as-is, but remove trailing .exe if any
19034    new_path="${new_path/%.exe/}"
19035    # Do not save /bin paths to all_fixpath_prefixes!
19036  else
19037    # Not in mixed or Windows style, start by that.
19038    new_path=`cmd //c echo $new_path`
19039
19040  input_path="$new_path"
19041  # Check if we need to convert this using DOS-style short mode. If the path
19042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19043  # take no chances and rewrite it.
19044  # Note: m4 eats our [], so we need to use [ and ] instead.
19045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19046  if test "x$has_forbidden_chars" != x; then
19047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19049  fi
19050
19051    # Output is in $new_path
19052
19053  windows_path="$new_path"
19054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19055    unix_path=`$CYGPATH -u "$windows_path"`
19056    new_path="$unix_path"
19057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19059    new_path="$unix_path"
19060  fi
19061
19062    # remove trailing .exe if any
19063    new_path="${new_path/%.exe/}"
19064
19065    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19066    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19067  fi
19068
19069  else
19070    # We're on a posix platform. Hooray! :)
19071    # First separate the path from the arguments. This will split at the first
19072    # space.
19073    complete="$CC"
19074    path="${complete%% *}"
19075    tmp="$complete EOL"
19076    arguments="${tmp#* }"
19077
19078    # Cannot rely on the command "which" here since it doesn't always work.
19079    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19080    if test -z "$is_absolute_path"; then
19081      # Path to executable is not absolute. Find it.
19082      IFS_save="$IFS"
19083      IFS=:
19084      for p in $PATH; do
19085        if test -f "$p/$path" && test -x "$p/$path"; then
19086          new_path="$p/$path"
19087          break
19088        fi
19089      done
19090      IFS="$IFS_save"
19091    else
19092      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19093$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19094      new_path="$path"
19095    fi
19096
19097    if test "x$new_path" = x; then
19098        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19099$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19100        has_space=`$ECHO "$complete" | $GREP " "`
19101        if test "x$has_space" != x; then
19102          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19103$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19104        fi
19105        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19106      fi
19107  fi
19108
19109      # Now join together the path and the arguments once again
19110      if test "x$arguments" != xEOL; then
19111        new_complete="$new_path ${arguments% *}"
19112      else
19113        new_complete="$new_path"
19114      fi
19115
19116  if test "x$complete" != "x$new_complete"; then
19117      CC="$new_complete"
19118      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19119$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19120    fi
19121
19122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19123$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19124  TEST_COMPILER="$CC"
19125
19126    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19127        # Follow a chain of symbolic links. Use readlink
19128        # where it exists, else fall back to horribly
19129        # complicated shell code.
19130        if test "x$READLINK_TESTED" != yes; then
19131            # On MacOSX there is a readlink tool with a different
19132            # purpose than the GNU readlink tool. Check the found readlink.
19133            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19134            if test "x$ISGNU" = x; then
19135                 # A readlink that we do not know how to use.
19136                 # Are there other non-GNU readlinks out there?
19137                 READLINK_TESTED=yes
19138                 READLINK=
19139            fi
19140        fi
19141
19142        if test "x$READLINK" != x; then
19143            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19144        else
19145            # Save the current directory for restoring afterwards
19146            STARTDIR=$PWD
19147            COUNTER=0
19148            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19149            sym_link_file=`$BASENAME $TEST_COMPILER`
19150            # Use the system pwd and not the shell builtin to resolve directory symlinks
19151            cd $sym_link_dir
19152            cd `$THEPWDCMD`
19153            sym_link_dir=`$THEPWDCMD`
19154            # Resolve file symlinks
19155            while test $COUNTER -lt 20; do
19156                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19157                if test "x$ISLINK" == x; then
19158                    # This is not a symbolic link! We are done!
19159                    break
19160                fi
19161                # Again resolve directory symlinks since the target of the just found
19162                # link could be in a different directory
19163                cd `$DIRNAME $ISLINK`
19164                sym_link_dir=`$THEPWDCMD`
19165                sym_link_file=`$BASENAME $ISLINK`
19166                let COUNTER=COUNTER+1
19167            done
19168            cd $STARTDIR
19169            TEST_COMPILER=$sym_link_dir/$sym_link_file
19170        fi
19171    fi
19172
19173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19174$as_echo "$TEST_COMPILER" >&6; }
19175  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19176$as_echo_n "checking if CC is disguised ccache... " >&6; }
19177
19178  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19179  if test "x$COMPILER_BASENAME" = "xccache"; then
19180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19181$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19182    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19183    # We want to control ccache invocation ourselves, so ignore this cc and try
19184    # searching again.
19185
19186    # Remove the path to the fake ccache cc from the PATH
19187    RETRY_COMPILER_SAVED_PATH="$PATH"
19188    COMPILER_DIRNAME=`$DIRNAME $CC`
19189    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19190
19191    # Try again looking for our compiler
19192    if test -n "$ac_tool_prefix"; then
19193  for ac_prog in $COMPILER_CHECK_LIST
19194  do
19195    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19196set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19198$as_echo_n "checking for $ac_word... " >&6; }
19199if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19200  $as_echo_n "(cached) " >&6
19201else
19202  if test -n "$PROPER_COMPILER_CC"; then
19203  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19204else
19205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19206for as_dir in $PATH
19207do
19208  IFS=$as_save_IFS
19209  test -z "$as_dir" && as_dir=.
19210    for ac_exec_ext in '' $ac_executable_extensions; do
19211  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19212    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19214    break 2
19215  fi
19216done
19217  done
19218IFS=$as_save_IFS
19219
19220fi
19221fi
19222PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19223if test -n "$PROPER_COMPILER_CC"; then
19224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19225$as_echo "$PROPER_COMPILER_CC" >&6; }
19226else
19227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19228$as_echo "no" >&6; }
19229fi
19230
19231
19232    test -n "$PROPER_COMPILER_CC" && break
19233  done
19234fi
19235if test -z "$PROPER_COMPILER_CC"; then
19236  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19237  for ac_prog in $COMPILER_CHECK_LIST
19238do
19239  # Extract the first word of "$ac_prog", so it can be a program name with args.
19240set dummy $ac_prog; ac_word=$2
19241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19242$as_echo_n "checking for $ac_word... " >&6; }
19243if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19244  $as_echo_n "(cached) " >&6
19245else
19246  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19247  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19248else
19249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19250for as_dir in $PATH
19251do
19252  IFS=$as_save_IFS
19253  test -z "$as_dir" && as_dir=.
19254    for ac_exec_ext in '' $ac_executable_extensions; do
19255  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19256    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19258    break 2
19259  fi
19260done
19261  done
19262IFS=$as_save_IFS
19263
19264fi
19265fi
19266ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19267if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19269$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19270else
19271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19272$as_echo "no" >&6; }
19273fi
19274
19275
19276  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19277done
19278
19279  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19280    PROPER_COMPILER_CC=""
19281  else
19282    case $cross_compiling:$ac_tool_warned in
19283yes:)
19284{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19285$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19286ac_tool_warned=yes ;;
19287esac
19288    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19289  fi
19290fi
19291
19292
19293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19294
19295  # First separate the path from the arguments. This will split at the first
19296  # space.
19297  complete="$PROPER_COMPILER_CC"
19298  path="${complete%% *}"
19299  tmp="$complete EOL"
19300  arguments="${tmp#* }"
19301
19302  # Input might be given as Windows format, start by converting to
19303  # unix format.
19304  new_path=`$CYGPATH -u "$path"`
19305
19306  # Now try to locate executable using which
19307  new_path=`$WHICH "$new_path" 2> /dev/null`
19308  # bat and cmd files are not always considered executable in cygwin causing which
19309  # to not find them
19310  if test "x$new_path" = x \
19311           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19312           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19313    new_path=`$CYGPATH -u "$path"`
19314  fi
19315  if test "x$new_path" = x; then
19316    # Oops. Which didn't find the executable.
19317    # The splitting of arguments from the executable at a space might have been incorrect,
19318    # since paths with space are more likely in Windows. Give it another try with the whole
19319    # argument.
19320    path="$complete"
19321    arguments="EOL"
19322    new_path=`$CYGPATH -u "$path"`
19323    new_path=`$WHICH "$new_path" 2> /dev/null`
19324    # bat and cmd files are not always considered executable in cygwin causing which
19325    # to not find them
19326    if test "x$new_path" = x \
19327             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19328             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19329      new_path=`$CYGPATH -u "$path"`
19330    fi
19331    if test "x$new_path" = x; then
19332      # It's still not found. Now this is an unrecoverable error.
19333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19334$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19335      has_space=`$ECHO "$complete" | $GREP " "`
19336      if test "x$has_space" != x; then
19337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19339      fi
19340      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19341    fi
19342  fi
19343
19344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19347  # "foo.exe" is OK but "foo" is an error.
19348  #
19349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19350  # It is also a way to make sure we got the proper file name for the real test later on.
19351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19352  if test "x$test_shortpath" = x; then
19353    # Short path failed, file does not exist as specified.
19354    # Try adding .exe or .cmd
19355    if test -f "${new_path}.exe"; then
19356       input_to_shortpath="${new_path}.exe"
19357    elif test -f "${new_path}.cmd"; then
19358       input_to_shortpath="${new_path}.cmd"
19359    else
19360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19361$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19362      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19363$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19364      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19365    fi
19366  else
19367    input_to_shortpath="$new_path"
19368  fi
19369
19370  # Call helper function which possibly converts this using DOS-style short mode.
19371  # If so, the updated path is stored in $new_path.
19372  new_path="$input_to_shortpath"
19373
19374  input_path="$input_to_shortpath"
19375  # Check if we need to convert this using DOS-style short mode. If the path
19376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19377  # take no chances and rewrite it.
19378  # Note: m4 eats our [], so we need to use [ and ] instead.
19379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19380  if test "x$has_forbidden_chars" != x; then
19381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19385      # Going to short mode and back again did indeed matter. Since short mode is
19386      # case insensitive, let's make it lowercase to improve readability.
19387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19388      # Now convert it back to Unix-stile (cygpath)
19389      input_path=`$CYGPATH -u "$shortmode_path"`
19390      new_path="$input_path"
19391    fi
19392  fi
19393
19394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19395  if test "x$test_cygdrive_prefix" = x; then
19396    # As a simple fix, exclude /usr/bin since it's not a real path.
19397    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19399      # a path prefixed by /cygdrive for fixpath to work.
19400      new_path="$CYGWIN_ROOT_PATH$input_path"
19401    fi
19402  fi
19403
19404  # remove trailing .exe if any
19405  new_path="${new_path/%.exe/}"
19406
19407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19408
19409  # First separate the path from the arguments. This will split at the first
19410  # space.
19411  complete="$PROPER_COMPILER_CC"
19412  path="${complete%% *}"
19413  tmp="$complete EOL"
19414  arguments="${tmp#* }"
19415
19416  # Input might be given as Windows format, start by converting to
19417  # unix format.
19418  new_path="$path"
19419
19420  windows_path="$new_path"
19421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19422    unix_path=`$CYGPATH -u "$windows_path"`
19423    new_path="$unix_path"
19424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19426    new_path="$unix_path"
19427  fi
19428
19429
19430  # Now try to locate executable using which
19431  new_path=`$WHICH "$new_path" 2> /dev/null`
19432
19433  if test "x$new_path" = x; then
19434    # Oops. Which didn't find the executable.
19435    # The splitting of arguments from the executable at a space might have been incorrect,
19436    # since paths with space are more likely in Windows. Give it another try with the whole
19437    # argument.
19438    path="$complete"
19439    arguments="EOL"
19440    new_path="$path"
19441
19442  windows_path="$new_path"
19443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19444    unix_path=`$CYGPATH -u "$windows_path"`
19445    new_path="$unix_path"
19446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19448    new_path="$unix_path"
19449  fi
19450
19451
19452    new_path=`$WHICH "$new_path" 2> /dev/null`
19453
19454    if test "x$new_path" = x; then
19455      # It's still not found. Now this is an unrecoverable error.
19456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19457$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19458      has_space=`$ECHO "$complete" | $GREP " "`
19459      if test "x$has_space" != x; then
19460        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19461$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19462      fi
19463      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19464    fi
19465  fi
19466
19467  # Now new_path has a complete unix path to the binary
19468  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19469    # Keep paths in /bin as-is, but remove trailing .exe if any
19470    new_path="${new_path/%.exe/}"
19471    # Do not save /bin paths to all_fixpath_prefixes!
19472  else
19473    # Not in mixed or Windows style, start by that.
19474    new_path=`cmd //c echo $new_path`
19475
19476  input_path="$new_path"
19477  # Check if we need to convert this using DOS-style short mode. If the path
19478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19479  # take no chances and rewrite it.
19480  # Note: m4 eats our [], so we need to use [ and ] instead.
19481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19482  if test "x$has_forbidden_chars" != x; then
19483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19485  fi
19486
19487    # Output is in $new_path
19488
19489  windows_path="$new_path"
19490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19491    unix_path=`$CYGPATH -u "$windows_path"`
19492    new_path="$unix_path"
19493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19495    new_path="$unix_path"
19496  fi
19497
19498    # remove trailing .exe if any
19499    new_path="${new_path/%.exe/}"
19500
19501    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19502    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19503  fi
19504
19505  else
19506    # We're on a posix platform. Hooray! :)
19507    # First separate the path from the arguments. This will split at the first
19508    # space.
19509    complete="$PROPER_COMPILER_CC"
19510    path="${complete%% *}"
19511    tmp="$complete EOL"
19512    arguments="${tmp#* }"
19513
19514    # Cannot rely on the command "which" here since it doesn't always work.
19515    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19516    if test -z "$is_absolute_path"; then
19517      # Path to executable is not absolute. Find it.
19518      IFS_save="$IFS"
19519      IFS=:
19520      for p in $PATH; do
19521        if test -f "$p/$path" && test -x "$p/$path"; then
19522          new_path="$p/$path"
19523          break
19524        fi
19525      done
19526      IFS="$IFS_save"
19527    else
19528      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19529$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19530      new_path="$path"
19531    fi
19532
19533    if test "x$new_path" = x; then
19534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19535$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19536        has_space=`$ECHO "$complete" | $GREP " "`
19537        if test "x$has_space" != x; then
19538          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19539$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19540        fi
19541        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19542      fi
19543  fi
19544
19545      # Now join together the path and the arguments once again
19546      if test "x$arguments" != xEOL; then
19547        new_complete="$new_path ${arguments% *}"
19548      else
19549        new_complete="$new_path"
19550      fi
19551
19552  if test "x$complete" != "x$new_complete"; then
19553      PROPER_COMPILER_CC="$new_complete"
19554      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19555$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19556    fi
19557
19558    PATH="$RETRY_COMPILER_SAVED_PATH"
19559
19560    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19561$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19562
19563    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19564        # Follow a chain of symbolic links. Use readlink
19565        # where it exists, else fall back to horribly
19566        # complicated shell code.
19567        if test "x$READLINK_TESTED" != yes; then
19568            # On MacOSX there is a readlink tool with a different
19569            # purpose than the GNU readlink tool. Check the found readlink.
19570            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19571            if test "x$ISGNU" = x; then
19572                 # A readlink that we do not know how to use.
19573                 # Are there other non-GNU readlinks out there?
19574                 READLINK_TESTED=yes
19575                 READLINK=
19576            fi
19577        fi
19578
19579        if test "x$READLINK" != x; then
19580            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19581        else
19582            # Save the current directory for restoring afterwards
19583            STARTDIR=$PWD
19584            COUNTER=0
19585            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19586            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19587            # Use the system pwd and not the shell builtin to resolve directory symlinks
19588            cd $sym_link_dir
19589            cd `$THEPWDCMD`
19590            sym_link_dir=`$THEPWDCMD`
19591            # Resolve file symlinks
19592            while test $COUNTER -lt 20; do
19593                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19594                if test "x$ISLINK" == x; then
19595                    # This is not a symbolic link! We are done!
19596                    break
19597                fi
19598                # Again resolve directory symlinks since the target of the just found
19599                # link could be in a different directory
19600                cd `$DIRNAME $ISLINK`
19601                sym_link_dir=`$THEPWDCMD`
19602                sym_link_file=`$BASENAME $ISLINK`
19603                let COUNTER=COUNTER+1
19604            done
19605            cd $STARTDIR
19606            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19607        fi
19608    fi
19609
19610    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19611$as_echo "$PROPER_COMPILER_CC" >&6; }
19612    CC="$PROPER_COMPILER_CC"
19613  else
19614    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19615$as_echo "no, keeping CC" >&6; }
19616    CC="$TEST_COMPILER"
19617  fi
19618
19619  COMPILER=$CC
19620  COMPILER_NAME=$COMPILER_NAME
19621
19622  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19623    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19624    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19625    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19626    if test $? -ne 0; then
19627      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19628
19629      { $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
19630$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19631      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19632$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19633      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19634    else
19635      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19636      COMPILER_VENDOR="Sun Studio"
19637    fi
19638  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19639    # First line typically looks something like:
19640    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19641    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19642    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19643    COMPILER_VENDOR="Microsoft CL.EXE"
19644    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19645    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19646      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19647        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19648      fi
19649    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19650      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19651        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19652      fi
19653    fi
19654  else
19655    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19656    # Check that this is likely to be GCC.
19657    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19658    if test $? -ne 0; then
19659      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19660$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19661      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19662$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19663      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19664    fi
19665
19666    # First line typically looks something like:
19667    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19668    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19669    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19670  fi
19671  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19672  CC_VERSION="$COMPILER_VERSION"
19673  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19674  CC_VENDOR="$COMPILER_VENDOR"
19675
19676  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19677$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19678
19679
19680# Now that we have resolved CC ourself, let autoconf have its go at it
19681ac_ext=c
19682ac_cpp='$CPP $CPPFLAGS'
19683ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19684ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19685ac_compiler_gnu=$ac_cv_c_compiler_gnu
19686if test -n "$ac_tool_prefix"; then
19687  for ac_prog in $CC
19688  do
19689    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19690set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19692$as_echo_n "checking for $ac_word... " >&6; }
19693if test "${ac_cv_prog_CC+set}" = set; then :
19694  $as_echo_n "(cached) " >&6
19695else
19696  if test -n "$CC"; then
19697  ac_cv_prog_CC="$CC" # Let the user override the test.
19698else
19699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19700for as_dir in $PATH
19701do
19702  IFS=$as_save_IFS
19703  test -z "$as_dir" && as_dir=.
19704    for ac_exec_ext in '' $ac_executable_extensions; do
19705  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19706    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19708    break 2
19709  fi
19710done
19711  done
19712IFS=$as_save_IFS
19713
19714fi
19715fi
19716CC=$ac_cv_prog_CC
19717if test -n "$CC"; then
19718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19719$as_echo "$CC" >&6; }
19720else
19721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19722$as_echo "no" >&6; }
19723fi
19724
19725
19726    test -n "$CC" && break
19727  done
19728fi
19729if test -z "$CC"; then
19730  ac_ct_CC=$CC
19731  for ac_prog in $CC
19732do
19733  # Extract the first word of "$ac_prog", so it can be a program name with args.
19734set dummy $ac_prog; ac_word=$2
19735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19736$as_echo_n "checking for $ac_word... " >&6; }
19737if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19738  $as_echo_n "(cached) " >&6
19739else
19740  if test -n "$ac_ct_CC"; then
19741  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19742else
19743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19744for as_dir in $PATH
19745do
19746  IFS=$as_save_IFS
19747  test -z "$as_dir" && as_dir=.
19748    for ac_exec_ext in '' $ac_executable_extensions; do
19749  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19750    ac_cv_prog_ac_ct_CC="$ac_prog"
19751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19752    break 2
19753  fi
19754done
19755  done
19756IFS=$as_save_IFS
19757
19758fi
19759fi
19760ac_ct_CC=$ac_cv_prog_ac_ct_CC
19761if test -n "$ac_ct_CC"; then
19762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19763$as_echo "$ac_ct_CC" >&6; }
19764else
19765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19766$as_echo "no" >&6; }
19767fi
19768
19769
19770  test -n "$ac_ct_CC" && break
19771done
19772
19773  if test "x$ac_ct_CC" = x; then
19774    CC=""
19775  else
19776    case $cross_compiling:$ac_tool_warned in
19777yes:)
19778{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19779$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19780ac_tool_warned=yes ;;
19781esac
19782    CC=$ac_ct_CC
19783  fi
19784fi
19785
19786
19787test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19788$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19789as_fn_error $? "no acceptable C compiler found in \$PATH
19790See \`config.log' for more details" "$LINENO" 5 ; }
19791
19792# Provide some information about the compiler.
19793$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19794set X $ac_compile
19795ac_compiler=$2
19796for ac_option in --version -v -V -qversion; do
19797  { { ac_try="$ac_compiler $ac_option >&5"
19798case "(($ac_try" in
19799  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19800  *) ac_try_echo=$ac_try;;
19801esac
19802eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19803$as_echo "$ac_try_echo"; } >&5
19804  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19805  ac_status=$?
19806  if test -s conftest.err; then
19807    sed '10a\
19808... rest of stderr output deleted ...
19809         10q' conftest.err >conftest.er1
19810    cat conftest.er1 >&5
19811  fi
19812  rm -f conftest.er1 conftest.err
19813  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19814  test $ac_status = 0; }
19815done
19816
19817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19818/* end confdefs.h.  */
19819
19820int
19821main ()
19822{
19823
19824  ;
19825  return 0;
19826}
19827_ACEOF
19828ac_clean_files_save=$ac_clean_files
19829ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19830# Try to create an executable without -o first, disregard a.out.
19831# It will help us diagnose broken compilers, and finding out an intuition
19832# of exeext.
19833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19834$as_echo_n "checking whether the C compiler works... " >&6; }
19835ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19836
19837# The possible output files:
19838ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19839
19840ac_rmfiles=
19841for ac_file in $ac_files
19842do
19843  case $ac_file in
19844    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19845    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19846  esac
19847done
19848rm -f $ac_rmfiles
19849
19850if { { ac_try="$ac_link_default"
19851case "(($ac_try" in
19852  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19853  *) ac_try_echo=$ac_try;;
19854esac
19855eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19856$as_echo "$ac_try_echo"; } >&5
19857  (eval "$ac_link_default") 2>&5
19858  ac_status=$?
19859  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19860  test $ac_status = 0; }; then :
19861  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19862# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19863# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19864# so that the user can short-circuit this test for compilers unknown to
19865# Autoconf.
19866for ac_file in $ac_files ''
19867do
19868  test -f "$ac_file" || continue
19869  case $ac_file in
19870    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19871	;;
19872    [ab].out )
19873	# We found the default executable, but exeext='' is most
19874	# certainly right.
19875	break;;
19876    *.* )
19877	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19878	then :; else
19879	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19880	fi
19881	# We set ac_cv_exeext here because the later test for it is not
19882	# safe: cross compilers may not add the suffix if given an `-o'
19883	# argument, so we may need to know it at that point already.
19884	# Even if this section looks crufty: it has the advantage of
19885	# actually working.
19886	break;;
19887    * )
19888	break;;
19889  esac
19890done
19891test "$ac_cv_exeext" = no && ac_cv_exeext=
19892
19893else
19894  ac_file=''
19895fi
19896if test -z "$ac_file"; then :
19897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19898$as_echo "no" >&6; }
19899$as_echo "$as_me: failed program was:" >&5
19900sed 's/^/| /' conftest.$ac_ext >&5
19901
19902{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19904as_fn_error 77 "C compiler cannot create executables
19905See \`config.log' for more details" "$LINENO" 5 ; }
19906else
19907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19908$as_echo "yes" >&6; }
19909fi
19910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19911$as_echo_n "checking for C compiler default output file name... " >&6; }
19912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19913$as_echo "$ac_file" >&6; }
19914ac_exeext=$ac_cv_exeext
19915
19916rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19917ac_clean_files=$ac_clean_files_save
19918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19919$as_echo_n "checking for suffix of executables... " >&6; }
19920if { { ac_try="$ac_link"
19921case "(($ac_try" in
19922  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19923  *) ac_try_echo=$ac_try;;
19924esac
19925eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19926$as_echo "$ac_try_echo"; } >&5
19927  (eval "$ac_link") 2>&5
19928  ac_status=$?
19929  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19930  test $ac_status = 0; }; then :
19931  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19932# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19933# work properly (i.e., refer to `conftest.exe'), while it won't with
19934# `rm'.
19935for ac_file in conftest.exe conftest conftest.*; do
19936  test -f "$ac_file" || continue
19937  case $ac_file in
19938    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19939    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19940	  break;;
19941    * ) break;;
19942  esac
19943done
19944else
19945  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19946$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19947as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19948See \`config.log' for more details" "$LINENO" 5 ; }
19949fi
19950rm -f conftest conftest$ac_cv_exeext
19951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19952$as_echo "$ac_cv_exeext" >&6; }
19953
19954rm -f conftest.$ac_ext
19955EXEEXT=$ac_cv_exeext
19956ac_exeext=$EXEEXT
19957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19958/* end confdefs.h.  */
19959#include <stdio.h>
19960int
19961main ()
19962{
19963FILE *f = fopen ("conftest.out", "w");
19964 return ferror (f) || fclose (f) != 0;
19965
19966  ;
19967  return 0;
19968}
19969_ACEOF
19970ac_clean_files="$ac_clean_files conftest.out"
19971# Check that the compiler produces executables we can run.  If not, either
19972# the compiler is broken, or we cross compile.
19973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19974$as_echo_n "checking whether we are cross compiling... " >&6; }
19975if test "$cross_compiling" != yes; then
19976  { { ac_try="$ac_link"
19977case "(($ac_try" in
19978  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19979  *) ac_try_echo=$ac_try;;
19980esac
19981eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19982$as_echo "$ac_try_echo"; } >&5
19983  (eval "$ac_link") 2>&5
19984  ac_status=$?
19985  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19986  test $ac_status = 0; }
19987  if { ac_try='./conftest$ac_cv_exeext'
19988  { { case "(($ac_try" in
19989  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19990  *) ac_try_echo=$ac_try;;
19991esac
19992eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19993$as_echo "$ac_try_echo"; } >&5
19994  (eval "$ac_try") 2>&5
19995  ac_status=$?
19996  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19997  test $ac_status = 0; }; }; then
19998    cross_compiling=no
19999  else
20000    if test "$cross_compiling" = maybe; then
20001	cross_compiling=yes
20002    else
20003	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20005as_fn_error $? "cannot run C compiled programs.
20006If you meant to cross compile, use \`--host'.
20007See \`config.log' for more details" "$LINENO" 5 ; }
20008    fi
20009  fi
20010fi
20011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20012$as_echo "$cross_compiling" >&6; }
20013
20014rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20015ac_clean_files=$ac_clean_files_save
20016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20017$as_echo_n "checking for suffix of object files... " >&6; }
20018if test "${ac_cv_objext+set}" = set; then :
20019  $as_echo_n "(cached) " >&6
20020else
20021  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20022/* end confdefs.h.  */
20023
20024int
20025main ()
20026{
20027
20028  ;
20029  return 0;
20030}
20031_ACEOF
20032rm -f conftest.o conftest.obj
20033if { { ac_try="$ac_compile"
20034case "(($ac_try" in
20035  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20036  *) ac_try_echo=$ac_try;;
20037esac
20038eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20039$as_echo "$ac_try_echo"; } >&5
20040  (eval "$ac_compile") 2>&5
20041  ac_status=$?
20042  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20043  test $ac_status = 0; }; then :
20044  for ac_file in conftest.o conftest.obj conftest.*; do
20045  test -f "$ac_file" || continue;
20046  case $ac_file in
20047    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20048    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20049       break;;
20050  esac
20051done
20052else
20053  $as_echo "$as_me: failed program was:" >&5
20054sed 's/^/| /' conftest.$ac_ext >&5
20055
20056{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20058as_fn_error $? "cannot compute suffix of object files: cannot compile
20059See \`config.log' for more details" "$LINENO" 5 ; }
20060fi
20061rm -f conftest.$ac_cv_objext conftest.$ac_ext
20062fi
20063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20064$as_echo "$ac_cv_objext" >&6; }
20065OBJEXT=$ac_cv_objext
20066ac_objext=$OBJEXT
20067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20068$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20069if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20070  $as_echo_n "(cached) " >&6
20071else
20072  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20073/* end confdefs.h.  */
20074
20075int
20076main ()
20077{
20078#ifndef __GNUC__
20079       choke me
20080#endif
20081
20082  ;
20083  return 0;
20084}
20085_ACEOF
20086if ac_fn_c_try_compile "$LINENO"; then :
20087  ac_compiler_gnu=yes
20088else
20089  ac_compiler_gnu=no
20090fi
20091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20092ac_cv_c_compiler_gnu=$ac_compiler_gnu
20093
20094fi
20095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20096$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20097if test $ac_compiler_gnu = yes; then
20098  GCC=yes
20099else
20100  GCC=
20101fi
20102ac_test_CFLAGS=${CFLAGS+set}
20103ac_save_CFLAGS=$CFLAGS
20104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20105$as_echo_n "checking whether $CC accepts -g... " >&6; }
20106if test "${ac_cv_prog_cc_g+set}" = set; then :
20107  $as_echo_n "(cached) " >&6
20108else
20109  ac_save_c_werror_flag=$ac_c_werror_flag
20110   ac_c_werror_flag=yes
20111   ac_cv_prog_cc_g=no
20112   CFLAGS="-g"
20113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20114/* end confdefs.h.  */
20115
20116int
20117main ()
20118{
20119
20120  ;
20121  return 0;
20122}
20123_ACEOF
20124if ac_fn_c_try_compile "$LINENO"; then :
20125  ac_cv_prog_cc_g=yes
20126else
20127  CFLAGS=""
20128      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20129/* end confdefs.h.  */
20130
20131int
20132main ()
20133{
20134
20135  ;
20136  return 0;
20137}
20138_ACEOF
20139if ac_fn_c_try_compile "$LINENO"; then :
20140
20141else
20142  ac_c_werror_flag=$ac_save_c_werror_flag
20143	 CFLAGS="-g"
20144	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20145/* end confdefs.h.  */
20146
20147int
20148main ()
20149{
20150
20151  ;
20152  return 0;
20153}
20154_ACEOF
20155if ac_fn_c_try_compile "$LINENO"; then :
20156  ac_cv_prog_cc_g=yes
20157fi
20158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20159fi
20160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20161fi
20162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20163   ac_c_werror_flag=$ac_save_c_werror_flag
20164fi
20165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20166$as_echo "$ac_cv_prog_cc_g" >&6; }
20167if test "$ac_test_CFLAGS" = set; then
20168  CFLAGS=$ac_save_CFLAGS
20169elif test $ac_cv_prog_cc_g = yes; then
20170  if test "$GCC" = yes; then
20171    CFLAGS="-g -O2"
20172  else
20173    CFLAGS="-g"
20174  fi
20175else
20176  if test "$GCC" = yes; then
20177    CFLAGS="-O2"
20178  else
20179    CFLAGS=
20180  fi
20181fi
20182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20183$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20184if test "${ac_cv_prog_cc_c89+set}" = set; then :
20185  $as_echo_n "(cached) " >&6
20186else
20187  ac_cv_prog_cc_c89=no
20188ac_save_CC=$CC
20189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20190/* end confdefs.h.  */
20191#include <stdarg.h>
20192#include <stdio.h>
20193#include <sys/types.h>
20194#include <sys/stat.h>
20195/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20196struct buf { int x; };
20197FILE * (*rcsopen) (struct buf *, struct stat *, int);
20198static char *e (p, i)
20199     char **p;
20200     int i;
20201{
20202  return p[i];
20203}
20204static char *f (char * (*g) (char **, int), char **p, ...)
20205{
20206  char *s;
20207  va_list v;
20208  va_start (v,p);
20209  s = g (p, va_arg (v,int));
20210  va_end (v);
20211  return s;
20212}
20213
20214/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20215   function prototypes and stuff, but not '\xHH' hex character constants.
20216   These don't provoke an error unfortunately, instead are silently treated
20217   as 'x'.  The following induces an error, until -std is added to get
20218   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20219   array size at least.  It's necessary to write '\x00'==0 to get something
20220   that's true only with -std.  */
20221int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20222
20223/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20224   inside strings and character constants.  */
20225#define FOO(x) 'x'
20226int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20227
20228int test (int i, double x);
20229struct s1 {int (*f) (int a);};
20230struct s2 {int (*f) (double a);};
20231int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20232int argc;
20233char **argv;
20234int
20235main ()
20236{
20237return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20238  ;
20239  return 0;
20240}
20241_ACEOF
20242for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20243	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20244do
20245  CC="$ac_save_CC $ac_arg"
20246  if ac_fn_c_try_compile "$LINENO"; then :
20247  ac_cv_prog_cc_c89=$ac_arg
20248fi
20249rm -f core conftest.err conftest.$ac_objext
20250  test "x$ac_cv_prog_cc_c89" != "xno" && break
20251done
20252rm -f conftest.$ac_ext
20253CC=$ac_save_CC
20254
20255fi
20256# AC_CACHE_VAL
20257case "x$ac_cv_prog_cc_c89" in
20258  x)
20259    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20260$as_echo "none needed" >&6; } ;;
20261  xno)
20262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20263$as_echo "unsupported" >&6; } ;;
20264  *)
20265    CC="$CC $ac_cv_prog_cc_c89"
20266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20267$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20268esac
20269if test "x$ac_cv_prog_cc_c89" != xno; then :
20270
20271fi
20272
20273ac_ext=cpp
20274ac_cpp='$CXXCPP $CPPFLAGS'
20275ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20276ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20277ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20278
20279
20280### Locate C++ compiler (CXX)
20281
20282if test "x$CXX" != x; then
20283  COMPILER_CHECK_LIST="$CXX"
20284elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20285  COMPILER_CHECK_LIST="cl"
20286elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20287  COMPILER_CHECK_LIST="CC g++"
20288else
20289  COMPILER_CHECK_LIST="g++ CC"
20290fi
20291
20292
20293  COMPILER_NAME=C++
20294
20295  CXX=
20296  # If TOOLS_DIR is set, check for all compiler names in there first
20297  # before checking the rest of the PATH.
20298  if test -n "$TOOLS_DIR"; then
20299    PATH_save="$PATH"
20300    PATH="$TOOLS_DIR"
20301    for ac_prog in $COMPILER_CHECK_LIST
20302do
20303  # Extract the first word of "$ac_prog", so it can be a program name with args.
20304set dummy $ac_prog; ac_word=$2
20305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20306$as_echo_n "checking for $ac_word... " >&6; }
20307if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20308  $as_echo_n "(cached) " >&6
20309else
20310  case $TOOLS_DIR_CXX in
20311  [\\/]* | ?:[\\/]*)
20312  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20313  ;;
20314  *)
20315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20316for as_dir in $PATH
20317do
20318  IFS=$as_save_IFS
20319  test -z "$as_dir" && as_dir=.
20320    for ac_exec_ext in '' $ac_executable_extensions; do
20321  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20322    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20324    break 2
20325  fi
20326done
20327  done
20328IFS=$as_save_IFS
20329
20330  ;;
20331esac
20332fi
20333TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20334if test -n "$TOOLS_DIR_CXX"; then
20335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20336$as_echo "$TOOLS_DIR_CXX" >&6; }
20337else
20338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20339$as_echo "no" >&6; }
20340fi
20341
20342
20343  test -n "$TOOLS_DIR_CXX" && break
20344done
20345
20346    CXX=$TOOLS_DIR_CXX
20347    PATH="$PATH_save"
20348  fi
20349
20350  # AC_PATH_PROGS can't be run multiple times with the same variable,
20351  # so create a new name for this run.
20352  if test "x$CXX" = x; then
20353    for ac_prog in $COMPILER_CHECK_LIST
20354do
20355  # Extract the first word of "$ac_prog", so it can be a program name with args.
20356set dummy $ac_prog; ac_word=$2
20357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20358$as_echo_n "checking for $ac_word... " >&6; }
20359if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20360  $as_echo_n "(cached) " >&6
20361else
20362  case $POTENTIAL_CXX in
20363  [\\/]* | ?:[\\/]*)
20364  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20365  ;;
20366  *)
20367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20368for as_dir in $PATH
20369do
20370  IFS=$as_save_IFS
20371  test -z "$as_dir" && as_dir=.
20372    for ac_exec_ext in '' $ac_executable_extensions; do
20373  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20374    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20376    break 2
20377  fi
20378done
20379  done
20380IFS=$as_save_IFS
20381
20382  ;;
20383esac
20384fi
20385POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20386if test -n "$POTENTIAL_CXX"; then
20387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20388$as_echo "$POTENTIAL_CXX" >&6; }
20389else
20390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20391$as_echo "no" >&6; }
20392fi
20393
20394
20395  test -n "$POTENTIAL_CXX" && break
20396done
20397
20398    CXX=$POTENTIAL_CXX
20399  fi
20400
20401  if test "x$CXX" = x; then
20402
20403    # Print a helpful message on how to acquire the necessary build dependency.
20404    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20405    MISSING_DEPENDENCY=devkit
20406    PKGHANDLER_COMMAND=
20407
20408    case $PKGHANDLER in
20409	apt-get)
20410                apt_help     $MISSING_DEPENDENCY ;;
20411    yum)
20412                yum_help     $MISSING_DEPENDENCY ;;
20413	port)
20414                port_help    $MISSING_DEPENDENCY ;;
20415	pkgutil)
20416                pkgutil_help $MISSING_DEPENDENCY ;;
20417	pkgadd)
20418                pkgadd_help  $MISSING_DEPENDENCY ;;
20419    * )
20420      break ;;
20421    esac
20422
20423    if test "x$PKGHANDLER_COMMAND" != x; then
20424        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20425    fi
20426
20427      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20428  fi
20429
20430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20431
20432  # First separate the path from the arguments. This will split at the first
20433  # space.
20434  complete="$CXX"
20435  path="${complete%% *}"
20436  tmp="$complete EOL"
20437  arguments="${tmp#* }"
20438
20439  # Input might be given as Windows format, start by converting to
20440  # unix format.
20441  new_path=`$CYGPATH -u "$path"`
20442
20443  # Now try to locate executable using which
20444  new_path=`$WHICH "$new_path" 2> /dev/null`
20445  # bat and cmd files are not always considered executable in cygwin causing which
20446  # to not find them
20447  if test "x$new_path" = x \
20448           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20449           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20450    new_path=`$CYGPATH -u "$path"`
20451  fi
20452  if test "x$new_path" = x; then
20453    # Oops. Which didn't find the executable.
20454    # The splitting of arguments from the executable at a space might have been incorrect,
20455    # since paths with space are more likely in Windows. Give it another try with the whole
20456    # argument.
20457    path="$complete"
20458    arguments="EOL"
20459    new_path=`$CYGPATH -u "$path"`
20460    new_path=`$WHICH "$new_path" 2> /dev/null`
20461    # bat and cmd files are not always considered executable in cygwin causing which
20462    # to not find them
20463    if test "x$new_path" = x \
20464             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20465             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20466      new_path=`$CYGPATH -u "$path"`
20467    fi
20468    if test "x$new_path" = x; then
20469      # It's still not found. Now this is an unrecoverable error.
20470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20471$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20472      has_space=`$ECHO "$complete" | $GREP " "`
20473      if test "x$has_space" != x; then
20474        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20475$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20476      fi
20477      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20478    fi
20479  fi
20480
20481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20484  # "foo.exe" is OK but "foo" is an error.
20485  #
20486  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20487  # It is also a way to make sure we got the proper file name for the real test later on.
20488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20489  if test "x$test_shortpath" = x; then
20490    # Short path failed, file does not exist as specified.
20491    # Try adding .exe or .cmd
20492    if test -f "${new_path}.exe"; then
20493       input_to_shortpath="${new_path}.exe"
20494    elif test -f "${new_path}.cmd"; then
20495       input_to_shortpath="${new_path}.cmd"
20496    else
20497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20498$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20499      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20500$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20501      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20502    fi
20503  else
20504    input_to_shortpath="$new_path"
20505  fi
20506
20507  # Call helper function which possibly converts this using DOS-style short mode.
20508  # If so, the updated path is stored in $new_path.
20509  new_path="$input_to_shortpath"
20510
20511  input_path="$input_to_shortpath"
20512  # Check if we need to convert this using DOS-style short mode. If the path
20513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20514  # take no chances and rewrite it.
20515  # Note: m4 eats our [], so we need to use [ and ] instead.
20516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20517  if test "x$has_forbidden_chars" != x; then
20518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20519    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20520    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20521    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20522      # Going to short mode and back again did indeed matter. Since short mode is
20523      # case insensitive, let's make it lowercase to improve readability.
20524      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20525      # Now convert it back to Unix-stile (cygpath)
20526      input_path=`$CYGPATH -u "$shortmode_path"`
20527      new_path="$input_path"
20528    fi
20529  fi
20530
20531  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20532  if test "x$test_cygdrive_prefix" = x; then
20533    # As a simple fix, exclude /usr/bin since it's not a real path.
20534    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20535      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20536      # a path prefixed by /cygdrive for fixpath to work.
20537      new_path="$CYGWIN_ROOT_PATH$input_path"
20538    fi
20539  fi
20540
20541  # remove trailing .exe if any
20542  new_path="${new_path/%.exe/}"
20543
20544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20545
20546  # First separate the path from the arguments. This will split at the first
20547  # space.
20548  complete="$CXX"
20549  path="${complete%% *}"
20550  tmp="$complete EOL"
20551  arguments="${tmp#* }"
20552
20553  # Input might be given as Windows format, start by converting to
20554  # unix format.
20555  new_path="$path"
20556
20557  windows_path="$new_path"
20558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20559    unix_path=`$CYGPATH -u "$windows_path"`
20560    new_path="$unix_path"
20561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20563    new_path="$unix_path"
20564  fi
20565
20566
20567  # Now try to locate executable using which
20568  new_path=`$WHICH "$new_path" 2> /dev/null`
20569
20570  if test "x$new_path" = x; then
20571    # Oops. Which didn't find the executable.
20572    # The splitting of arguments from the executable at a space might have been incorrect,
20573    # since paths with space are more likely in Windows. Give it another try with the whole
20574    # argument.
20575    path="$complete"
20576    arguments="EOL"
20577    new_path="$path"
20578
20579  windows_path="$new_path"
20580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20581    unix_path=`$CYGPATH -u "$windows_path"`
20582    new_path="$unix_path"
20583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20585    new_path="$unix_path"
20586  fi
20587
20588
20589    new_path=`$WHICH "$new_path" 2> /dev/null`
20590
20591    if test "x$new_path" = x; then
20592      # It's still not found. Now this is an unrecoverable error.
20593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20594$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20595      has_space=`$ECHO "$complete" | $GREP " "`
20596      if test "x$has_space" != x; then
20597        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20598$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20599      fi
20600      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20601    fi
20602  fi
20603
20604  # Now new_path has a complete unix path to the binary
20605  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20606    # Keep paths in /bin as-is, but remove trailing .exe if any
20607    new_path="${new_path/%.exe/}"
20608    # Do not save /bin paths to all_fixpath_prefixes!
20609  else
20610    # Not in mixed or Windows style, start by that.
20611    new_path=`cmd //c echo $new_path`
20612
20613  input_path="$new_path"
20614  # Check if we need to convert this using DOS-style short mode. If the path
20615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20616  # take no chances and rewrite it.
20617  # Note: m4 eats our [], so we need to use [ and ] instead.
20618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20619  if test "x$has_forbidden_chars" != x; then
20620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20622  fi
20623
20624    # Output is in $new_path
20625
20626  windows_path="$new_path"
20627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20628    unix_path=`$CYGPATH -u "$windows_path"`
20629    new_path="$unix_path"
20630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20632    new_path="$unix_path"
20633  fi
20634
20635    # remove trailing .exe if any
20636    new_path="${new_path/%.exe/}"
20637
20638    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20639    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20640  fi
20641
20642  else
20643    # We're on a posix platform. Hooray! :)
20644    # First separate the path from the arguments. This will split at the first
20645    # space.
20646    complete="$CXX"
20647    path="${complete%% *}"
20648    tmp="$complete EOL"
20649    arguments="${tmp#* }"
20650
20651    # Cannot rely on the command "which" here since it doesn't always work.
20652    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20653    if test -z "$is_absolute_path"; then
20654      # Path to executable is not absolute. Find it.
20655      IFS_save="$IFS"
20656      IFS=:
20657      for p in $PATH; do
20658        if test -f "$p/$path" && test -x "$p/$path"; then
20659          new_path="$p/$path"
20660          break
20661        fi
20662      done
20663      IFS="$IFS_save"
20664    else
20665      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20666$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20667      new_path="$path"
20668    fi
20669
20670    if test "x$new_path" = x; then
20671        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20672$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20673        has_space=`$ECHO "$complete" | $GREP " "`
20674        if test "x$has_space" != x; then
20675          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20676$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20677        fi
20678        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20679      fi
20680  fi
20681
20682      # Now join together the path and the arguments once again
20683      if test "x$arguments" != xEOL; then
20684        new_complete="$new_path ${arguments% *}"
20685      else
20686        new_complete="$new_path"
20687      fi
20688
20689  if test "x$complete" != "x$new_complete"; then
20690      CXX="$new_complete"
20691      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20692$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20693    fi
20694
20695  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20696$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20697  TEST_COMPILER="$CXX"
20698
20699    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20700        # Follow a chain of symbolic links. Use readlink
20701        # where it exists, else fall back to horribly
20702        # complicated shell code.
20703        if test "x$READLINK_TESTED" != yes; then
20704            # On MacOSX there is a readlink tool with a different
20705            # purpose than the GNU readlink tool. Check the found readlink.
20706            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20707            if test "x$ISGNU" = x; then
20708                 # A readlink that we do not know how to use.
20709                 # Are there other non-GNU readlinks out there?
20710                 READLINK_TESTED=yes
20711                 READLINK=
20712            fi
20713        fi
20714
20715        if test "x$READLINK" != x; then
20716            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20717        else
20718            # Save the current directory for restoring afterwards
20719            STARTDIR=$PWD
20720            COUNTER=0
20721            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20722            sym_link_file=`$BASENAME $TEST_COMPILER`
20723            # Use the system pwd and not the shell builtin to resolve directory symlinks
20724            cd $sym_link_dir
20725            cd `$THEPWDCMD`
20726            sym_link_dir=`$THEPWDCMD`
20727            # Resolve file symlinks
20728            while test $COUNTER -lt 20; do
20729                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20730                if test "x$ISLINK" == x; then
20731                    # This is not a symbolic link! We are done!
20732                    break
20733                fi
20734                # Again resolve directory symlinks since the target of the just found
20735                # link could be in a different directory
20736                cd `$DIRNAME $ISLINK`
20737                sym_link_dir=`$THEPWDCMD`
20738                sym_link_file=`$BASENAME $ISLINK`
20739                let COUNTER=COUNTER+1
20740            done
20741            cd $STARTDIR
20742            TEST_COMPILER=$sym_link_dir/$sym_link_file
20743        fi
20744    fi
20745
20746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20747$as_echo "$TEST_COMPILER" >&6; }
20748  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20749$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20750
20751  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20752  if test "x$COMPILER_BASENAME" = "xccache"; then
20753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20754$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20755    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20756    # We want to control ccache invocation ourselves, so ignore this cc and try
20757    # searching again.
20758
20759    # Remove the path to the fake ccache cc from the PATH
20760    RETRY_COMPILER_SAVED_PATH="$PATH"
20761    COMPILER_DIRNAME=`$DIRNAME $CXX`
20762    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20763
20764    # Try again looking for our compiler
20765    if test -n "$ac_tool_prefix"; then
20766  for ac_prog in $COMPILER_CHECK_LIST
20767  do
20768    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20769set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20771$as_echo_n "checking for $ac_word... " >&6; }
20772if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20773  $as_echo_n "(cached) " >&6
20774else
20775  if test -n "$PROPER_COMPILER_CXX"; then
20776  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20777else
20778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20779for as_dir in $PATH
20780do
20781  IFS=$as_save_IFS
20782  test -z "$as_dir" && as_dir=.
20783    for ac_exec_ext in '' $ac_executable_extensions; do
20784  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20785    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20787    break 2
20788  fi
20789done
20790  done
20791IFS=$as_save_IFS
20792
20793fi
20794fi
20795PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20796if test -n "$PROPER_COMPILER_CXX"; then
20797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20798$as_echo "$PROPER_COMPILER_CXX" >&6; }
20799else
20800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20801$as_echo "no" >&6; }
20802fi
20803
20804
20805    test -n "$PROPER_COMPILER_CXX" && break
20806  done
20807fi
20808if test -z "$PROPER_COMPILER_CXX"; then
20809  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20810  for ac_prog in $COMPILER_CHECK_LIST
20811do
20812  # Extract the first word of "$ac_prog", so it can be a program name with args.
20813set dummy $ac_prog; ac_word=$2
20814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20815$as_echo_n "checking for $ac_word... " >&6; }
20816if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20817  $as_echo_n "(cached) " >&6
20818else
20819  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20820  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20821else
20822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20823for as_dir in $PATH
20824do
20825  IFS=$as_save_IFS
20826  test -z "$as_dir" && as_dir=.
20827    for ac_exec_ext in '' $ac_executable_extensions; do
20828  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20829    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20831    break 2
20832  fi
20833done
20834  done
20835IFS=$as_save_IFS
20836
20837fi
20838fi
20839ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20840if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20842$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20843else
20844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20845$as_echo "no" >&6; }
20846fi
20847
20848
20849  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20850done
20851
20852  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20853    PROPER_COMPILER_CXX=""
20854  else
20855    case $cross_compiling:$ac_tool_warned in
20856yes:)
20857{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20858$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20859ac_tool_warned=yes ;;
20860esac
20861    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20862  fi
20863fi
20864
20865
20866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20867
20868  # First separate the path from the arguments. This will split at the first
20869  # space.
20870  complete="$PROPER_COMPILER_CXX"
20871  path="${complete%% *}"
20872  tmp="$complete EOL"
20873  arguments="${tmp#* }"
20874
20875  # Input might be given as Windows format, start by converting to
20876  # unix format.
20877  new_path=`$CYGPATH -u "$path"`
20878
20879  # Now try to locate executable using which
20880  new_path=`$WHICH "$new_path" 2> /dev/null`
20881  # bat and cmd files are not always considered executable in cygwin causing which
20882  # to not find them
20883  if test "x$new_path" = x \
20884           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20885           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20886    new_path=`$CYGPATH -u "$path"`
20887  fi
20888  if test "x$new_path" = x; then
20889    # Oops. Which didn't find the executable.
20890    # The splitting of arguments from the executable at a space might have been incorrect,
20891    # since paths with space are more likely in Windows. Give it another try with the whole
20892    # argument.
20893    path="$complete"
20894    arguments="EOL"
20895    new_path=`$CYGPATH -u "$path"`
20896    new_path=`$WHICH "$new_path" 2> /dev/null`
20897    # bat and cmd files are not always considered executable in cygwin causing which
20898    # to not find them
20899    if test "x$new_path" = x \
20900             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20901             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20902      new_path=`$CYGPATH -u "$path"`
20903    fi
20904    if test "x$new_path" = x; then
20905      # It's still not found. Now this is an unrecoverable error.
20906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20907$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20908      has_space=`$ECHO "$complete" | $GREP " "`
20909      if test "x$has_space" != x; then
20910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20912      fi
20913      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20914    fi
20915  fi
20916
20917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20920  # "foo.exe" is OK but "foo" is an error.
20921  #
20922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20923  # It is also a way to make sure we got the proper file name for the real test later on.
20924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20925  if test "x$test_shortpath" = x; then
20926    # Short path failed, file does not exist as specified.
20927    # Try adding .exe or .cmd
20928    if test -f "${new_path}.exe"; then
20929       input_to_shortpath="${new_path}.exe"
20930    elif test -f "${new_path}.cmd"; then
20931       input_to_shortpath="${new_path}.cmd"
20932    else
20933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20934$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20935      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20936$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20937      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20938    fi
20939  else
20940    input_to_shortpath="$new_path"
20941  fi
20942
20943  # Call helper function which possibly converts this using DOS-style short mode.
20944  # If so, the updated path is stored in $new_path.
20945  new_path="$input_to_shortpath"
20946
20947  input_path="$input_to_shortpath"
20948  # Check if we need to convert this using DOS-style short mode. If the path
20949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20950  # take no chances and rewrite it.
20951  # Note: m4 eats our [], so we need to use [ and ] instead.
20952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20953  if test "x$has_forbidden_chars" != x; then
20954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20958      # Going to short mode and back again did indeed matter. Since short mode is
20959      # case insensitive, let's make it lowercase to improve readability.
20960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20961      # Now convert it back to Unix-stile (cygpath)
20962      input_path=`$CYGPATH -u "$shortmode_path"`
20963      new_path="$input_path"
20964    fi
20965  fi
20966
20967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20968  if test "x$test_cygdrive_prefix" = x; then
20969    # As a simple fix, exclude /usr/bin since it's not a real path.
20970    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20972      # a path prefixed by /cygdrive for fixpath to work.
20973      new_path="$CYGWIN_ROOT_PATH$input_path"
20974    fi
20975  fi
20976
20977  # remove trailing .exe if any
20978  new_path="${new_path/%.exe/}"
20979
20980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20981
20982  # First separate the path from the arguments. This will split at the first
20983  # space.
20984  complete="$PROPER_COMPILER_CXX"
20985  path="${complete%% *}"
20986  tmp="$complete EOL"
20987  arguments="${tmp#* }"
20988
20989  # Input might be given as Windows format, start by converting to
20990  # unix format.
20991  new_path="$path"
20992
20993  windows_path="$new_path"
20994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20995    unix_path=`$CYGPATH -u "$windows_path"`
20996    new_path="$unix_path"
20997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20999    new_path="$unix_path"
21000  fi
21001
21002
21003  # Now try to locate executable using which
21004  new_path=`$WHICH "$new_path" 2> /dev/null`
21005
21006  if test "x$new_path" = x; then
21007    # Oops. Which didn't find the executable.
21008    # The splitting of arguments from the executable at a space might have been incorrect,
21009    # since paths with space are more likely in Windows. Give it another try with the whole
21010    # argument.
21011    path="$complete"
21012    arguments="EOL"
21013    new_path="$path"
21014
21015  windows_path="$new_path"
21016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21017    unix_path=`$CYGPATH -u "$windows_path"`
21018    new_path="$unix_path"
21019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21021    new_path="$unix_path"
21022  fi
21023
21024
21025    new_path=`$WHICH "$new_path" 2> /dev/null`
21026
21027    if test "x$new_path" = x; then
21028      # It's still not found. Now this is an unrecoverable error.
21029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21030$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21031      has_space=`$ECHO "$complete" | $GREP " "`
21032      if test "x$has_space" != x; then
21033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21035      fi
21036      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21037    fi
21038  fi
21039
21040  # Now new_path has a complete unix path to the binary
21041  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21042    # Keep paths in /bin as-is, but remove trailing .exe if any
21043    new_path="${new_path/%.exe/}"
21044    # Do not save /bin paths to all_fixpath_prefixes!
21045  else
21046    # Not in mixed or Windows style, start by that.
21047    new_path=`cmd //c echo $new_path`
21048
21049  input_path="$new_path"
21050  # Check if we need to convert this using DOS-style short mode. If the path
21051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21052  # take no chances and rewrite it.
21053  # Note: m4 eats our [], so we need to use [ and ] instead.
21054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21055  if test "x$has_forbidden_chars" != x; then
21056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21058  fi
21059
21060    # Output is in $new_path
21061
21062  windows_path="$new_path"
21063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21064    unix_path=`$CYGPATH -u "$windows_path"`
21065    new_path="$unix_path"
21066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21068    new_path="$unix_path"
21069  fi
21070
21071    # remove trailing .exe if any
21072    new_path="${new_path/%.exe/}"
21073
21074    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21075    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21076  fi
21077
21078  else
21079    # We're on a posix platform. Hooray! :)
21080    # First separate the path from the arguments. This will split at the first
21081    # space.
21082    complete="$PROPER_COMPILER_CXX"
21083    path="${complete%% *}"
21084    tmp="$complete EOL"
21085    arguments="${tmp#* }"
21086
21087    # Cannot rely on the command "which" here since it doesn't always work.
21088    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21089    if test -z "$is_absolute_path"; then
21090      # Path to executable is not absolute. Find it.
21091      IFS_save="$IFS"
21092      IFS=:
21093      for p in $PATH; do
21094        if test -f "$p/$path" && test -x "$p/$path"; then
21095          new_path="$p/$path"
21096          break
21097        fi
21098      done
21099      IFS="$IFS_save"
21100    else
21101      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21102$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21103      new_path="$path"
21104    fi
21105
21106    if test "x$new_path" = x; then
21107        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21108$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21109        has_space=`$ECHO "$complete" | $GREP " "`
21110        if test "x$has_space" != x; then
21111          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21112$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21113        fi
21114        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21115      fi
21116  fi
21117
21118      # Now join together the path and the arguments once again
21119      if test "x$arguments" != xEOL; then
21120        new_complete="$new_path ${arguments% *}"
21121      else
21122        new_complete="$new_path"
21123      fi
21124
21125  if test "x$complete" != "x$new_complete"; then
21126      PROPER_COMPILER_CXX="$new_complete"
21127      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21128$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21129    fi
21130
21131    PATH="$RETRY_COMPILER_SAVED_PATH"
21132
21133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21134$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21135
21136    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21137        # Follow a chain of symbolic links. Use readlink
21138        # where it exists, else fall back to horribly
21139        # complicated shell code.
21140        if test "x$READLINK_TESTED" != yes; then
21141            # On MacOSX there is a readlink tool with a different
21142            # purpose than the GNU readlink tool. Check the found readlink.
21143            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21144            if test "x$ISGNU" = x; then
21145                 # A readlink that we do not know how to use.
21146                 # Are there other non-GNU readlinks out there?
21147                 READLINK_TESTED=yes
21148                 READLINK=
21149            fi
21150        fi
21151
21152        if test "x$READLINK" != x; then
21153            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21154        else
21155            # Save the current directory for restoring afterwards
21156            STARTDIR=$PWD
21157            COUNTER=0
21158            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21159            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21160            # Use the system pwd and not the shell builtin to resolve directory symlinks
21161            cd $sym_link_dir
21162            cd `$THEPWDCMD`
21163            sym_link_dir=`$THEPWDCMD`
21164            # Resolve file symlinks
21165            while test $COUNTER -lt 20; do
21166                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21167                if test "x$ISLINK" == x; then
21168                    # This is not a symbolic link! We are done!
21169                    break
21170                fi
21171                # Again resolve directory symlinks since the target of the just found
21172                # link could be in a different directory
21173                cd `$DIRNAME $ISLINK`
21174                sym_link_dir=`$THEPWDCMD`
21175                sym_link_file=`$BASENAME $ISLINK`
21176                let COUNTER=COUNTER+1
21177            done
21178            cd $STARTDIR
21179            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21180        fi
21181    fi
21182
21183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21184$as_echo "$PROPER_COMPILER_CXX" >&6; }
21185    CXX="$PROPER_COMPILER_CXX"
21186  else
21187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21188$as_echo "no, keeping CXX" >&6; }
21189    CXX="$TEST_COMPILER"
21190  fi
21191
21192  COMPILER=$CXX
21193  COMPILER_NAME=$COMPILER_NAME
21194
21195  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21196    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21197    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21198    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21199    if test $? -ne 0; then
21200      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21201
21202      { $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
21203$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21204      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21205$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21206      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21207    else
21208      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21209      COMPILER_VENDOR="Sun Studio"
21210    fi
21211  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21212    # First line typically looks something like:
21213    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21214    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21215    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21216    COMPILER_VENDOR="Microsoft CL.EXE"
21217    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21218    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21219      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21220        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21221      fi
21222    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21223      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21224        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21225      fi
21226    fi
21227  else
21228    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21229    # Check that this is likely to be GCC.
21230    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21231    if test $? -ne 0; then
21232      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21233$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21234      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21235$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21236      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21237    fi
21238
21239    # First line typically looks something like:
21240    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21241    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21242    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21243  fi
21244  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21245  CXX_VERSION="$COMPILER_VERSION"
21246  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21247  CXX_VENDOR="$COMPILER_VENDOR"
21248
21249  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21250$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21251
21252
21253# Now that we have resolved CXX ourself, let autoconf have its go at it
21254ac_ext=cpp
21255ac_cpp='$CXXCPP $CPPFLAGS'
21256ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21257ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21258ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21259if test -z "$CXX"; then
21260  if test -n "$CCC"; then
21261    CXX=$CCC
21262  else
21263    if test -n "$ac_tool_prefix"; then
21264  for ac_prog in $CXX
21265  do
21266    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21267set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21269$as_echo_n "checking for $ac_word... " >&6; }
21270if test "${ac_cv_prog_CXX+set}" = set; then :
21271  $as_echo_n "(cached) " >&6
21272else
21273  if test -n "$CXX"; then
21274  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21275else
21276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21277for as_dir in $PATH
21278do
21279  IFS=$as_save_IFS
21280  test -z "$as_dir" && as_dir=.
21281    for ac_exec_ext in '' $ac_executable_extensions; do
21282  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21283    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21285    break 2
21286  fi
21287done
21288  done
21289IFS=$as_save_IFS
21290
21291fi
21292fi
21293CXX=$ac_cv_prog_CXX
21294if test -n "$CXX"; then
21295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21296$as_echo "$CXX" >&6; }
21297else
21298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21299$as_echo "no" >&6; }
21300fi
21301
21302
21303    test -n "$CXX" && break
21304  done
21305fi
21306if test -z "$CXX"; then
21307  ac_ct_CXX=$CXX
21308  for ac_prog in $CXX
21309do
21310  # Extract the first word of "$ac_prog", so it can be a program name with args.
21311set dummy $ac_prog; ac_word=$2
21312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21313$as_echo_n "checking for $ac_word... " >&6; }
21314if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21315  $as_echo_n "(cached) " >&6
21316else
21317  if test -n "$ac_ct_CXX"; then
21318  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21319else
21320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21321for as_dir in $PATH
21322do
21323  IFS=$as_save_IFS
21324  test -z "$as_dir" && as_dir=.
21325    for ac_exec_ext in '' $ac_executable_extensions; do
21326  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21327    ac_cv_prog_ac_ct_CXX="$ac_prog"
21328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21329    break 2
21330  fi
21331done
21332  done
21333IFS=$as_save_IFS
21334
21335fi
21336fi
21337ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21338if test -n "$ac_ct_CXX"; then
21339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21340$as_echo "$ac_ct_CXX" >&6; }
21341else
21342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21343$as_echo "no" >&6; }
21344fi
21345
21346
21347  test -n "$ac_ct_CXX" && break
21348done
21349
21350  if test "x$ac_ct_CXX" = x; then
21351    CXX="g++"
21352  else
21353    case $cross_compiling:$ac_tool_warned in
21354yes:)
21355{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21356$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21357ac_tool_warned=yes ;;
21358esac
21359    CXX=$ac_ct_CXX
21360  fi
21361fi
21362
21363  fi
21364fi
21365# Provide some information about the compiler.
21366$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21367set X $ac_compile
21368ac_compiler=$2
21369for ac_option in --version -v -V -qversion; do
21370  { { ac_try="$ac_compiler $ac_option >&5"
21371case "(($ac_try" in
21372  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21373  *) ac_try_echo=$ac_try;;
21374esac
21375eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21376$as_echo "$ac_try_echo"; } >&5
21377  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21378  ac_status=$?
21379  if test -s conftest.err; then
21380    sed '10a\
21381... rest of stderr output deleted ...
21382         10q' conftest.err >conftest.er1
21383    cat conftest.er1 >&5
21384  fi
21385  rm -f conftest.er1 conftest.err
21386  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21387  test $ac_status = 0; }
21388done
21389
21390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21391$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21392if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21393  $as_echo_n "(cached) " >&6
21394else
21395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21396/* end confdefs.h.  */
21397
21398int
21399main ()
21400{
21401#ifndef __GNUC__
21402       choke me
21403#endif
21404
21405  ;
21406  return 0;
21407}
21408_ACEOF
21409if ac_fn_cxx_try_compile "$LINENO"; then :
21410  ac_compiler_gnu=yes
21411else
21412  ac_compiler_gnu=no
21413fi
21414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21415ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21416
21417fi
21418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21419$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21420if test $ac_compiler_gnu = yes; then
21421  GXX=yes
21422else
21423  GXX=
21424fi
21425ac_test_CXXFLAGS=${CXXFLAGS+set}
21426ac_save_CXXFLAGS=$CXXFLAGS
21427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21428$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21429if test "${ac_cv_prog_cxx_g+set}" = set; then :
21430  $as_echo_n "(cached) " >&6
21431else
21432  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21433   ac_cxx_werror_flag=yes
21434   ac_cv_prog_cxx_g=no
21435   CXXFLAGS="-g"
21436   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21437/* end confdefs.h.  */
21438
21439int
21440main ()
21441{
21442
21443  ;
21444  return 0;
21445}
21446_ACEOF
21447if ac_fn_cxx_try_compile "$LINENO"; then :
21448  ac_cv_prog_cxx_g=yes
21449else
21450  CXXFLAGS=""
21451      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21452/* end confdefs.h.  */
21453
21454int
21455main ()
21456{
21457
21458  ;
21459  return 0;
21460}
21461_ACEOF
21462if ac_fn_cxx_try_compile "$LINENO"; then :
21463
21464else
21465  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21466	 CXXFLAGS="-g"
21467	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21468/* end confdefs.h.  */
21469
21470int
21471main ()
21472{
21473
21474  ;
21475  return 0;
21476}
21477_ACEOF
21478if ac_fn_cxx_try_compile "$LINENO"; then :
21479  ac_cv_prog_cxx_g=yes
21480fi
21481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21482fi
21483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21484fi
21485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21486   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21487fi
21488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21489$as_echo "$ac_cv_prog_cxx_g" >&6; }
21490if test "$ac_test_CXXFLAGS" = set; then
21491  CXXFLAGS=$ac_save_CXXFLAGS
21492elif test $ac_cv_prog_cxx_g = yes; then
21493  if test "$GXX" = yes; then
21494    CXXFLAGS="-g -O2"
21495  else
21496    CXXFLAGS="-g"
21497  fi
21498else
21499  if test "$GXX" = yes; then
21500    CXXFLAGS="-O2"
21501  else
21502    CXXFLAGS=
21503  fi
21504fi
21505ac_ext=cpp
21506ac_cpp='$CXXCPP $CPPFLAGS'
21507ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21508ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21510
21511
21512### Locate other tools
21513
21514if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21515    ac_ext=m
21516ac_cpp='$OBJCPP $CPPFLAGS'
21517ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21518ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21519ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21520if test -n "$ac_tool_prefix"; then
21521  for ac_prog in gcc objcc objc cc CC
21522  do
21523    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21524set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21526$as_echo_n "checking for $ac_word... " >&6; }
21527if test "${ac_cv_prog_OBJC+set}" = set; then :
21528  $as_echo_n "(cached) " >&6
21529else
21530  if test -n "$OBJC"; then
21531  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21532else
21533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21534for as_dir in $PATH
21535do
21536  IFS=$as_save_IFS
21537  test -z "$as_dir" && as_dir=.
21538    for ac_exec_ext in '' $ac_executable_extensions; do
21539  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21540    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21542    break 2
21543  fi
21544done
21545  done
21546IFS=$as_save_IFS
21547
21548fi
21549fi
21550OBJC=$ac_cv_prog_OBJC
21551if test -n "$OBJC"; then
21552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21553$as_echo "$OBJC" >&6; }
21554else
21555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21556$as_echo "no" >&6; }
21557fi
21558
21559
21560    test -n "$OBJC" && break
21561  done
21562fi
21563if test -z "$OBJC"; then
21564  ac_ct_OBJC=$OBJC
21565  for ac_prog in gcc objcc objc cc CC
21566do
21567  # Extract the first word of "$ac_prog", so it can be a program name with args.
21568set dummy $ac_prog; ac_word=$2
21569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21570$as_echo_n "checking for $ac_word... " >&6; }
21571if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21572  $as_echo_n "(cached) " >&6
21573else
21574  if test -n "$ac_ct_OBJC"; then
21575  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21576else
21577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21578for as_dir in $PATH
21579do
21580  IFS=$as_save_IFS
21581  test -z "$as_dir" && as_dir=.
21582    for ac_exec_ext in '' $ac_executable_extensions; do
21583  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21584    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21586    break 2
21587  fi
21588done
21589  done
21590IFS=$as_save_IFS
21591
21592fi
21593fi
21594ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21595if test -n "$ac_ct_OBJC"; then
21596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21597$as_echo "$ac_ct_OBJC" >&6; }
21598else
21599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21600$as_echo "no" >&6; }
21601fi
21602
21603
21604  test -n "$ac_ct_OBJC" && break
21605done
21606
21607  if test "x$ac_ct_OBJC" = x; then
21608    OBJC="gcc"
21609  else
21610    case $cross_compiling:$ac_tool_warned in
21611yes:)
21612{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21613$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21614ac_tool_warned=yes ;;
21615esac
21616    OBJC=$ac_ct_OBJC
21617  fi
21618fi
21619
21620# Provide some information about the compiler.
21621$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21622set X $ac_compile
21623ac_compiler=$2
21624for ac_option in --version -v -V -qversion; do
21625  { { ac_try="$ac_compiler $ac_option >&5"
21626case "(($ac_try" in
21627  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21628  *) ac_try_echo=$ac_try;;
21629esac
21630eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21631$as_echo "$ac_try_echo"; } >&5
21632  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21633  ac_status=$?
21634  if test -s conftest.err; then
21635    sed '10a\
21636... rest of stderr output deleted ...
21637         10q' conftest.err >conftest.er1
21638    cat conftest.er1 >&5
21639  fi
21640  rm -f conftest.er1 conftest.err
21641  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21642  test $ac_status = 0; }
21643done
21644
21645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21646$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21647if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21648  $as_echo_n "(cached) " >&6
21649else
21650  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21651/* end confdefs.h.  */
21652
21653int
21654main ()
21655{
21656#ifndef __GNUC__
21657       choke me
21658#endif
21659
21660  ;
21661  return 0;
21662}
21663_ACEOF
21664if ac_fn_objc_try_compile "$LINENO"; then :
21665  ac_compiler_gnu=yes
21666else
21667  ac_compiler_gnu=no
21668fi
21669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21670ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21671
21672fi
21673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21674$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21675if test $ac_compiler_gnu = yes; then
21676  GOBJC=yes
21677else
21678  GOBJC=
21679fi
21680ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21681ac_save_OBJCFLAGS=$OBJCFLAGS
21682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21683$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21684if test "${ac_cv_prog_objc_g+set}" = set; then :
21685  $as_echo_n "(cached) " >&6
21686else
21687  ac_save_objc_werror_flag=$ac_objc_werror_flag
21688   ac_objc_werror_flag=yes
21689   ac_cv_prog_objc_g=no
21690   OBJCFLAGS="-g"
21691   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21692/* end confdefs.h.  */
21693
21694int
21695main ()
21696{
21697
21698  ;
21699  return 0;
21700}
21701_ACEOF
21702if ac_fn_objc_try_compile "$LINENO"; then :
21703  ac_cv_prog_objc_g=yes
21704else
21705  OBJCFLAGS=""
21706      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21707/* end confdefs.h.  */
21708
21709int
21710main ()
21711{
21712
21713  ;
21714  return 0;
21715}
21716_ACEOF
21717if ac_fn_objc_try_compile "$LINENO"; then :
21718
21719else
21720  ac_objc_werror_flag=$ac_save_objc_werror_flag
21721	 OBJCFLAGS="-g"
21722	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21723/* end confdefs.h.  */
21724
21725int
21726main ()
21727{
21728
21729  ;
21730  return 0;
21731}
21732_ACEOF
21733if ac_fn_objc_try_compile "$LINENO"; then :
21734  ac_cv_prog_objc_g=yes
21735fi
21736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21737fi
21738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21739fi
21740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21741   ac_objc_werror_flag=$ac_save_objc_werror_flag
21742fi
21743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21744$as_echo "$ac_cv_prog_objc_g" >&6; }
21745if test "$ac_test_OBJCFLAGS" = set; then
21746  OBJCFLAGS=$ac_save_OBJCFLAGS
21747elif test $ac_cv_prog_objc_g = yes; then
21748  if test "$GOBJC" = yes; then
21749    OBJCFLAGS="-g -O2"
21750  else
21751    OBJCFLAGS="-g"
21752  fi
21753else
21754  if test "$GOBJC" = yes; then
21755    OBJCFLAGS="-O2"
21756  else
21757    OBJCFLAGS=
21758  fi
21759fi
21760ac_ext=cpp
21761ac_cpp='$CXXCPP $CPPFLAGS'
21762ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21763ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21764ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21765
21766
21767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21768
21769  # First separate the path from the arguments. This will split at the first
21770  # space.
21771  complete="$OBJC"
21772  path="${complete%% *}"
21773  tmp="$complete EOL"
21774  arguments="${tmp#* }"
21775
21776  # Input might be given as Windows format, start by converting to
21777  # unix format.
21778  new_path=`$CYGPATH -u "$path"`
21779
21780  # Now try to locate executable using which
21781  new_path=`$WHICH "$new_path" 2> /dev/null`
21782  # bat and cmd files are not always considered executable in cygwin causing which
21783  # to not find them
21784  if test "x$new_path" = x \
21785           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21786           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21787    new_path=`$CYGPATH -u "$path"`
21788  fi
21789  if test "x$new_path" = x; then
21790    # Oops. Which didn't find the executable.
21791    # The splitting of arguments from the executable at a space might have been incorrect,
21792    # since paths with space are more likely in Windows. Give it another try with the whole
21793    # argument.
21794    path="$complete"
21795    arguments="EOL"
21796    new_path=`$CYGPATH -u "$path"`
21797    new_path=`$WHICH "$new_path" 2> /dev/null`
21798    # bat and cmd files are not always considered executable in cygwin causing which
21799    # to not find them
21800    if test "x$new_path" = x \
21801             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21802             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21803      new_path=`$CYGPATH -u "$path"`
21804    fi
21805    if test "x$new_path" = x; then
21806      # It's still not found. Now this is an unrecoverable error.
21807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21808$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21809      has_space=`$ECHO "$complete" | $GREP " "`
21810      if test "x$has_space" != x; then
21811        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21812$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21813      fi
21814      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21815    fi
21816  fi
21817
21818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21821  # "foo.exe" is OK but "foo" is an error.
21822  #
21823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21824  # It is also a way to make sure we got the proper file name for the real test later on.
21825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21826  if test "x$test_shortpath" = x; then
21827    # Short path failed, file does not exist as specified.
21828    # Try adding .exe or .cmd
21829    if test -f "${new_path}.exe"; then
21830       input_to_shortpath="${new_path}.exe"
21831    elif test -f "${new_path}.cmd"; then
21832       input_to_shortpath="${new_path}.cmd"
21833    else
21834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21835$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21836      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21837$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21838      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21839    fi
21840  else
21841    input_to_shortpath="$new_path"
21842  fi
21843
21844  # Call helper function which possibly converts this using DOS-style short mode.
21845  # If so, the updated path is stored in $new_path.
21846  new_path="$input_to_shortpath"
21847
21848  input_path="$input_to_shortpath"
21849  # Check if we need to convert this using DOS-style short mode. If the path
21850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21851  # take no chances and rewrite it.
21852  # Note: m4 eats our [], so we need to use [ and ] instead.
21853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21854  if test "x$has_forbidden_chars" != x; then
21855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21859      # Going to short mode and back again did indeed matter. Since short mode is
21860      # case insensitive, let's make it lowercase to improve readability.
21861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21862      # Now convert it back to Unix-stile (cygpath)
21863      input_path=`$CYGPATH -u "$shortmode_path"`
21864      new_path="$input_path"
21865    fi
21866  fi
21867
21868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21869  if test "x$test_cygdrive_prefix" = x; then
21870    # As a simple fix, exclude /usr/bin since it's not a real path.
21871    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21873      # a path prefixed by /cygdrive for fixpath to work.
21874      new_path="$CYGWIN_ROOT_PATH$input_path"
21875    fi
21876  fi
21877
21878  # remove trailing .exe if any
21879  new_path="${new_path/%.exe/}"
21880
21881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21882
21883  # First separate the path from the arguments. This will split at the first
21884  # space.
21885  complete="$OBJC"
21886  path="${complete%% *}"
21887  tmp="$complete EOL"
21888  arguments="${tmp#* }"
21889
21890  # Input might be given as Windows format, start by converting to
21891  # unix format.
21892  new_path="$path"
21893
21894  windows_path="$new_path"
21895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21896    unix_path=`$CYGPATH -u "$windows_path"`
21897    new_path="$unix_path"
21898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21900    new_path="$unix_path"
21901  fi
21902
21903
21904  # Now try to locate executable using which
21905  new_path=`$WHICH "$new_path" 2> /dev/null`
21906
21907  if test "x$new_path" = x; then
21908    # Oops. Which didn't find the executable.
21909    # The splitting of arguments from the executable at a space might have been incorrect,
21910    # since paths with space are more likely in Windows. Give it another try with the whole
21911    # argument.
21912    path="$complete"
21913    arguments="EOL"
21914    new_path="$path"
21915
21916  windows_path="$new_path"
21917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21918    unix_path=`$CYGPATH -u "$windows_path"`
21919    new_path="$unix_path"
21920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21922    new_path="$unix_path"
21923  fi
21924
21925
21926    new_path=`$WHICH "$new_path" 2> /dev/null`
21927
21928    if test "x$new_path" = x; then
21929      # It's still not found. Now this is an unrecoverable error.
21930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21931$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21932      has_space=`$ECHO "$complete" | $GREP " "`
21933      if test "x$has_space" != x; then
21934        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21935$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21936      fi
21937      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21938    fi
21939  fi
21940
21941  # Now new_path has a complete unix path to the binary
21942  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21943    # Keep paths in /bin as-is, but remove trailing .exe if any
21944    new_path="${new_path/%.exe/}"
21945    # Do not save /bin paths to all_fixpath_prefixes!
21946  else
21947    # Not in mixed or Windows style, start by that.
21948    new_path=`cmd //c echo $new_path`
21949
21950  input_path="$new_path"
21951  # Check if we need to convert this using DOS-style short mode. If the path
21952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21953  # take no chances and rewrite it.
21954  # Note: m4 eats our [], so we need to use [ and ] instead.
21955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21956  if test "x$has_forbidden_chars" != x; then
21957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21958    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21959  fi
21960
21961    # Output is in $new_path
21962
21963  windows_path="$new_path"
21964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21965    unix_path=`$CYGPATH -u "$windows_path"`
21966    new_path="$unix_path"
21967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21969    new_path="$unix_path"
21970  fi
21971
21972    # remove trailing .exe if any
21973    new_path="${new_path/%.exe/}"
21974
21975    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21976    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21977  fi
21978
21979  else
21980    # We're on a posix platform. Hooray! :)
21981    # First separate the path from the arguments. This will split at the first
21982    # space.
21983    complete="$OBJC"
21984    path="${complete%% *}"
21985    tmp="$complete EOL"
21986    arguments="${tmp#* }"
21987
21988    # Cannot rely on the command "which" here since it doesn't always work.
21989    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21990    if test -z "$is_absolute_path"; then
21991      # Path to executable is not absolute. Find it.
21992      IFS_save="$IFS"
21993      IFS=:
21994      for p in $PATH; do
21995        if test -f "$p/$path" && test -x "$p/$path"; then
21996          new_path="$p/$path"
21997          break
21998        fi
21999      done
22000      IFS="$IFS_save"
22001    else
22002      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22003$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22004      new_path="$path"
22005    fi
22006
22007    if test "x$new_path" = x; then
22008        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22009$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22010        has_space=`$ECHO "$complete" | $GREP " "`
22011        if test "x$has_space" != x; then
22012          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22013$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22014        fi
22015        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22016      fi
22017  fi
22018
22019      # Now join together the path and the arguments once again
22020      if test "x$arguments" != xEOL; then
22021        new_complete="$new_path ${arguments% *}"
22022      else
22023        new_complete="$new_path"
22024      fi
22025
22026  if test "x$complete" != "x$new_complete"; then
22027      OBJC="$new_complete"
22028      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22029$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22030    fi
22031
22032else
22033    OBJC=
22034fi
22035
22036# Restore the flags to the user specified values.
22037# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22038CFLAGS="$ORG_CFLAGS"
22039CXXFLAGS="$ORG_CXXFLAGS"
22040OBJCFLAGS="$ORG_OBJCFLAGS"
22041
22042LD="$CC"
22043LDEXE="$CC"
22044LDCXX="$CXX"
22045LDEXECXX="$CXX"
22046
22047# LDEXE is the linker to use, when creating executables.
22048
22049# Linking C++ libraries.
22050
22051# Linking C++ executables.
22052
22053
22054if test "x$OPENJDK_TARGET_OS" != xwindows; then
22055    if test -n "$ac_tool_prefix"; then
22056  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22057set dummy ${ac_tool_prefix}ar; ac_word=$2
22058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22059$as_echo_n "checking for $ac_word... " >&6; }
22060if test "${ac_cv_prog_AR+set}" = set; then :
22061  $as_echo_n "(cached) " >&6
22062else
22063  if test -n "$AR"; then
22064  ac_cv_prog_AR="$AR" # Let the user override the test.
22065else
22066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22067for as_dir in $PATH
22068do
22069  IFS=$as_save_IFS
22070  test -z "$as_dir" && as_dir=.
22071    for ac_exec_ext in '' $ac_executable_extensions; do
22072  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22073    ac_cv_prog_AR="${ac_tool_prefix}ar"
22074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22075    break 2
22076  fi
22077done
22078  done
22079IFS=$as_save_IFS
22080
22081fi
22082fi
22083AR=$ac_cv_prog_AR
22084if test -n "$AR"; then
22085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22086$as_echo "$AR" >&6; }
22087else
22088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22089$as_echo "no" >&6; }
22090fi
22091
22092
22093fi
22094if test -z "$ac_cv_prog_AR"; then
22095  ac_ct_AR=$AR
22096  # Extract the first word of "ar", so it can be a program name with args.
22097set dummy ar; ac_word=$2
22098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22099$as_echo_n "checking for $ac_word... " >&6; }
22100if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22101  $as_echo_n "(cached) " >&6
22102else
22103  if test -n "$ac_ct_AR"; then
22104  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22105else
22106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22107for as_dir in $PATH
22108do
22109  IFS=$as_save_IFS
22110  test -z "$as_dir" && as_dir=.
22111    for ac_exec_ext in '' $ac_executable_extensions; do
22112  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22113    ac_cv_prog_ac_ct_AR="ar"
22114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22115    break 2
22116  fi
22117done
22118  done
22119IFS=$as_save_IFS
22120
22121fi
22122fi
22123ac_ct_AR=$ac_cv_prog_ac_ct_AR
22124if test -n "$ac_ct_AR"; then
22125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22126$as_echo "$ac_ct_AR" >&6; }
22127else
22128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22129$as_echo "no" >&6; }
22130fi
22131
22132  if test "x$ac_ct_AR" = x; then
22133    AR=""
22134  else
22135    case $cross_compiling:$ac_tool_warned in
22136yes:)
22137{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22138$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22139ac_tool_warned=yes ;;
22140esac
22141    AR=$ac_ct_AR
22142  fi
22143else
22144  AR="$ac_cv_prog_AR"
22145fi
22146
22147
22148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22149
22150  # First separate the path from the arguments. This will split at the first
22151  # space.
22152  complete="$AR"
22153  path="${complete%% *}"
22154  tmp="$complete EOL"
22155  arguments="${tmp#* }"
22156
22157  # Input might be given as Windows format, start by converting to
22158  # unix format.
22159  new_path=`$CYGPATH -u "$path"`
22160
22161  # Now try to locate executable using which
22162  new_path=`$WHICH "$new_path" 2> /dev/null`
22163  # bat and cmd files are not always considered executable in cygwin causing which
22164  # to not find them
22165  if test "x$new_path" = x \
22166           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22167           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22168    new_path=`$CYGPATH -u "$path"`
22169  fi
22170  if test "x$new_path" = x; then
22171    # Oops. Which didn't find the executable.
22172    # The splitting of arguments from the executable at a space might have been incorrect,
22173    # since paths with space are more likely in Windows. Give it another try with the whole
22174    # argument.
22175    path="$complete"
22176    arguments="EOL"
22177    new_path=`$CYGPATH -u "$path"`
22178    new_path=`$WHICH "$new_path" 2> /dev/null`
22179    # bat and cmd files are not always considered executable in cygwin causing which
22180    # to not find them
22181    if test "x$new_path" = x \
22182             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22183             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22184      new_path=`$CYGPATH -u "$path"`
22185    fi
22186    if test "x$new_path" = x; then
22187      # It's still not found. Now this is an unrecoverable error.
22188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22189$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22190      has_space=`$ECHO "$complete" | $GREP " "`
22191      if test "x$has_space" != x; then
22192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22194      fi
22195      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22196    fi
22197  fi
22198
22199  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22200  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22201  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22202  # "foo.exe" is OK but "foo" is an error.
22203  #
22204  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22205  # It is also a way to make sure we got the proper file name for the real test later on.
22206  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22207  if test "x$test_shortpath" = x; then
22208    # Short path failed, file does not exist as specified.
22209    # Try adding .exe or .cmd
22210    if test -f "${new_path}.exe"; then
22211       input_to_shortpath="${new_path}.exe"
22212    elif test -f "${new_path}.cmd"; then
22213       input_to_shortpath="${new_path}.cmd"
22214    else
22215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22216$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22217      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22218$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22219      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22220    fi
22221  else
22222    input_to_shortpath="$new_path"
22223  fi
22224
22225  # Call helper function which possibly converts this using DOS-style short mode.
22226  # If so, the updated path is stored in $new_path.
22227  new_path="$input_to_shortpath"
22228
22229  input_path="$input_to_shortpath"
22230  # Check if we need to convert this using DOS-style short mode. If the path
22231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22232  # take no chances and rewrite it.
22233  # Note: m4 eats our [], so we need to use [ and ] instead.
22234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22235  if test "x$has_forbidden_chars" != x; then
22236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22240      # Going to short mode and back again did indeed matter. Since short mode is
22241      # case insensitive, let's make it lowercase to improve readability.
22242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22243      # Now convert it back to Unix-stile (cygpath)
22244      input_path=`$CYGPATH -u "$shortmode_path"`
22245      new_path="$input_path"
22246    fi
22247  fi
22248
22249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22250  if test "x$test_cygdrive_prefix" = x; then
22251    # As a simple fix, exclude /usr/bin since it's not a real path.
22252    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22254      # a path prefixed by /cygdrive for fixpath to work.
22255      new_path="$CYGWIN_ROOT_PATH$input_path"
22256    fi
22257  fi
22258
22259  # remove trailing .exe if any
22260  new_path="${new_path/%.exe/}"
22261
22262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22263
22264  # First separate the path from the arguments. This will split at the first
22265  # space.
22266  complete="$AR"
22267  path="${complete%% *}"
22268  tmp="$complete EOL"
22269  arguments="${tmp#* }"
22270
22271  # Input might be given as Windows format, start by converting to
22272  # unix format.
22273  new_path="$path"
22274
22275  windows_path="$new_path"
22276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22277    unix_path=`$CYGPATH -u "$windows_path"`
22278    new_path="$unix_path"
22279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22281    new_path="$unix_path"
22282  fi
22283
22284
22285  # Now try to locate executable using which
22286  new_path=`$WHICH "$new_path" 2> /dev/null`
22287
22288  if test "x$new_path" = x; then
22289    # Oops. Which didn't find the executable.
22290    # The splitting of arguments from the executable at a space might have been incorrect,
22291    # since paths with space are more likely in Windows. Give it another try with the whole
22292    # argument.
22293    path="$complete"
22294    arguments="EOL"
22295    new_path="$path"
22296
22297  windows_path="$new_path"
22298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22299    unix_path=`$CYGPATH -u "$windows_path"`
22300    new_path="$unix_path"
22301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22303    new_path="$unix_path"
22304  fi
22305
22306
22307    new_path=`$WHICH "$new_path" 2> /dev/null`
22308
22309    if test "x$new_path" = x; then
22310      # It's still not found. Now this is an unrecoverable error.
22311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22312$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22313      has_space=`$ECHO "$complete" | $GREP " "`
22314      if test "x$has_space" != x; then
22315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22317      fi
22318      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22319    fi
22320  fi
22321
22322  # Now new_path has a complete unix path to the binary
22323  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22324    # Keep paths in /bin as-is, but remove trailing .exe if any
22325    new_path="${new_path/%.exe/}"
22326    # Do not save /bin paths to all_fixpath_prefixes!
22327  else
22328    # Not in mixed or Windows style, start by that.
22329    new_path=`cmd //c echo $new_path`
22330
22331  input_path="$new_path"
22332  # Check if we need to convert this using DOS-style short mode. If the path
22333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22334  # take no chances and rewrite it.
22335  # Note: m4 eats our [], so we need to use [ and ] instead.
22336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22337  if test "x$has_forbidden_chars" != x; then
22338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22339    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22340  fi
22341
22342    # Output is in $new_path
22343
22344  windows_path="$new_path"
22345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22346    unix_path=`$CYGPATH -u "$windows_path"`
22347    new_path="$unix_path"
22348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22350    new_path="$unix_path"
22351  fi
22352
22353    # remove trailing .exe if any
22354    new_path="${new_path/%.exe/}"
22355
22356    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22357    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22358  fi
22359
22360  else
22361    # We're on a posix platform. Hooray! :)
22362    # First separate the path from the arguments. This will split at the first
22363    # space.
22364    complete="$AR"
22365    path="${complete%% *}"
22366    tmp="$complete EOL"
22367    arguments="${tmp#* }"
22368
22369    # Cannot rely on the command "which" here since it doesn't always work.
22370    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22371    if test -z "$is_absolute_path"; then
22372      # Path to executable is not absolute. Find it.
22373      IFS_save="$IFS"
22374      IFS=:
22375      for p in $PATH; do
22376        if test -f "$p/$path" && test -x "$p/$path"; then
22377          new_path="$p/$path"
22378          break
22379        fi
22380      done
22381      IFS="$IFS_save"
22382    else
22383      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22384$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22385      new_path="$path"
22386    fi
22387
22388    if test "x$new_path" = x; then
22389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22390$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22391        has_space=`$ECHO "$complete" | $GREP " "`
22392        if test "x$has_space" != x; then
22393          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22394$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22395        fi
22396        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22397      fi
22398  fi
22399
22400      # Now join together the path and the arguments once again
22401      if test "x$arguments" != xEOL; then
22402        new_complete="$new_path ${arguments% *}"
22403      else
22404        new_complete="$new_path"
22405      fi
22406
22407  if test "x$complete" != "x$new_complete"; then
22408      AR="$new_complete"
22409      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22410$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22411    fi
22412
22413fi
22414if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22415    ARFLAGS="-r"
22416else
22417    ARFLAGS=""
22418fi
22419
22420
22421# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22422HOTSPOT_CXX="$CXX"
22423HOTSPOT_LD="$LD"
22424
22425
22426
22427COMPILER_NAME=gcc
22428COMPILER_TYPE=CC
22429if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22430
22431    # For now, assume that we are always compiling using cl.exe.
22432    CC_OUT_OPTION=-Fo
22433    EXE_OUT_OPTION=-out:
22434    LD_OUT_OPTION=-out:
22435    AR_OUT_OPTION=-out:
22436    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22437    # program for something completely different.
22438    # Extract the first word of "link", so it can be a program name with args.
22439set dummy link; ac_word=$2
22440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22441$as_echo_n "checking for $ac_word... " >&6; }
22442if test "${ac_cv_prog_WINLD+set}" = set; then :
22443  $as_echo_n "(cached) " >&6
22444else
22445  if test -n "$WINLD"; then
22446  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22447else
22448  ac_prog_rejected=no
22449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22450for as_dir in $PATH
22451do
22452  IFS=$as_save_IFS
22453  test -z "$as_dir" && as_dir=.
22454    for ac_exec_ext in '' $ac_executable_extensions; do
22455  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22456    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22457       ac_prog_rejected=yes
22458       continue
22459     fi
22460    ac_cv_prog_WINLD="link"
22461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22462    break 2
22463  fi
22464done
22465  done
22466IFS=$as_save_IFS
22467
22468if test $ac_prog_rejected = yes; then
22469  # We found a bogon in the path, so make sure we never use it.
22470  set dummy $ac_cv_prog_WINLD
22471  shift
22472  if test $# != 0; then
22473    # We chose a different compiler from the bogus one.
22474    # However, it has the same basename, so the bogon will be chosen
22475    # first if we set WINLD to just the basename; use the full file name.
22476    shift
22477    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22478  fi
22479fi
22480fi
22481fi
22482WINLD=$ac_cv_prog_WINLD
22483if test -n "$WINLD"; then
22484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22485$as_echo "$WINLD" >&6; }
22486else
22487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22488$as_echo "no" >&6; }
22489fi
22490
22491
22492    # Since we must ignore the first found link, WINLD will contain
22493    # the full path to the link.exe program.
22494
22495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22496
22497  # First separate the path from the arguments. This will split at the first
22498  # space.
22499  complete="$WINLD"
22500  path="${complete%% *}"
22501  tmp="$complete EOL"
22502  arguments="${tmp#* }"
22503
22504  # Input might be given as Windows format, start by converting to
22505  # unix format.
22506  new_path=`$CYGPATH -u "$path"`
22507
22508  # Now try to locate executable using which
22509  new_path=`$WHICH "$new_path" 2> /dev/null`
22510  # bat and cmd files are not always considered executable in cygwin causing which
22511  # to not find them
22512  if test "x$new_path" = x \
22513           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22514           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22515    new_path=`$CYGPATH -u "$path"`
22516  fi
22517  if test "x$new_path" = x; then
22518    # Oops. Which didn't find the executable.
22519    # The splitting of arguments from the executable at a space might have been incorrect,
22520    # since paths with space are more likely in Windows. Give it another try with the whole
22521    # argument.
22522    path="$complete"
22523    arguments="EOL"
22524    new_path=`$CYGPATH -u "$path"`
22525    new_path=`$WHICH "$new_path" 2> /dev/null`
22526    # bat and cmd files are not always considered executable in cygwin causing which
22527    # to not find them
22528    if test "x$new_path" = x \
22529             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22530             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22531      new_path=`$CYGPATH -u "$path"`
22532    fi
22533    if test "x$new_path" = x; then
22534      # It's still not found. Now this is an unrecoverable error.
22535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22536$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22537      has_space=`$ECHO "$complete" | $GREP " "`
22538      if test "x$has_space" != x; then
22539        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22540$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22541      fi
22542      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22543    fi
22544  fi
22545
22546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22549  # "foo.exe" is OK but "foo" is an error.
22550  #
22551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22552  # It is also a way to make sure we got the proper file name for the real test later on.
22553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22554  if test "x$test_shortpath" = x; then
22555    # Short path failed, file does not exist as specified.
22556    # Try adding .exe or .cmd
22557    if test -f "${new_path}.exe"; then
22558       input_to_shortpath="${new_path}.exe"
22559    elif test -f "${new_path}.cmd"; then
22560       input_to_shortpath="${new_path}.cmd"
22561    else
22562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22563$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22564      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22565$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22566      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22567    fi
22568  else
22569    input_to_shortpath="$new_path"
22570  fi
22571
22572  # Call helper function which possibly converts this using DOS-style short mode.
22573  # If so, the updated path is stored in $new_path.
22574  new_path="$input_to_shortpath"
22575
22576  input_path="$input_to_shortpath"
22577  # Check if we need to convert this using DOS-style short mode. If the path
22578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22579  # take no chances and rewrite it.
22580  # Note: m4 eats our [], so we need to use [ and ] instead.
22581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22582  if test "x$has_forbidden_chars" != x; then
22583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22587      # Going to short mode and back again did indeed matter. Since short mode is
22588      # case insensitive, let's make it lowercase to improve readability.
22589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22590      # Now convert it back to Unix-stile (cygpath)
22591      input_path=`$CYGPATH -u "$shortmode_path"`
22592      new_path="$input_path"
22593    fi
22594  fi
22595
22596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22597  if test "x$test_cygdrive_prefix" = x; then
22598    # As a simple fix, exclude /usr/bin since it's not a real path.
22599    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22601      # a path prefixed by /cygdrive for fixpath to work.
22602      new_path="$CYGWIN_ROOT_PATH$input_path"
22603    fi
22604  fi
22605
22606  # remove trailing .exe if any
22607  new_path="${new_path/%.exe/}"
22608
22609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22610
22611  # First separate the path from the arguments. This will split at the first
22612  # space.
22613  complete="$WINLD"
22614  path="${complete%% *}"
22615  tmp="$complete EOL"
22616  arguments="${tmp#* }"
22617
22618  # Input might be given as Windows format, start by converting to
22619  # unix format.
22620  new_path="$path"
22621
22622  windows_path="$new_path"
22623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22624    unix_path=`$CYGPATH -u "$windows_path"`
22625    new_path="$unix_path"
22626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22628    new_path="$unix_path"
22629  fi
22630
22631
22632  # Now try to locate executable using which
22633  new_path=`$WHICH "$new_path" 2> /dev/null`
22634
22635  if test "x$new_path" = x; then
22636    # Oops. Which didn't find the executable.
22637    # The splitting of arguments from the executable at a space might have been incorrect,
22638    # since paths with space are more likely in Windows. Give it another try with the whole
22639    # argument.
22640    path="$complete"
22641    arguments="EOL"
22642    new_path="$path"
22643
22644  windows_path="$new_path"
22645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22646    unix_path=`$CYGPATH -u "$windows_path"`
22647    new_path="$unix_path"
22648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22650    new_path="$unix_path"
22651  fi
22652
22653
22654    new_path=`$WHICH "$new_path" 2> /dev/null`
22655
22656    if test "x$new_path" = x; then
22657      # It's still not found. Now this is an unrecoverable error.
22658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22659$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22660      has_space=`$ECHO "$complete" | $GREP " "`
22661      if test "x$has_space" != x; then
22662        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22663$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22664      fi
22665      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22666    fi
22667  fi
22668
22669  # Now new_path has a complete unix path to the binary
22670  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22671    # Keep paths in /bin as-is, but remove trailing .exe if any
22672    new_path="${new_path/%.exe/}"
22673    # Do not save /bin paths to all_fixpath_prefixes!
22674  else
22675    # Not in mixed or Windows style, start by that.
22676    new_path=`cmd //c echo $new_path`
22677
22678  input_path="$new_path"
22679  # Check if we need to convert this using DOS-style short mode. If the path
22680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22681  # take no chances and rewrite it.
22682  # Note: m4 eats our [], so we need to use [ and ] instead.
22683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22684  if test "x$has_forbidden_chars" != x; then
22685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22687  fi
22688
22689    # Output is in $new_path
22690
22691  windows_path="$new_path"
22692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22693    unix_path=`$CYGPATH -u "$windows_path"`
22694    new_path="$unix_path"
22695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22697    new_path="$unix_path"
22698  fi
22699
22700    # remove trailing .exe if any
22701    new_path="${new_path/%.exe/}"
22702
22703    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22704    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22705  fi
22706
22707  else
22708    # We're on a posix platform. Hooray! :)
22709    # First separate the path from the arguments. This will split at the first
22710    # space.
22711    complete="$WINLD"
22712    path="${complete%% *}"
22713    tmp="$complete EOL"
22714    arguments="${tmp#* }"
22715
22716    # Cannot rely on the command "which" here since it doesn't always work.
22717    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22718    if test -z "$is_absolute_path"; then
22719      # Path to executable is not absolute. Find it.
22720      IFS_save="$IFS"
22721      IFS=:
22722      for p in $PATH; do
22723        if test -f "$p/$path" && test -x "$p/$path"; then
22724          new_path="$p/$path"
22725          break
22726        fi
22727      done
22728      IFS="$IFS_save"
22729    else
22730      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22731$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22732      new_path="$path"
22733    fi
22734
22735    if test "x$new_path" = x; then
22736        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22737$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22738        has_space=`$ECHO "$complete" | $GREP " "`
22739        if test "x$has_space" != x; then
22740          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22741$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22742        fi
22743        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22744      fi
22745  fi
22746
22747      # Now join together the path and the arguments once again
22748      if test "x$arguments" != xEOL; then
22749        new_complete="$new_path ${arguments% *}"
22750      else
22751        new_complete="$new_path"
22752      fi
22753
22754  if test "x$complete" != "x$new_complete"; then
22755      WINLD="$new_complete"
22756      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22757$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22758    fi
22759
22760    printf "Windows linker was found at $WINLD\n"
22761    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22762$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22763    "$WINLD" --version > /dev/null
22764    if test $? -eq 0 ; then
22765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22766$as_echo "no" >&6; }
22767      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22768    else
22769      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22770$as_echo "yes" >&6; }
22771    fi
22772    LD="$WINLD"
22773    LDEXE="$WINLD"
22774    LDCXX="$WINLD"
22775    LDEXECXX="$WINLD"
22776
22777    # Extract the first word of "mt", so it can be a program name with args.
22778set dummy mt; ac_word=$2
22779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22780$as_echo_n "checking for $ac_word... " >&6; }
22781if test "${ac_cv_prog_MT+set}" = set; then :
22782  $as_echo_n "(cached) " >&6
22783else
22784  if test -n "$MT"; then
22785  ac_cv_prog_MT="$MT" # Let the user override the test.
22786else
22787  ac_prog_rejected=no
22788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22789for as_dir in $PATH
22790do
22791  IFS=$as_save_IFS
22792  test -z "$as_dir" && as_dir=.
22793    for ac_exec_ext in '' $ac_executable_extensions; do
22794  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22795    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22796       ac_prog_rejected=yes
22797       continue
22798     fi
22799    ac_cv_prog_MT="mt"
22800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22801    break 2
22802  fi
22803done
22804  done
22805IFS=$as_save_IFS
22806
22807if test $ac_prog_rejected = yes; then
22808  # We found a bogon in the path, so make sure we never use it.
22809  set dummy $ac_cv_prog_MT
22810  shift
22811  if test $# != 0; then
22812    # We chose a different compiler from the bogus one.
22813    # However, it has the same basename, so the bogon will be chosen
22814    # first if we set MT to just the basename; use the full file name.
22815    shift
22816    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22817  fi
22818fi
22819fi
22820fi
22821MT=$ac_cv_prog_MT
22822if test -n "$MT"; then
22823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22824$as_echo "$MT" >&6; }
22825else
22826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22827$as_echo "no" >&6; }
22828fi
22829
22830
22831
22832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22833
22834  # First separate the path from the arguments. This will split at the first
22835  # space.
22836  complete="$MT"
22837  path="${complete%% *}"
22838  tmp="$complete EOL"
22839  arguments="${tmp#* }"
22840
22841  # Input might be given as Windows format, start by converting to
22842  # unix format.
22843  new_path=`$CYGPATH -u "$path"`
22844
22845  # Now try to locate executable using which
22846  new_path=`$WHICH "$new_path" 2> /dev/null`
22847  # bat and cmd files are not always considered executable in cygwin causing which
22848  # to not find them
22849  if test "x$new_path" = x \
22850           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22851           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22852    new_path=`$CYGPATH -u "$path"`
22853  fi
22854  if test "x$new_path" = x; then
22855    # Oops. Which didn't find the executable.
22856    # The splitting of arguments from the executable at a space might have been incorrect,
22857    # since paths with space are more likely in Windows. Give it another try with the whole
22858    # argument.
22859    path="$complete"
22860    arguments="EOL"
22861    new_path=`$CYGPATH -u "$path"`
22862    new_path=`$WHICH "$new_path" 2> /dev/null`
22863    # bat and cmd files are not always considered executable in cygwin causing which
22864    # to not find them
22865    if test "x$new_path" = x \
22866             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22867             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22868      new_path=`$CYGPATH -u "$path"`
22869    fi
22870    if test "x$new_path" = x; then
22871      # It's still not found. Now this is an unrecoverable error.
22872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22873$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22874      has_space=`$ECHO "$complete" | $GREP " "`
22875      if test "x$has_space" != x; then
22876        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22877$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22878      fi
22879      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22880    fi
22881  fi
22882
22883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22886  # "foo.exe" is OK but "foo" is an error.
22887  #
22888  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22889  # It is also a way to make sure we got the proper file name for the real test later on.
22890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22891  if test "x$test_shortpath" = x; then
22892    # Short path failed, file does not exist as specified.
22893    # Try adding .exe or .cmd
22894    if test -f "${new_path}.exe"; then
22895       input_to_shortpath="${new_path}.exe"
22896    elif test -f "${new_path}.cmd"; then
22897       input_to_shortpath="${new_path}.cmd"
22898    else
22899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22900$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22901      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22902$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22903      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22904    fi
22905  else
22906    input_to_shortpath="$new_path"
22907  fi
22908
22909  # Call helper function which possibly converts this using DOS-style short mode.
22910  # If so, the updated path is stored in $new_path.
22911  new_path="$input_to_shortpath"
22912
22913  input_path="$input_to_shortpath"
22914  # Check if we need to convert this using DOS-style short mode. If the path
22915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22916  # take no chances and rewrite it.
22917  # Note: m4 eats our [], so we need to use [ and ] instead.
22918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22919  if test "x$has_forbidden_chars" != x; then
22920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22924      # Going to short mode and back again did indeed matter. Since short mode is
22925      # case insensitive, let's make it lowercase to improve readability.
22926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22927      # Now convert it back to Unix-stile (cygpath)
22928      input_path=`$CYGPATH -u "$shortmode_path"`
22929      new_path="$input_path"
22930    fi
22931  fi
22932
22933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22934  if test "x$test_cygdrive_prefix" = x; then
22935    # As a simple fix, exclude /usr/bin since it's not a real path.
22936    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22938      # a path prefixed by /cygdrive for fixpath to work.
22939      new_path="$CYGWIN_ROOT_PATH$input_path"
22940    fi
22941  fi
22942
22943  # remove trailing .exe if any
22944  new_path="${new_path/%.exe/}"
22945
22946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22947
22948  # First separate the path from the arguments. This will split at the first
22949  # space.
22950  complete="$MT"
22951  path="${complete%% *}"
22952  tmp="$complete EOL"
22953  arguments="${tmp#* }"
22954
22955  # Input might be given as Windows format, start by converting to
22956  # unix format.
22957  new_path="$path"
22958
22959  windows_path="$new_path"
22960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22961    unix_path=`$CYGPATH -u "$windows_path"`
22962    new_path="$unix_path"
22963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22965    new_path="$unix_path"
22966  fi
22967
22968
22969  # Now try to locate executable using which
22970  new_path=`$WHICH "$new_path" 2> /dev/null`
22971
22972  if test "x$new_path" = x; then
22973    # Oops. Which didn't find the executable.
22974    # The splitting of arguments from the executable at a space might have been incorrect,
22975    # since paths with space are more likely in Windows. Give it another try with the whole
22976    # argument.
22977    path="$complete"
22978    arguments="EOL"
22979    new_path="$path"
22980
22981  windows_path="$new_path"
22982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22983    unix_path=`$CYGPATH -u "$windows_path"`
22984    new_path="$unix_path"
22985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22987    new_path="$unix_path"
22988  fi
22989
22990
22991    new_path=`$WHICH "$new_path" 2> /dev/null`
22992
22993    if test "x$new_path" = x; then
22994      # It's still not found. Now this is an unrecoverable error.
22995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22996$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22997      has_space=`$ECHO "$complete" | $GREP " "`
22998      if test "x$has_space" != x; then
22999        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23000$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23001      fi
23002      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23003    fi
23004  fi
23005
23006  # Now new_path has a complete unix path to the binary
23007  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23008    # Keep paths in /bin as-is, but remove trailing .exe if any
23009    new_path="${new_path/%.exe/}"
23010    # Do not save /bin paths to all_fixpath_prefixes!
23011  else
23012    # Not in mixed or Windows style, start by that.
23013    new_path=`cmd //c echo $new_path`
23014
23015  input_path="$new_path"
23016  # Check if we need to convert this using DOS-style short mode. If the path
23017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23018  # take no chances and rewrite it.
23019  # Note: m4 eats our [], so we need to use [ and ] instead.
23020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23021  if test "x$has_forbidden_chars" != x; then
23022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23023    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23024  fi
23025
23026    # Output is in $new_path
23027
23028  windows_path="$new_path"
23029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23030    unix_path=`$CYGPATH -u "$windows_path"`
23031    new_path="$unix_path"
23032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23034    new_path="$unix_path"
23035  fi
23036
23037    # remove trailing .exe if any
23038    new_path="${new_path/%.exe/}"
23039
23040    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23041    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23042  fi
23043
23044  else
23045    # We're on a posix platform. Hooray! :)
23046    # First separate the path from the arguments. This will split at the first
23047    # space.
23048    complete="$MT"
23049    path="${complete%% *}"
23050    tmp="$complete EOL"
23051    arguments="${tmp#* }"
23052
23053    # Cannot rely on the command "which" here since it doesn't always work.
23054    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23055    if test -z "$is_absolute_path"; then
23056      # Path to executable is not absolute. Find it.
23057      IFS_save="$IFS"
23058      IFS=:
23059      for p in $PATH; do
23060        if test -f "$p/$path" && test -x "$p/$path"; then
23061          new_path="$p/$path"
23062          break
23063        fi
23064      done
23065      IFS="$IFS_save"
23066    else
23067      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23068$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23069      new_path="$path"
23070    fi
23071
23072    if test "x$new_path" = x; then
23073        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23074$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23075        has_space=`$ECHO "$complete" | $GREP " "`
23076        if test "x$has_space" != x; then
23077          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23078$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23079        fi
23080        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23081      fi
23082  fi
23083
23084      # Now join together the path and the arguments once again
23085      if test "x$arguments" != xEOL; then
23086        new_complete="$new_path ${arguments% *}"
23087      else
23088        new_complete="$new_path"
23089      fi
23090
23091  if test "x$complete" != "x$new_complete"; then
23092      MT="$new_complete"
23093      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23094$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23095    fi
23096
23097    # The resource compiler
23098    # Extract the first word of "rc", so it can be a program name with args.
23099set dummy rc; ac_word=$2
23100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23101$as_echo_n "checking for $ac_word... " >&6; }
23102if test "${ac_cv_prog_RC+set}" = set; then :
23103  $as_echo_n "(cached) " >&6
23104else
23105  if test -n "$RC"; then
23106  ac_cv_prog_RC="$RC" # Let the user override the test.
23107else
23108  ac_prog_rejected=no
23109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23110for as_dir in $PATH
23111do
23112  IFS=$as_save_IFS
23113  test -z "$as_dir" && as_dir=.
23114    for ac_exec_ext in '' $ac_executable_extensions; do
23115  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23116    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23117       ac_prog_rejected=yes
23118       continue
23119     fi
23120    ac_cv_prog_RC="rc"
23121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23122    break 2
23123  fi
23124done
23125  done
23126IFS=$as_save_IFS
23127
23128if test $ac_prog_rejected = yes; then
23129  # We found a bogon in the path, so make sure we never use it.
23130  set dummy $ac_cv_prog_RC
23131  shift
23132  if test $# != 0; then
23133    # We chose a different compiler from the bogus one.
23134    # However, it has the same basename, so the bogon will be chosen
23135    # first if we set RC to just the basename; use the full file name.
23136    shift
23137    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23138  fi
23139fi
23140fi
23141fi
23142RC=$ac_cv_prog_RC
23143if test -n "$RC"; then
23144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23145$as_echo "$RC" >&6; }
23146else
23147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23148$as_echo "no" >&6; }
23149fi
23150
23151
23152
23153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23154
23155  # First separate the path from the arguments. This will split at the first
23156  # space.
23157  complete="$RC"
23158  path="${complete%% *}"
23159  tmp="$complete EOL"
23160  arguments="${tmp#* }"
23161
23162  # Input might be given as Windows format, start by converting to
23163  # unix format.
23164  new_path=`$CYGPATH -u "$path"`
23165
23166  # Now try to locate executable using which
23167  new_path=`$WHICH "$new_path" 2> /dev/null`
23168  # bat and cmd files are not always considered executable in cygwin causing which
23169  # to not find them
23170  if test "x$new_path" = x \
23171           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23172           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23173    new_path=`$CYGPATH -u "$path"`
23174  fi
23175  if test "x$new_path" = x; then
23176    # Oops. Which didn't find the executable.
23177    # The splitting of arguments from the executable at a space might have been incorrect,
23178    # since paths with space are more likely in Windows. Give it another try with the whole
23179    # argument.
23180    path="$complete"
23181    arguments="EOL"
23182    new_path=`$CYGPATH -u "$path"`
23183    new_path=`$WHICH "$new_path" 2> /dev/null`
23184    # bat and cmd files are not always considered executable in cygwin causing which
23185    # to not find them
23186    if test "x$new_path" = x \
23187             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23188             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23189      new_path=`$CYGPATH -u "$path"`
23190    fi
23191    if test "x$new_path" = x; then
23192      # It's still not found. Now this is an unrecoverable error.
23193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23194$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23195      has_space=`$ECHO "$complete" | $GREP " "`
23196      if test "x$has_space" != x; then
23197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23199      fi
23200      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23201    fi
23202  fi
23203
23204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23207  # "foo.exe" is OK but "foo" is an error.
23208  #
23209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23210  # It is also a way to make sure we got the proper file name for the real test later on.
23211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23212  if test "x$test_shortpath" = x; then
23213    # Short path failed, file does not exist as specified.
23214    # Try adding .exe or .cmd
23215    if test -f "${new_path}.exe"; then
23216       input_to_shortpath="${new_path}.exe"
23217    elif test -f "${new_path}.cmd"; then
23218       input_to_shortpath="${new_path}.cmd"
23219    else
23220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23221$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23222      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23223$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23224      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23225    fi
23226  else
23227    input_to_shortpath="$new_path"
23228  fi
23229
23230  # Call helper function which possibly converts this using DOS-style short mode.
23231  # If so, the updated path is stored in $new_path.
23232  new_path="$input_to_shortpath"
23233
23234  input_path="$input_to_shortpath"
23235  # Check if we need to convert this using DOS-style short mode. If the path
23236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23237  # take no chances and rewrite it.
23238  # Note: m4 eats our [], so we need to use [ and ] instead.
23239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23240  if test "x$has_forbidden_chars" != x; then
23241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23245      # Going to short mode and back again did indeed matter. Since short mode is
23246      # case insensitive, let's make it lowercase to improve readability.
23247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23248      # Now convert it back to Unix-stile (cygpath)
23249      input_path=`$CYGPATH -u "$shortmode_path"`
23250      new_path="$input_path"
23251    fi
23252  fi
23253
23254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23255  if test "x$test_cygdrive_prefix" = x; then
23256    # As a simple fix, exclude /usr/bin since it's not a real path.
23257    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23259      # a path prefixed by /cygdrive for fixpath to work.
23260      new_path="$CYGWIN_ROOT_PATH$input_path"
23261    fi
23262  fi
23263
23264  # remove trailing .exe if any
23265  new_path="${new_path/%.exe/}"
23266
23267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23268
23269  # First separate the path from the arguments. This will split at the first
23270  # space.
23271  complete="$RC"
23272  path="${complete%% *}"
23273  tmp="$complete EOL"
23274  arguments="${tmp#* }"
23275
23276  # Input might be given as Windows format, start by converting to
23277  # unix format.
23278  new_path="$path"
23279
23280  windows_path="$new_path"
23281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23282    unix_path=`$CYGPATH -u "$windows_path"`
23283    new_path="$unix_path"
23284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23286    new_path="$unix_path"
23287  fi
23288
23289
23290  # Now try to locate executable using which
23291  new_path=`$WHICH "$new_path" 2> /dev/null`
23292
23293  if test "x$new_path" = x; then
23294    # Oops. Which didn't find the executable.
23295    # The splitting of arguments from the executable at a space might have been incorrect,
23296    # since paths with space are more likely in Windows. Give it another try with the whole
23297    # argument.
23298    path="$complete"
23299    arguments="EOL"
23300    new_path="$path"
23301
23302  windows_path="$new_path"
23303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23304    unix_path=`$CYGPATH -u "$windows_path"`
23305    new_path="$unix_path"
23306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23308    new_path="$unix_path"
23309  fi
23310
23311
23312    new_path=`$WHICH "$new_path" 2> /dev/null`
23313
23314    if test "x$new_path" = x; then
23315      # It's still not found. Now this is an unrecoverable error.
23316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23317$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23318      has_space=`$ECHO "$complete" | $GREP " "`
23319      if test "x$has_space" != x; then
23320        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23321$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23322      fi
23323      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23324    fi
23325  fi
23326
23327  # Now new_path has a complete unix path to the binary
23328  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23329    # Keep paths in /bin as-is, but remove trailing .exe if any
23330    new_path="${new_path/%.exe/}"
23331    # Do not save /bin paths to all_fixpath_prefixes!
23332  else
23333    # Not in mixed or Windows style, start by that.
23334    new_path=`cmd //c echo $new_path`
23335
23336  input_path="$new_path"
23337  # Check if we need to convert this using DOS-style short mode. If the path
23338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23339  # take no chances and rewrite it.
23340  # Note: m4 eats our [], so we need to use [ and ] instead.
23341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23342  if test "x$has_forbidden_chars" != x; then
23343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23345  fi
23346
23347    # Output is in $new_path
23348
23349  windows_path="$new_path"
23350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23351    unix_path=`$CYGPATH -u "$windows_path"`
23352    new_path="$unix_path"
23353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23355    new_path="$unix_path"
23356  fi
23357
23358    # remove trailing .exe if any
23359    new_path="${new_path/%.exe/}"
23360
23361    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23362    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23363  fi
23364
23365  else
23366    # We're on a posix platform. Hooray! :)
23367    # First separate the path from the arguments. This will split at the first
23368    # space.
23369    complete="$RC"
23370    path="${complete%% *}"
23371    tmp="$complete EOL"
23372    arguments="${tmp#* }"
23373
23374    # Cannot rely on the command "which" here since it doesn't always work.
23375    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23376    if test -z "$is_absolute_path"; then
23377      # Path to executable is not absolute. Find it.
23378      IFS_save="$IFS"
23379      IFS=:
23380      for p in $PATH; do
23381        if test -f "$p/$path" && test -x "$p/$path"; then
23382          new_path="$p/$path"
23383          break
23384        fi
23385      done
23386      IFS="$IFS_save"
23387    else
23388      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23389$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23390      new_path="$path"
23391    fi
23392
23393    if test "x$new_path" = x; then
23394        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23395$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23396        has_space=`$ECHO "$complete" | $GREP " "`
23397        if test "x$has_space" != x; then
23398          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23399$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23400        fi
23401        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23402      fi
23403  fi
23404
23405      # Now join together the path and the arguments once again
23406      if test "x$arguments" != xEOL; then
23407        new_complete="$new_path ${arguments% *}"
23408      else
23409        new_complete="$new_path"
23410      fi
23411
23412  if test "x$complete" != "x$new_complete"; then
23413      RC="$new_complete"
23414      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23415$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23416    fi
23417
23418
23419    # For hotspot, we need these in Windows mixed path,
23420    # so rewrite them all. Need added .exe suffix.
23421    HOTSPOT_CXX="$CXX.exe"
23422    HOTSPOT_LD="$LD.exe"
23423    HOTSPOT_MT="$MT.exe"
23424    HOTSPOT_RC="$RC.exe"
23425
23426  unix_path="$HOTSPOT_CXX"
23427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23428    windows_path=`$CYGPATH -m "$unix_path"`
23429    HOTSPOT_CXX="$windows_path"
23430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23431    windows_path=`cmd //c echo $unix_path`
23432    HOTSPOT_CXX="$windows_path"
23433  fi
23434
23435
23436  unix_path="$HOTSPOT_LD"
23437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23438    windows_path=`$CYGPATH -m "$unix_path"`
23439    HOTSPOT_LD="$windows_path"
23440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23441    windows_path=`cmd //c echo $unix_path`
23442    HOTSPOT_LD="$windows_path"
23443  fi
23444
23445
23446  unix_path="$HOTSPOT_MT"
23447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23448    windows_path=`$CYGPATH -m "$unix_path"`
23449    HOTSPOT_MT="$windows_path"
23450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23451    windows_path=`cmd //c echo $unix_path`
23452    HOTSPOT_MT="$windows_path"
23453  fi
23454
23455
23456  unix_path="$HOTSPOT_RC"
23457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23458    windows_path=`$CYGPATH -m "$unix_path"`
23459    HOTSPOT_RC="$windows_path"
23460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23461    windows_path=`cmd //c echo $unix_path`
23462    HOTSPOT_RC="$windows_path"
23463  fi
23464
23465
23466
23467
23468    RC_FLAGS="-nologo -l 0x409 -r"
23469    if test "x$VARIANT" = xOPT; then :
23470
23471        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23472
23473fi
23474    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23475    if test "x$JDK_UPDATE_VERSION" = x; then :
23476
23477        JDK_UPDATE_VERSION_NOTNULL=0
23478
23479fi
23480    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23481    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23482    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23483    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23484    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23485    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23486    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23487
23488    # lib.exe is used to create static libraries.
23489    # Extract the first word of "lib", so it can be a program name with args.
23490set dummy lib; ac_word=$2
23491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23492$as_echo_n "checking for $ac_word... " >&6; }
23493if test "${ac_cv_prog_WINAR+set}" = set; then :
23494  $as_echo_n "(cached) " >&6
23495else
23496  if test -n "$WINAR"; then
23497  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23498else
23499as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23500for as_dir in $PATH
23501do
23502  IFS=$as_save_IFS
23503  test -z "$as_dir" && as_dir=.
23504    for ac_exec_ext in '' $ac_executable_extensions; do
23505  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23506    ac_cv_prog_WINAR="lib"
23507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23508    break 2
23509  fi
23510done
23511  done
23512IFS=$as_save_IFS
23513
23514fi
23515fi
23516WINAR=$ac_cv_prog_WINAR
23517if test -n "$WINAR"; then
23518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23519$as_echo "$WINAR" >&6; }
23520else
23521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23522$as_echo "no" >&6; }
23523fi
23524
23525
23526
23527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23528
23529  # First separate the path from the arguments. This will split at the first
23530  # space.
23531  complete="$WINAR"
23532  path="${complete%% *}"
23533  tmp="$complete EOL"
23534  arguments="${tmp#* }"
23535
23536  # Input might be given as Windows format, start by converting to
23537  # unix format.
23538  new_path=`$CYGPATH -u "$path"`
23539
23540  # Now try to locate executable using which
23541  new_path=`$WHICH "$new_path" 2> /dev/null`
23542  # bat and cmd files are not always considered executable in cygwin causing which
23543  # to not find them
23544  if test "x$new_path" = x \
23545           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23546           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23547    new_path=`$CYGPATH -u "$path"`
23548  fi
23549  if test "x$new_path" = x; then
23550    # Oops. Which didn't find the executable.
23551    # The splitting of arguments from the executable at a space might have been incorrect,
23552    # since paths with space are more likely in Windows. Give it another try with the whole
23553    # argument.
23554    path="$complete"
23555    arguments="EOL"
23556    new_path=`$CYGPATH -u "$path"`
23557    new_path=`$WHICH "$new_path" 2> /dev/null`
23558    # bat and cmd files are not always considered executable in cygwin causing which
23559    # to not find them
23560    if test "x$new_path" = x \
23561             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23562             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23563      new_path=`$CYGPATH -u "$path"`
23564    fi
23565    if test "x$new_path" = x; then
23566      # It's still not found. Now this is an unrecoverable error.
23567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23568$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23569      has_space=`$ECHO "$complete" | $GREP " "`
23570      if test "x$has_space" != x; then
23571        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23572$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23573      fi
23574      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23575    fi
23576  fi
23577
23578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23581  # "foo.exe" is OK but "foo" is an error.
23582  #
23583  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23584  # It is also a way to make sure we got the proper file name for the real test later on.
23585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23586  if test "x$test_shortpath" = x; then
23587    # Short path failed, file does not exist as specified.
23588    # Try adding .exe or .cmd
23589    if test -f "${new_path}.exe"; then
23590       input_to_shortpath="${new_path}.exe"
23591    elif test -f "${new_path}.cmd"; then
23592       input_to_shortpath="${new_path}.cmd"
23593    else
23594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23595$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23596      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23597$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23598      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23599    fi
23600  else
23601    input_to_shortpath="$new_path"
23602  fi
23603
23604  # Call helper function which possibly converts this using DOS-style short mode.
23605  # If so, the updated path is stored in $new_path.
23606  new_path="$input_to_shortpath"
23607
23608  input_path="$input_to_shortpath"
23609  # Check if we need to convert this using DOS-style short mode. If the path
23610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23611  # take no chances and rewrite it.
23612  # Note: m4 eats our [], so we need to use [ and ] instead.
23613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23614  if test "x$has_forbidden_chars" != x; then
23615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23619      # Going to short mode and back again did indeed matter. Since short mode is
23620      # case insensitive, let's make it lowercase to improve readability.
23621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23622      # Now convert it back to Unix-stile (cygpath)
23623      input_path=`$CYGPATH -u "$shortmode_path"`
23624      new_path="$input_path"
23625    fi
23626  fi
23627
23628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23629  if test "x$test_cygdrive_prefix" = x; then
23630    # As a simple fix, exclude /usr/bin since it's not a real path.
23631    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23633      # a path prefixed by /cygdrive for fixpath to work.
23634      new_path="$CYGWIN_ROOT_PATH$input_path"
23635    fi
23636  fi
23637
23638  # remove trailing .exe if any
23639  new_path="${new_path/%.exe/}"
23640
23641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23642
23643  # First separate the path from the arguments. This will split at the first
23644  # space.
23645  complete="$WINAR"
23646  path="${complete%% *}"
23647  tmp="$complete EOL"
23648  arguments="${tmp#* }"
23649
23650  # Input might be given as Windows format, start by converting to
23651  # unix format.
23652  new_path="$path"
23653
23654  windows_path="$new_path"
23655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23656    unix_path=`$CYGPATH -u "$windows_path"`
23657    new_path="$unix_path"
23658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23660    new_path="$unix_path"
23661  fi
23662
23663
23664  # Now try to locate executable using which
23665  new_path=`$WHICH "$new_path" 2> /dev/null`
23666
23667  if test "x$new_path" = x; then
23668    # Oops. Which didn't find the executable.
23669    # The splitting of arguments from the executable at a space might have been incorrect,
23670    # since paths with space are more likely in Windows. Give it another try with the whole
23671    # argument.
23672    path="$complete"
23673    arguments="EOL"
23674    new_path="$path"
23675
23676  windows_path="$new_path"
23677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23678    unix_path=`$CYGPATH -u "$windows_path"`
23679    new_path="$unix_path"
23680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23682    new_path="$unix_path"
23683  fi
23684
23685
23686    new_path=`$WHICH "$new_path" 2> /dev/null`
23687
23688    if test "x$new_path" = x; then
23689      # It's still not found. Now this is an unrecoverable error.
23690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23691$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23692      has_space=`$ECHO "$complete" | $GREP " "`
23693      if test "x$has_space" != x; then
23694        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23695$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23696      fi
23697      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23698    fi
23699  fi
23700
23701  # Now new_path has a complete unix path to the binary
23702  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23703    # Keep paths in /bin as-is, but remove trailing .exe if any
23704    new_path="${new_path/%.exe/}"
23705    # Do not save /bin paths to all_fixpath_prefixes!
23706  else
23707    # Not in mixed or Windows style, start by that.
23708    new_path=`cmd //c echo $new_path`
23709
23710  input_path="$new_path"
23711  # Check if we need to convert this using DOS-style short mode. If the path
23712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23713  # take no chances and rewrite it.
23714  # Note: m4 eats our [], so we need to use [ and ] instead.
23715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23716  if test "x$has_forbidden_chars" != x; then
23717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23719  fi
23720
23721    # Output is in $new_path
23722
23723  windows_path="$new_path"
23724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23725    unix_path=`$CYGPATH -u "$windows_path"`
23726    new_path="$unix_path"
23727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23729    new_path="$unix_path"
23730  fi
23731
23732    # remove trailing .exe if any
23733    new_path="${new_path/%.exe/}"
23734
23735    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23736    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23737  fi
23738
23739  else
23740    # We're on a posix platform. Hooray! :)
23741    # First separate the path from the arguments. This will split at the first
23742    # space.
23743    complete="$WINAR"
23744    path="${complete%% *}"
23745    tmp="$complete EOL"
23746    arguments="${tmp#* }"
23747
23748    # Cannot rely on the command "which" here since it doesn't always work.
23749    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23750    if test -z "$is_absolute_path"; then
23751      # Path to executable is not absolute. Find it.
23752      IFS_save="$IFS"
23753      IFS=:
23754      for p in $PATH; do
23755        if test -f "$p/$path" && test -x "$p/$path"; then
23756          new_path="$p/$path"
23757          break
23758        fi
23759      done
23760      IFS="$IFS_save"
23761    else
23762      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23763$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23764      new_path="$path"
23765    fi
23766
23767    if test "x$new_path" = x; then
23768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23769$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23770        has_space=`$ECHO "$complete" | $GREP " "`
23771        if test "x$has_space" != x; then
23772          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23773$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23774        fi
23775        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23776      fi
23777  fi
23778
23779      # Now join together the path and the arguments once again
23780      if test "x$arguments" != xEOL; then
23781        new_complete="$new_path ${arguments% *}"
23782      else
23783        new_complete="$new_path"
23784      fi
23785
23786  if test "x$complete" != "x$new_complete"; then
23787      WINAR="$new_complete"
23788      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23789$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23790    fi
23791
23792    AR="$WINAR"
23793    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23794
23795    # Extract the first word of "dumpbin", so it can be a program name with args.
23796set dummy dumpbin; ac_word=$2
23797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23798$as_echo_n "checking for $ac_word... " >&6; }
23799if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23800  $as_echo_n "(cached) " >&6
23801else
23802  if test -n "$DUMPBIN"; then
23803  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23804else
23805as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23806for as_dir in $PATH
23807do
23808  IFS=$as_save_IFS
23809  test -z "$as_dir" && as_dir=.
23810    for ac_exec_ext in '' $ac_executable_extensions; do
23811  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23812    ac_cv_prog_DUMPBIN="dumpbin"
23813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23814    break 2
23815  fi
23816done
23817  done
23818IFS=$as_save_IFS
23819
23820fi
23821fi
23822DUMPBIN=$ac_cv_prog_DUMPBIN
23823if test -n "$DUMPBIN"; then
23824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23825$as_echo "$DUMPBIN" >&6; }
23826else
23827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23828$as_echo "no" >&6; }
23829fi
23830
23831
23832
23833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23834
23835  # First separate the path from the arguments. This will split at the first
23836  # space.
23837  complete="$DUMPBIN"
23838  path="${complete%% *}"
23839  tmp="$complete EOL"
23840  arguments="${tmp#* }"
23841
23842  # Input might be given as Windows format, start by converting to
23843  # unix format.
23844  new_path=`$CYGPATH -u "$path"`
23845
23846  # Now try to locate executable using which
23847  new_path=`$WHICH "$new_path" 2> /dev/null`
23848  # bat and cmd files are not always considered executable in cygwin causing which
23849  # to not find them
23850  if test "x$new_path" = x \
23851           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23852           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23853    new_path=`$CYGPATH -u "$path"`
23854  fi
23855  if test "x$new_path" = x; then
23856    # Oops. Which didn't find the executable.
23857    # The splitting of arguments from the executable at a space might have been incorrect,
23858    # since paths with space are more likely in Windows. Give it another try with the whole
23859    # argument.
23860    path="$complete"
23861    arguments="EOL"
23862    new_path=`$CYGPATH -u "$path"`
23863    new_path=`$WHICH "$new_path" 2> /dev/null`
23864    # bat and cmd files are not always considered executable in cygwin causing which
23865    # to not find them
23866    if test "x$new_path" = x \
23867             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23868             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23869      new_path=`$CYGPATH -u "$path"`
23870    fi
23871    if test "x$new_path" = x; then
23872      # It's still not found. Now this is an unrecoverable error.
23873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23874$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23875      has_space=`$ECHO "$complete" | $GREP " "`
23876      if test "x$has_space" != x; then
23877        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23878$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23879      fi
23880      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23881    fi
23882  fi
23883
23884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23887  # "foo.exe" is OK but "foo" is an error.
23888  #
23889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23890  # It is also a way to make sure we got the proper file name for the real test later on.
23891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23892  if test "x$test_shortpath" = x; then
23893    # Short path failed, file does not exist as specified.
23894    # Try adding .exe or .cmd
23895    if test -f "${new_path}.exe"; then
23896       input_to_shortpath="${new_path}.exe"
23897    elif test -f "${new_path}.cmd"; then
23898       input_to_shortpath="${new_path}.cmd"
23899    else
23900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23901$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23902      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23903$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23904      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23905    fi
23906  else
23907    input_to_shortpath="$new_path"
23908  fi
23909
23910  # Call helper function which possibly converts this using DOS-style short mode.
23911  # If so, the updated path is stored in $new_path.
23912  new_path="$input_to_shortpath"
23913
23914  input_path="$input_to_shortpath"
23915  # Check if we need to convert this using DOS-style short mode. If the path
23916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23917  # take no chances and rewrite it.
23918  # Note: m4 eats our [], so we need to use [ and ] instead.
23919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23920  if test "x$has_forbidden_chars" != x; then
23921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23925      # Going to short mode and back again did indeed matter. Since short mode is
23926      # case insensitive, let's make it lowercase to improve readability.
23927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23928      # Now convert it back to Unix-stile (cygpath)
23929      input_path=`$CYGPATH -u "$shortmode_path"`
23930      new_path="$input_path"
23931    fi
23932  fi
23933
23934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23935  if test "x$test_cygdrive_prefix" = x; then
23936    # As a simple fix, exclude /usr/bin since it's not a real path.
23937    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23939      # a path prefixed by /cygdrive for fixpath to work.
23940      new_path="$CYGWIN_ROOT_PATH$input_path"
23941    fi
23942  fi
23943
23944  # remove trailing .exe if any
23945  new_path="${new_path/%.exe/}"
23946
23947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23948
23949  # First separate the path from the arguments. This will split at the first
23950  # space.
23951  complete="$DUMPBIN"
23952  path="${complete%% *}"
23953  tmp="$complete EOL"
23954  arguments="${tmp#* }"
23955
23956  # Input might be given as Windows format, start by converting to
23957  # unix format.
23958  new_path="$path"
23959
23960  windows_path="$new_path"
23961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23962    unix_path=`$CYGPATH -u "$windows_path"`
23963    new_path="$unix_path"
23964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23966    new_path="$unix_path"
23967  fi
23968
23969
23970  # Now try to locate executable using which
23971  new_path=`$WHICH "$new_path" 2> /dev/null`
23972
23973  if test "x$new_path" = x; then
23974    # Oops. Which didn't find the executable.
23975    # The splitting of arguments from the executable at a space might have been incorrect,
23976    # since paths with space are more likely in Windows. Give it another try with the whole
23977    # argument.
23978    path="$complete"
23979    arguments="EOL"
23980    new_path="$path"
23981
23982  windows_path="$new_path"
23983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23984    unix_path=`$CYGPATH -u "$windows_path"`
23985    new_path="$unix_path"
23986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23988    new_path="$unix_path"
23989  fi
23990
23991
23992    new_path=`$WHICH "$new_path" 2> /dev/null`
23993
23994    if test "x$new_path" = x; then
23995      # It's still not found. Now this is an unrecoverable error.
23996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23997$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23998      has_space=`$ECHO "$complete" | $GREP " "`
23999      if test "x$has_space" != x; then
24000        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24001$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24002      fi
24003      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24004    fi
24005  fi
24006
24007  # Now new_path has a complete unix path to the binary
24008  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24009    # Keep paths in /bin as-is, but remove trailing .exe if any
24010    new_path="${new_path/%.exe/}"
24011    # Do not save /bin paths to all_fixpath_prefixes!
24012  else
24013    # Not in mixed or Windows style, start by that.
24014    new_path=`cmd //c echo $new_path`
24015
24016  input_path="$new_path"
24017  # Check if we need to convert this using DOS-style short mode. If the path
24018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24019  # take no chances and rewrite it.
24020  # Note: m4 eats our [], so we need to use [ and ] instead.
24021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24022  if test "x$has_forbidden_chars" != x; then
24023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24025  fi
24026
24027    # Output is in $new_path
24028
24029  windows_path="$new_path"
24030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24031    unix_path=`$CYGPATH -u "$windows_path"`
24032    new_path="$unix_path"
24033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24035    new_path="$unix_path"
24036  fi
24037
24038    # remove trailing .exe if any
24039    new_path="${new_path/%.exe/}"
24040
24041    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24042    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24043  fi
24044
24045  else
24046    # We're on a posix platform. Hooray! :)
24047    # First separate the path from the arguments. This will split at the first
24048    # space.
24049    complete="$DUMPBIN"
24050    path="${complete%% *}"
24051    tmp="$complete EOL"
24052    arguments="${tmp#* }"
24053
24054    # Cannot rely on the command "which" here since it doesn't always work.
24055    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24056    if test -z "$is_absolute_path"; then
24057      # Path to executable is not absolute. Find it.
24058      IFS_save="$IFS"
24059      IFS=:
24060      for p in $PATH; do
24061        if test -f "$p/$path" && test -x "$p/$path"; then
24062          new_path="$p/$path"
24063          break
24064        fi
24065      done
24066      IFS="$IFS_save"
24067    else
24068      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24069$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24070      new_path="$path"
24071    fi
24072
24073    if test "x$new_path" = x; then
24074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24075$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24076        has_space=`$ECHO "$complete" | $GREP " "`
24077        if test "x$has_space" != x; then
24078          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24079$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24080        fi
24081        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24082      fi
24083  fi
24084
24085      # Now join together the path and the arguments once again
24086      if test "x$arguments" != xEOL; then
24087        new_complete="$new_path ${arguments% *}"
24088      else
24089        new_complete="$new_path"
24090      fi
24091
24092  if test "x$complete" != "x$new_complete"; then
24093      DUMPBIN="$new_complete"
24094      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24095$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24096    fi
24097
24098
24099    COMPILER_TYPE=CL
24100    CCXXFLAGS="$CCXXFLAGS -nologo"
24101
24102fi
24103
24104
24105
24106ac_ext=c
24107ac_cpp='$CPP $CPPFLAGS'
24108ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24109ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24110ac_compiler_gnu=$ac_cv_c_compiler_gnu
24111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24112$as_echo_n "checking how to run the C preprocessor... " >&6; }
24113# On Suns, sometimes $CPP names a directory.
24114if test -n "$CPP" && test -d "$CPP"; then
24115  CPP=
24116fi
24117if test -z "$CPP"; then
24118  if test "${ac_cv_prog_CPP+set}" = set; then :
24119  $as_echo_n "(cached) " >&6
24120else
24121      # Double quotes because CPP needs to be expanded
24122    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24123    do
24124      ac_preproc_ok=false
24125for ac_c_preproc_warn_flag in '' yes
24126do
24127  # Use a header file that comes with gcc, so configuring glibc
24128  # with a fresh cross-compiler works.
24129  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24130  # <limits.h> exists even on freestanding compilers.
24131  # On the NeXT, cc -E runs the code through the compiler's parser,
24132  # not just through cpp. "Syntax error" is here to catch this case.
24133  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24134/* end confdefs.h.  */
24135#ifdef __STDC__
24136# include <limits.h>
24137#else
24138# include <assert.h>
24139#endif
24140		     Syntax error
24141_ACEOF
24142if ac_fn_c_try_cpp "$LINENO"; then :
24143
24144else
24145  # Broken: fails on valid input.
24146continue
24147fi
24148rm -f conftest.err conftest.i conftest.$ac_ext
24149
24150  # OK, works on sane cases.  Now check whether nonexistent headers
24151  # can be detected and how.
24152  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24153/* end confdefs.h.  */
24154#include <ac_nonexistent.h>
24155_ACEOF
24156if ac_fn_c_try_cpp "$LINENO"; then :
24157  # Broken: success on invalid input.
24158continue
24159else
24160  # Passes both tests.
24161ac_preproc_ok=:
24162break
24163fi
24164rm -f conftest.err conftest.i conftest.$ac_ext
24165
24166done
24167# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24168rm -f conftest.i conftest.err conftest.$ac_ext
24169if $ac_preproc_ok; then :
24170  break
24171fi
24172
24173    done
24174    ac_cv_prog_CPP=$CPP
24175
24176fi
24177  CPP=$ac_cv_prog_CPP
24178else
24179  ac_cv_prog_CPP=$CPP
24180fi
24181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24182$as_echo "$CPP" >&6; }
24183ac_preproc_ok=false
24184for ac_c_preproc_warn_flag in '' yes
24185do
24186  # Use a header file that comes with gcc, so configuring glibc
24187  # with a fresh cross-compiler works.
24188  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24189  # <limits.h> exists even on freestanding compilers.
24190  # On the NeXT, cc -E runs the code through the compiler's parser,
24191  # not just through cpp. "Syntax error" is here to catch this case.
24192  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24193/* end confdefs.h.  */
24194#ifdef __STDC__
24195# include <limits.h>
24196#else
24197# include <assert.h>
24198#endif
24199		     Syntax error
24200_ACEOF
24201if ac_fn_c_try_cpp "$LINENO"; then :
24202
24203else
24204  # Broken: fails on valid input.
24205continue
24206fi
24207rm -f conftest.err conftest.i conftest.$ac_ext
24208
24209  # OK, works on sane cases.  Now check whether nonexistent headers
24210  # can be detected and how.
24211  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24212/* end confdefs.h.  */
24213#include <ac_nonexistent.h>
24214_ACEOF
24215if ac_fn_c_try_cpp "$LINENO"; then :
24216  # Broken: success on invalid input.
24217continue
24218else
24219  # Passes both tests.
24220ac_preproc_ok=:
24221break
24222fi
24223rm -f conftest.err conftest.i conftest.$ac_ext
24224
24225done
24226# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24227rm -f conftest.i conftest.err conftest.$ac_ext
24228if $ac_preproc_ok; then :
24229
24230else
24231  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24232$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24233as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24234See \`config.log' for more details" "$LINENO" 5 ; }
24235fi
24236
24237ac_ext=cpp
24238ac_cpp='$CXXCPP $CPPFLAGS'
24239ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24240ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24241ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24242
24243
24244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24245
24246  # First separate the path from the arguments. This will split at the first
24247  # space.
24248  complete="$CPP"
24249  path="${complete%% *}"
24250  tmp="$complete EOL"
24251  arguments="${tmp#* }"
24252
24253  # Input might be given as Windows format, start by converting to
24254  # unix format.
24255  new_path=`$CYGPATH -u "$path"`
24256
24257  # Now try to locate executable using which
24258  new_path=`$WHICH "$new_path" 2> /dev/null`
24259  # bat and cmd files are not always considered executable in cygwin causing which
24260  # to not find them
24261  if test "x$new_path" = x \
24262           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24263           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24264    new_path=`$CYGPATH -u "$path"`
24265  fi
24266  if test "x$new_path" = x; then
24267    # Oops. Which didn't find the executable.
24268    # The splitting of arguments from the executable at a space might have been incorrect,
24269    # since paths with space are more likely in Windows. Give it another try with the whole
24270    # argument.
24271    path="$complete"
24272    arguments="EOL"
24273    new_path=`$CYGPATH -u "$path"`
24274    new_path=`$WHICH "$new_path" 2> /dev/null`
24275    # bat and cmd files are not always considered executable in cygwin causing which
24276    # to not find them
24277    if test "x$new_path" = x \
24278             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24279             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24280      new_path=`$CYGPATH -u "$path"`
24281    fi
24282    if test "x$new_path" = x; then
24283      # It's still not found. Now this is an unrecoverable error.
24284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24285$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24286      has_space=`$ECHO "$complete" | $GREP " "`
24287      if test "x$has_space" != x; then
24288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24290      fi
24291      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24292    fi
24293  fi
24294
24295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24298  # "foo.exe" is OK but "foo" is an error.
24299  #
24300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24301  # It is also a way to make sure we got the proper file name for the real test later on.
24302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24303  if test "x$test_shortpath" = x; then
24304    # Short path failed, file does not exist as specified.
24305    # Try adding .exe or .cmd
24306    if test -f "${new_path}.exe"; then
24307       input_to_shortpath="${new_path}.exe"
24308    elif test -f "${new_path}.cmd"; then
24309       input_to_shortpath="${new_path}.cmd"
24310    else
24311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24312$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24313      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24314$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24315      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24316    fi
24317  else
24318    input_to_shortpath="$new_path"
24319  fi
24320
24321  # Call helper function which possibly converts this using DOS-style short mode.
24322  # If so, the updated path is stored in $new_path.
24323  new_path="$input_to_shortpath"
24324
24325  input_path="$input_to_shortpath"
24326  # Check if we need to convert this using DOS-style short mode. If the path
24327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24328  # take no chances and rewrite it.
24329  # Note: m4 eats our [], so we need to use [ and ] instead.
24330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24331  if test "x$has_forbidden_chars" != x; then
24332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24336      # Going to short mode and back again did indeed matter. Since short mode is
24337      # case insensitive, let's make it lowercase to improve readability.
24338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24339      # Now convert it back to Unix-stile (cygpath)
24340      input_path=`$CYGPATH -u "$shortmode_path"`
24341      new_path="$input_path"
24342    fi
24343  fi
24344
24345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24346  if test "x$test_cygdrive_prefix" = x; then
24347    # As a simple fix, exclude /usr/bin since it's not a real path.
24348    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24350      # a path prefixed by /cygdrive for fixpath to work.
24351      new_path="$CYGWIN_ROOT_PATH$input_path"
24352    fi
24353  fi
24354
24355  # remove trailing .exe if any
24356  new_path="${new_path/%.exe/}"
24357
24358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24359
24360  # First separate the path from the arguments. This will split at the first
24361  # space.
24362  complete="$CPP"
24363  path="${complete%% *}"
24364  tmp="$complete EOL"
24365  arguments="${tmp#* }"
24366
24367  # Input might be given as Windows format, start by converting to
24368  # unix format.
24369  new_path="$path"
24370
24371  windows_path="$new_path"
24372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24373    unix_path=`$CYGPATH -u "$windows_path"`
24374    new_path="$unix_path"
24375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24377    new_path="$unix_path"
24378  fi
24379
24380
24381  # Now try to locate executable using which
24382  new_path=`$WHICH "$new_path" 2> /dev/null`
24383
24384  if test "x$new_path" = x; then
24385    # Oops. Which didn't find the executable.
24386    # The splitting of arguments from the executable at a space might have been incorrect,
24387    # since paths with space are more likely in Windows. Give it another try with the whole
24388    # argument.
24389    path="$complete"
24390    arguments="EOL"
24391    new_path="$path"
24392
24393  windows_path="$new_path"
24394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24395    unix_path=`$CYGPATH -u "$windows_path"`
24396    new_path="$unix_path"
24397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24399    new_path="$unix_path"
24400  fi
24401
24402
24403    new_path=`$WHICH "$new_path" 2> /dev/null`
24404
24405    if test "x$new_path" = x; then
24406      # It's still not found. Now this is an unrecoverable error.
24407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24408$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24409      has_space=`$ECHO "$complete" | $GREP " "`
24410      if test "x$has_space" != x; then
24411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24413      fi
24414      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24415    fi
24416  fi
24417
24418  # Now new_path has a complete unix path to the binary
24419  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24420    # Keep paths in /bin as-is, but remove trailing .exe if any
24421    new_path="${new_path/%.exe/}"
24422    # Do not save /bin paths to all_fixpath_prefixes!
24423  else
24424    # Not in mixed or Windows style, start by that.
24425    new_path=`cmd //c echo $new_path`
24426
24427  input_path="$new_path"
24428  # Check if we need to convert this using DOS-style short mode. If the path
24429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24430  # take no chances and rewrite it.
24431  # Note: m4 eats our [], so we need to use [ and ] instead.
24432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24433  if test "x$has_forbidden_chars" != x; then
24434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24436  fi
24437
24438    # Output is in $new_path
24439
24440  windows_path="$new_path"
24441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24442    unix_path=`$CYGPATH -u "$windows_path"`
24443    new_path="$unix_path"
24444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24446    new_path="$unix_path"
24447  fi
24448
24449    # remove trailing .exe if any
24450    new_path="${new_path/%.exe/}"
24451
24452    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24453    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24454  fi
24455
24456  else
24457    # We're on a posix platform. Hooray! :)
24458    # First separate the path from the arguments. This will split at the first
24459    # space.
24460    complete="$CPP"
24461    path="${complete%% *}"
24462    tmp="$complete EOL"
24463    arguments="${tmp#* }"
24464
24465    # Cannot rely on the command "which" here since it doesn't always work.
24466    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24467    if test -z "$is_absolute_path"; then
24468      # Path to executable is not absolute. Find it.
24469      IFS_save="$IFS"
24470      IFS=:
24471      for p in $PATH; do
24472        if test -f "$p/$path" && test -x "$p/$path"; then
24473          new_path="$p/$path"
24474          break
24475        fi
24476      done
24477      IFS="$IFS_save"
24478    else
24479      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24480$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24481      new_path="$path"
24482    fi
24483
24484    if test "x$new_path" = x; then
24485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24486$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24487        has_space=`$ECHO "$complete" | $GREP " "`
24488        if test "x$has_space" != x; then
24489          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24490$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24491        fi
24492        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24493      fi
24494  fi
24495
24496      # Now join together the path and the arguments once again
24497      if test "x$arguments" != xEOL; then
24498        new_complete="$new_path ${arguments% *}"
24499      else
24500        new_complete="$new_path"
24501      fi
24502
24503  if test "x$complete" != "x$new_complete"; then
24504      CPP="$new_complete"
24505      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24506$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24507    fi
24508
24509
24510ac_ext=cpp
24511ac_cpp='$CXXCPP $CPPFLAGS'
24512ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24513ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24514ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24516$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24517if test -z "$CXXCPP"; then
24518  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24519  $as_echo_n "(cached) " >&6
24520else
24521      # Double quotes because CXXCPP needs to be expanded
24522    for CXXCPP in "$CXX -E" "/lib/cpp"
24523    do
24524      ac_preproc_ok=false
24525for ac_cxx_preproc_warn_flag in '' yes
24526do
24527  # Use a header file that comes with gcc, so configuring glibc
24528  # with a fresh cross-compiler works.
24529  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24530  # <limits.h> exists even on freestanding compilers.
24531  # On the NeXT, cc -E runs the code through the compiler's parser,
24532  # not just through cpp. "Syntax error" is here to catch this case.
24533  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24534/* end confdefs.h.  */
24535#ifdef __STDC__
24536# include <limits.h>
24537#else
24538# include <assert.h>
24539#endif
24540		     Syntax error
24541_ACEOF
24542if ac_fn_cxx_try_cpp "$LINENO"; then :
24543
24544else
24545  # Broken: fails on valid input.
24546continue
24547fi
24548rm -f conftest.err conftest.i conftest.$ac_ext
24549
24550  # OK, works on sane cases.  Now check whether nonexistent headers
24551  # can be detected and how.
24552  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24553/* end confdefs.h.  */
24554#include <ac_nonexistent.h>
24555_ACEOF
24556if ac_fn_cxx_try_cpp "$LINENO"; then :
24557  # Broken: success on invalid input.
24558continue
24559else
24560  # Passes both tests.
24561ac_preproc_ok=:
24562break
24563fi
24564rm -f conftest.err conftest.i conftest.$ac_ext
24565
24566done
24567# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24568rm -f conftest.i conftest.err conftest.$ac_ext
24569if $ac_preproc_ok; then :
24570  break
24571fi
24572
24573    done
24574    ac_cv_prog_CXXCPP=$CXXCPP
24575
24576fi
24577  CXXCPP=$ac_cv_prog_CXXCPP
24578else
24579  ac_cv_prog_CXXCPP=$CXXCPP
24580fi
24581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24582$as_echo "$CXXCPP" >&6; }
24583ac_preproc_ok=false
24584for ac_cxx_preproc_warn_flag in '' yes
24585do
24586  # Use a header file that comes with gcc, so configuring glibc
24587  # with a fresh cross-compiler works.
24588  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24589  # <limits.h> exists even on freestanding compilers.
24590  # On the NeXT, cc -E runs the code through the compiler's parser,
24591  # not just through cpp. "Syntax error" is here to catch this case.
24592  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24593/* end confdefs.h.  */
24594#ifdef __STDC__
24595# include <limits.h>
24596#else
24597# include <assert.h>
24598#endif
24599		     Syntax error
24600_ACEOF
24601if ac_fn_cxx_try_cpp "$LINENO"; then :
24602
24603else
24604  # Broken: fails on valid input.
24605continue
24606fi
24607rm -f conftest.err conftest.i conftest.$ac_ext
24608
24609  # OK, works on sane cases.  Now check whether nonexistent headers
24610  # can be detected and how.
24611  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24612/* end confdefs.h.  */
24613#include <ac_nonexistent.h>
24614_ACEOF
24615if ac_fn_cxx_try_cpp "$LINENO"; then :
24616  # Broken: success on invalid input.
24617continue
24618else
24619  # Passes both tests.
24620ac_preproc_ok=:
24621break
24622fi
24623rm -f conftest.err conftest.i conftest.$ac_ext
24624
24625done
24626# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24627rm -f conftest.i conftest.err conftest.$ac_ext
24628if $ac_preproc_ok; then :
24629
24630else
24631  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24632$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24633as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24634See \`config.log' for more details" "$LINENO" 5 ; }
24635fi
24636
24637ac_ext=cpp
24638ac_cpp='$CXXCPP $CPPFLAGS'
24639ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24640ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24641ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24642
24643
24644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24645
24646  # First separate the path from the arguments. This will split at the first
24647  # space.
24648  complete="$CXXCPP"
24649  path="${complete%% *}"
24650  tmp="$complete EOL"
24651  arguments="${tmp#* }"
24652
24653  # Input might be given as Windows format, start by converting to
24654  # unix format.
24655  new_path=`$CYGPATH -u "$path"`
24656
24657  # Now try to locate executable using which
24658  new_path=`$WHICH "$new_path" 2> /dev/null`
24659  # bat and cmd files are not always considered executable in cygwin causing which
24660  # to not find them
24661  if test "x$new_path" = x \
24662           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24663           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24664    new_path=`$CYGPATH -u "$path"`
24665  fi
24666  if test "x$new_path" = x; then
24667    # Oops. Which didn't find the executable.
24668    # The splitting of arguments from the executable at a space might have been incorrect,
24669    # since paths with space are more likely in Windows. Give it another try with the whole
24670    # argument.
24671    path="$complete"
24672    arguments="EOL"
24673    new_path=`$CYGPATH -u "$path"`
24674    new_path=`$WHICH "$new_path" 2> /dev/null`
24675    # bat and cmd files are not always considered executable in cygwin causing which
24676    # to not find them
24677    if test "x$new_path" = x \
24678             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24679             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24680      new_path=`$CYGPATH -u "$path"`
24681    fi
24682    if test "x$new_path" = x; then
24683      # It's still not found. Now this is an unrecoverable error.
24684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24685$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24686      has_space=`$ECHO "$complete" | $GREP " "`
24687      if test "x$has_space" != x; then
24688        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24689$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24690      fi
24691      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24692    fi
24693  fi
24694
24695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24698  # "foo.exe" is OK but "foo" is an error.
24699  #
24700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24701  # It is also a way to make sure we got the proper file name for the real test later on.
24702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24703  if test "x$test_shortpath" = x; then
24704    # Short path failed, file does not exist as specified.
24705    # Try adding .exe or .cmd
24706    if test -f "${new_path}.exe"; then
24707       input_to_shortpath="${new_path}.exe"
24708    elif test -f "${new_path}.cmd"; then
24709       input_to_shortpath="${new_path}.cmd"
24710    else
24711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24712$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24713      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24714$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24715      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24716    fi
24717  else
24718    input_to_shortpath="$new_path"
24719  fi
24720
24721  # Call helper function which possibly converts this using DOS-style short mode.
24722  # If so, the updated path is stored in $new_path.
24723  new_path="$input_to_shortpath"
24724
24725  input_path="$input_to_shortpath"
24726  # Check if we need to convert this using DOS-style short mode. If the path
24727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24728  # take no chances and rewrite it.
24729  # Note: m4 eats our [], so we need to use [ and ] instead.
24730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24731  if test "x$has_forbidden_chars" != x; then
24732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24733    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24734    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24735    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24736      # Going to short mode and back again did indeed matter. Since short mode is
24737      # case insensitive, let's make it lowercase to improve readability.
24738      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24739      # Now convert it back to Unix-stile (cygpath)
24740      input_path=`$CYGPATH -u "$shortmode_path"`
24741      new_path="$input_path"
24742    fi
24743  fi
24744
24745  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24746  if test "x$test_cygdrive_prefix" = x; then
24747    # As a simple fix, exclude /usr/bin since it's not a real path.
24748    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24749      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24750      # a path prefixed by /cygdrive for fixpath to work.
24751      new_path="$CYGWIN_ROOT_PATH$input_path"
24752    fi
24753  fi
24754
24755  # remove trailing .exe if any
24756  new_path="${new_path/%.exe/}"
24757
24758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24759
24760  # First separate the path from the arguments. This will split at the first
24761  # space.
24762  complete="$CXXCPP"
24763  path="${complete%% *}"
24764  tmp="$complete EOL"
24765  arguments="${tmp#* }"
24766
24767  # Input might be given as Windows format, start by converting to
24768  # unix format.
24769  new_path="$path"
24770
24771  windows_path="$new_path"
24772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24773    unix_path=`$CYGPATH -u "$windows_path"`
24774    new_path="$unix_path"
24775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24777    new_path="$unix_path"
24778  fi
24779
24780
24781  # Now try to locate executable using which
24782  new_path=`$WHICH "$new_path" 2> /dev/null`
24783
24784  if test "x$new_path" = x; then
24785    # Oops. Which didn't find the executable.
24786    # The splitting of arguments from the executable at a space might have been incorrect,
24787    # since paths with space are more likely in Windows. Give it another try with the whole
24788    # argument.
24789    path="$complete"
24790    arguments="EOL"
24791    new_path="$path"
24792
24793  windows_path="$new_path"
24794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24795    unix_path=`$CYGPATH -u "$windows_path"`
24796    new_path="$unix_path"
24797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24799    new_path="$unix_path"
24800  fi
24801
24802
24803    new_path=`$WHICH "$new_path" 2> /dev/null`
24804
24805    if test "x$new_path" = x; then
24806      # It's still not found. Now this is an unrecoverable error.
24807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24808$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24809      has_space=`$ECHO "$complete" | $GREP " "`
24810      if test "x$has_space" != x; then
24811        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24812$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24813      fi
24814      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24815    fi
24816  fi
24817
24818  # Now new_path has a complete unix path to the binary
24819  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24820    # Keep paths in /bin as-is, but remove trailing .exe if any
24821    new_path="${new_path/%.exe/}"
24822    # Do not save /bin paths to all_fixpath_prefixes!
24823  else
24824    # Not in mixed or Windows style, start by that.
24825    new_path=`cmd //c echo $new_path`
24826
24827  input_path="$new_path"
24828  # Check if we need to convert this using DOS-style short mode. If the path
24829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24830  # take no chances and rewrite it.
24831  # Note: m4 eats our [], so we need to use [ and ] instead.
24832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24833  if test "x$has_forbidden_chars" != x; then
24834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24835    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24836  fi
24837
24838    # Output is in $new_path
24839
24840  windows_path="$new_path"
24841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24842    unix_path=`$CYGPATH -u "$windows_path"`
24843    new_path="$unix_path"
24844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24846    new_path="$unix_path"
24847  fi
24848
24849    # remove trailing .exe if any
24850    new_path="${new_path/%.exe/}"
24851
24852    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24853    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24854  fi
24855
24856  else
24857    # We're on a posix platform. Hooray! :)
24858    # First separate the path from the arguments. This will split at the first
24859    # space.
24860    complete="$CXXCPP"
24861    path="${complete%% *}"
24862    tmp="$complete EOL"
24863    arguments="${tmp#* }"
24864
24865    # Cannot rely on the command "which" here since it doesn't always work.
24866    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24867    if test -z "$is_absolute_path"; then
24868      # Path to executable is not absolute. Find it.
24869      IFS_save="$IFS"
24870      IFS=:
24871      for p in $PATH; do
24872        if test -f "$p/$path" && test -x "$p/$path"; then
24873          new_path="$p/$path"
24874          break
24875        fi
24876      done
24877      IFS="$IFS_save"
24878    else
24879      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24880$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24881      new_path="$path"
24882    fi
24883
24884    if test "x$new_path" = x; then
24885        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24886$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24887        has_space=`$ECHO "$complete" | $GREP " "`
24888        if test "x$has_space" != x; then
24889          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24890$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24891        fi
24892        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24893      fi
24894  fi
24895
24896      # Now join together the path and the arguments once again
24897      if test "x$arguments" != xEOL; then
24898        new_complete="$new_path ${arguments% *}"
24899      else
24900        new_complete="$new_path"
24901      fi
24902
24903  if test "x$complete" != "x$new_complete"; then
24904      CXXCPP="$new_complete"
24905      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24906$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24907    fi
24908
24909
24910if test "x$COMPILE_TYPE" != "xcross"; then
24911    # If we are not cross compiling, use the same compilers for
24912    # building the build platform executables. The cross-compilation
24913    # case needed to be done earlier, but this can only be done after
24914    # the native tools have been localized.
24915    BUILD_CC="$CC"
24916    BUILD_CXX="$CXX"
24917    BUILD_LD="$LD"
24918fi
24919
24920# for solaris we really need solaris tools, and not gnu equivalent
24921#   these seems to normally reside in /usr/ccs/bin so add that to path before
24922#   starting to probe
24923#
24924#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24925#         so that it can be overriden --with-tools-dir
24926if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24927    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24928fi
24929
24930# Find the right assembler.
24931if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24932    # Extract the first word of "as", so it can be a program name with args.
24933set dummy as; ac_word=$2
24934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24935$as_echo_n "checking for $ac_word... " >&6; }
24936if test "${ac_cv_path_AS+set}" = set; then :
24937  $as_echo_n "(cached) " >&6
24938else
24939  case $AS in
24940  [\\/]* | ?:[\\/]*)
24941  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24942  ;;
24943  *)
24944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24945for as_dir in $PATH
24946do
24947  IFS=$as_save_IFS
24948  test -z "$as_dir" && as_dir=.
24949    for ac_exec_ext in '' $ac_executable_extensions; do
24950  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24951    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24953    break 2
24954  fi
24955done
24956  done
24957IFS=$as_save_IFS
24958
24959  ;;
24960esac
24961fi
24962AS=$ac_cv_path_AS
24963if test -n "$AS"; then
24964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24965$as_echo "$AS" >&6; }
24966else
24967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24968$as_echo "no" >&6; }
24969fi
24970
24971
24972
24973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24974
24975  # First separate the path from the arguments. This will split at the first
24976  # space.
24977  complete="$AS"
24978  path="${complete%% *}"
24979  tmp="$complete EOL"
24980  arguments="${tmp#* }"
24981
24982  # Input might be given as Windows format, start by converting to
24983  # unix format.
24984  new_path=`$CYGPATH -u "$path"`
24985
24986  # Now try to locate executable using which
24987  new_path=`$WHICH "$new_path" 2> /dev/null`
24988  # bat and cmd files are not always considered executable in cygwin causing which
24989  # to not find them
24990  if test "x$new_path" = x \
24991           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24992           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24993    new_path=`$CYGPATH -u "$path"`
24994  fi
24995  if test "x$new_path" = x; then
24996    # Oops. Which didn't find the executable.
24997    # The splitting of arguments from the executable at a space might have been incorrect,
24998    # since paths with space are more likely in Windows. Give it another try with the whole
24999    # argument.
25000    path="$complete"
25001    arguments="EOL"
25002    new_path=`$CYGPATH -u "$path"`
25003    new_path=`$WHICH "$new_path" 2> /dev/null`
25004    # bat and cmd files are not always considered executable in cygwin causing which
25005    # to not find them
25006    if test "x$new_path" = x \
25007             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25008             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25009      new_path=`$CYGPATH -u "$path"`
25010    fi
25011    if test "x$new_path" = x; then
25012      # It's still not found. Now this is an unrecoverable error.
25013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25014$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25015      has_space=`$ECHO "$complete" | $GREP " "`
25016      if test "x$has_space" != x; then
25017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25019      fi
25020      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25021    fi
25022  fi
25023
25024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25027  # "foo.exe" is OK but "foo" is an error.
25028  #
25029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25030  # It is also a way to make sure we got the proper file name for the real test later on.
25031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25032  if test "x$test_shortpath" = x; then
25033    # Short path failed, file does not exist as specified.
25034    # Try adding .exe or .cmd
25035    if test -f "${new_path}.exe"; then
25036       input_to_shortpath="${new_path}.exe"
25037    elif test -f "${new_path}.cmd"; then
25038       input_to_shortpath="${new_path}.cmd"
25039    else
25040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25041$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25042      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25043$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25044      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25045    fi
25046  else
25047    input_to_shortpath="$new_path"
25048  fi
25049
25050  # Call helper function which possibly converts this using DOS-style short mode.
25051  # If so, the updated path is stored in $new_path.
25052  new_path="$input_to_shortpath"
25053
25054  input_path="$input_to_shortpath"
25055  # Check if we need to convert this using DOS-style short mode. If the path
25056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25057  # take no chances and rewrite it.
25058  # Note: m4 eats our [], so we need to use [ and ] instead.
25059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25060  if test "x$has_forbidden_chars" != x; then
25061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25065      # Going to short mode and back again did indeed matter. Since short mode is
25066      # case insensitive, let's make it lowercase to improve readability.
25067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25068      # Now convert it back to Unix-stile (cygpath)
25069      input_path=`$CYGPATH -u "$shortmode_path"`
25070      new_path="$input_path"
25071    fi
25072  fi
25073
25074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25075  if test "x$test_cygdrive_prefix" = x; then
25076    # As a simple fix, exclude /usr/bin since it's not a real path.
25077    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25079      # a path prefixed by /cygdrive for fixpath to work.
25080      new_path="$CYGWIN_ROOT_PATH$input_path"
25081    fi
25082  fi
25083
25084  # remove trailing .exe if any
25085  new_path="${new_path/%.exe/}"
25086
25087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25088
25089  # First separate the path from the arguments. This will split at the first
25090  # space.
25091  complete="$AS"
25092  path="${complete%% *}"
25093  tmp="$complete EOL"
25094  arguments="${tmp#* }"
25095
25096  # Input might be given as Windows format, start by converting to
25097  # unix format.
25098  new_path="$path"
25099
25100  windows_path="$new_path"
25101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25102    unix_path=`$CYGPATH -u "$windows_path"`
25103    new_path="$unix_path"
25104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25106    new_path="$unix_path"
25107  fi
25108
25109
25110  # Now try to locate executable using which
25111  new_path=`$WHICH "$new_path" 2> /dev/null`
25112
25113  if test "x$new_path" = x; then
25114    # Oops. Which didn't find the executable.
25115    # The splitting of arguments from the executable at a space might have been incorrect,
25116    # since paths with space are more likely in Windows. Give it another try with the whole
25117    # argument.
25118    path="$complete"
25119    arguments="EOL"
25120    new_path="$path"
25121
25122  windows_path="$new_path"
25123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25124    unix_path=`$CYGPATH -u "$windows_path"`
25125    new_path="$unix_path"
25126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25128    new_path="$unix_path"
25129  fi
25130
25131
25132    new_path=`$WHICH "$new_path" 2> /dev/null`
25133
25134    if test "x$new_path" = x; then
25135      # It's still not found. Now this is an unrecoverable error.
25136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25137$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25138      has_space=`$ECHO "$complete" | $GREP " "`
25139      if test "x$has_space" != x; then
25140        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25141$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25142      fi
25143      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25144    fi
25145  fi
25146
25147  # Now new_path has a complete unix path to the binary
25148  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25149    # Keep paths in /bin as-is, but remove trailing .exe if any
25150    new_path="${new_path/%.exe/}"
25151    # Do not save /bin paths to all_fixpath_prefixes!
25152  else
25153    # Not in mixed or Windows style, start by that.
25154    new_path=`cmd //c echo $new_path`
25155
25156  input_path="$new_path"
25157  # Check if we need to convert this using DOS-style short mode. If the path
25158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25159  # take no chances and rewrite it.
25160  # Note: m4 eats our [], so we need to use [ and ] instead.
25161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25162  if test "x$has_forbidden_chars" != x; then
25163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25165  fi
25166
25167    # Output is in $new_path
25168
25169  windows_path="$new_path"
25170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25171    unix_path=`$CYGPATH -u "$windows_path"`
25172    new_path="$unix_path"
25173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25175    new_path="$unix_path"
25176  fi
25177
25178    # remove trailing .exe if any
25179    new_path="${new_path/%.exe/}"
25180
25181    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25182    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25183  fi
25184
25185  else
25186    # We're on a posix platform. Hooray! :)
25187    # First separate the path from the arguments. This will split at the first
25188    # space.
25189    complete="$AS"
25190    path="${complete%% *}"
25191    tmp="$complete EOL"
25192    arguments="${tmp#* }"
25193
25194    # Cannot rely on the command "which" here since it doesn't always work.
25195    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25196    if test -z "$is_absolute_path"; then
25197      # Path to executable is not absolute. Find it.
25198      IFS_save="$IFS"
25199      IFS=:
25200      for p in $PATH; do
25201        if test -f "$p/$path" && test -x "$p/$path"; then
25202          new_path="$p/$path"
25203          break
25204        fi
25205      done
25206      IFS="$IFS_save"
25207    else
25208      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25209$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25210      new_path="$path"
25211    fi
25212
25213    if test "x$new_path" = x; then
25214        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25215$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25216        has_space=`$ECHO "$complete" | $GREP " "`
25217        if test "x$has_space" != x; then
25218          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25219$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25220        fi
25221        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25222      fi
25223  fi
25224
25225      # Now join together the path and the arguments once again
25226      if test "x$arguments" != xEOL; then
25227        new_complete="$new_path ${arguments% *}"
25228      else
25229        new_complete="$new_path"
25230      fi
25231
25232  if test "x$complete" != "x$new_complete"; then
25233      AS="$new_complete"
25234      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25235$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25236    fi
25237
25238else
25239    AS="$CC -c"
25240fi
25241
25242
25243if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25244    # Extract the first word of "nm", so it can be a program name with args.
25245set dummy nm; ac_word=$2
25246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25247$as_echo_n "checking for $ac_word... " >&6; }
25248if test "${ac_cv_path_NM+set}" = set; then :
25249  $as_echo_n "(cached) " >&6
25250else
25251  case $NM in
25252  [\\/]* | ?:[\\/]*)
25253  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25254  ;;
25255  *)
25256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25257for as_dir in $PATH
25258do
25259  IFS=$as_save_IFS
25260  test -z "$as_dir" && as_dir=.
25261    for ac_exec_ext in '' $ac_executable_extensions; do
25262  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25263    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25265    break 2
25266  fi
25267done
25268  done
25269IFS=$as_save_IFS
25270
25271  ;;
25272esac
25273fi
25274NM=$ac_cv_path_NM
25275if test -n "$NM"; then
25276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25277$as_echo "$NM" >&6; }
25278else
25279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25280$as_echo "no" >&6; }
25281fi
25282
25283
25284
25285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25286
25287  # First separate the path from the arguments. This will split at the first
25288  # space.
25289  complete="$NM"
25290  path="${complete%% *}"
25291  tmp="$complete EOL"
25292  arguments="${tmp#* }"
25293
25294  # Input might be given as Windows format, start by converting to
25295  # unix format.
25296  new_path=`$CYGPATH -u "$path"`
25297
25298  # Now try to locate executable using which
25299  new_path=`$WHICH "$new_path" 2> /dev/null`
25300  # bat and cmd files are not always considered executable in cygwin causing which
25301  # to not find them
25302  if test "x$new_path" = x \
25303           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25304           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25305    new_path=`$CYGPATH -u "$path"`
25306  fi
25307  if test "x$new_path" = x; then
25308    # Oops. Which didn't find the executable.
25309    # The splitting of arguments from the executable at a space might have been incorrect,
25310    # since paths with space are more likely in Windows. Give it another try with the whole
25311    # argument.
25312    path="$complete"
25313    arguments="EOL"
25314    new_path=`$CYGPATH -u "$path"`
25315    new_path=`$WHICH "$new_path" 2> /dev/null`
25316    # bat and cmd files are not always considered executable in cygwin causing which
25317    # to not find them
25318    if test "x$new_path" = x \
25319             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25320             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25321      new_path=`$CYGPATH -u "$path"`
25322    fi
25323    if test "x$new_path" = x; then
25324      # It's still not found. Now this is an unrecoverable error.
25325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25326$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25327      has_space=`$ECHO "$complete" | $GREP " "`
25328      if test "x$has_space" != x; then
25329        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25330$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25331      fi
25332      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25333    fi
25334  fi
25335
25336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25339  # "foo.exe" is OK but "foo" is an error.
25340  #
25341  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25342  # It is also a way to make sure we got the proper file name for the real test later on.
25343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25344  if test "x$test_shortpath" = x; then
25345    # Short path failed, file does not exist as specified.
25346    # Try adding .exe or .cmd
25347    if test -f "${new_path}.exe"; then
25348       input_to_shortpath="${new_path}.exe"
25349    elif test -f "${new_path}.cmd"; then
25350       input_to_shortpath="${new_path}.cmd"
25351    else
25352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25353$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25354      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25355$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25356      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25357    fi
25358  else
25359    input_to_shortpath="$new_path"
25360  fi
25361
25362  # Call helper function which possibly converts this using DOS-style short mode.
25363  # If so, the updated path is stored in $new_path.
25364  new_path="$input_to_shortpath"
25365
25366  input_path="$input_to_shortpath"
25367  # Check if we need to convert this using DOS-style short mode. If the path
25368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25369  # take no chances and rewrite it.
25370  # Note: m4 eats our [], so we need to use [ and ] instead.
25371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25372  if test "x$has_forbidden_chars" != x; then
25373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25377      # Going to short mode and back again did indeed matter. Since short mode is
25378      # case insensitive, let's make it lowercase to improve readability.
25379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25380      # Now convert it back to Unix-stile (cygpath)
25381      input_path=`$CYGPATH -u "$shortmode_path"`
25382      new_path="$input_path"
25383    fi
25384  fi
25385
25386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25387  if test "x$test_cygdrive_prefix" = x; then
25388    # As a simple fix, exclude /usr/bin since it's not a real path.
25389    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25391      # a path prefixed by /cygdrive for fixpath to work.
25392      new_path="$CYGWIN_ROOT_PATH$input_path"
25393    fi
25394  fi
25395
25396  # remove trailing .exe if any
25397  new_path="${new_path/%.exe/}"
25398
25399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25400
25401  # First separate the path from the arguments. This will split at the first
25402  # space.
25403  complete="$NM"
25404  path="${complete%% *}"
25405  tmp="$complete EOL"
25406  arguments="${tmp#* }"
25407
25408  # Input might be given as Windows format, start by converting to
25409  # unix format.
25410  new_path="$path"
25411
25412  windows_path="$new_path"
25413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25414    unix_path=`$CYGPATH -u "$windows_path"`
25415    new_path="$unix_path"
25416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25418    new_path="$unix_path"
25419  fi
25420
25421
25422  # Now try to locate executable using which
25423  new_path=`$WHICH "$new_path" 2> /dev/null`
25424
25425  if test "x$new_path" = x; then
25426    # Oops. Which didn't find the executable.
25427    # The splitting of arguments from the executable at a space might have been incorrect,
25428    # since paths with space are more likely in Windows. Give it another try with the whole
25429    # argument.
25430    path="$complete"
25431    arguments="EOL"
25432    new_path="$path"
25433
25434  windows_path="$new_path"
25435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25436    unix_path=`$CYGPATH -u "$windows_path"`
25437    new_path="$unix_path"
25438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25440    new_path="$unix_path"
25441  fi
25442
25443
25444    new_path=`$WHICH "$new_path" 2> /dev/null`
25445
25446    if test "x$new_path" = x; then
25447      # It's still not found. Now this is an unrecoverable error.
25448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25449$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25450      has_space=`$ECHO "$complete" | $GREP " "`
25451      if test "x$has_space" != x; then
25452        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25453$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25454      fi
25455      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25456    fi
25457  fi
25458
25459  # Now new_path has a complete unix path to the binary
25460  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25461    # Keep paths in /bin as-is, but remove trailing .exe if any
25462    new_path="${new_path/%.exe/}"
25463    # Do not save /bin paths to all_fixpath_prefixes!
25464  else
25465    # Not in mixed or Windows style, start by that.
25466    new_path=`cmd //c echo $new_path`
25467
25468  input_path="$new_path"
25469  # Check if we need to convert this using DOS-style short mode. If the path
25470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25471  # take no chances and rewrite it.
25472  # Note: m4 eats our [], so we need to use [ and ] instead.
25473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25474  if test "x$has_forbidden_chars" != x; then
25475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25477  fi
25478
25479    # Output is in $new_path
25480
25481  windows_path="$new_path"
25482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25483    unix_path=`$CYGPATH -u "$windows_path"`
25484    new_path="$unix_path"
25485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25487    new_path="$unix_path"
25488  fi
25489
25490    # remove trailing .exe if any
25491    new_path="${new_path/%.exe/}"
25492
25493    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25494    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25495  fi
25496
25497  else
25498    # We're on a posix platform. Hooray! :)
25499    # First separate the path from the arguments. This will split at the first
25500    # space.
25501    complete="$NM"
25502    path="${complete%% *}"
25503    tmp="$complete EOL"
25504    arguments="${tmp#* }"
25505
25506    # Cannot rely on the command "which" here since it doesn't always work.
25507    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25508    if test -z "$is_absolute_path"; then
25509      # Path to executable is not absolute. Find it.
25510      IFS_save="$IFS"
25511      IFS=:
25512      for p in $PATH; do
25513        if test -f "$p/$path" && test -x "$p/$path"; then
25514          new_path="$p/$path"
25515          break
25516        fi
25517      done
25518      IFS="$IFS_save"
25519    else
25520      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25521$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25522      new_path="$path"
25523    fi
25524
25525    if test "x$new_path" = x; then
25526        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25527$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25528        has_space=`$ECHO "$complete" | $GREP " "`
25529        if test "x$has_space" != x; then
25530          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25531$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25532        fi
25533        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25534      fi
25535  fi
25536
25537      # Now join together the path and the arguments once again
25538      if test "x$arguments" != xEOL; then
25539        new_complete="$new_path ${arguments% *}"
25540      else
25541        new_complete="$new_path"
25542      fi
25543
25544  if test "x$complete" != "x$new_complete"; then
25545      NM="$new_complete"
25546      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25547$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25548    fi
25549
25550    # Extract the first word of "gnm", so it can be a program name with args.
25551set dummy gnm; ac_word=$2
25552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25553$as_echo_n "checking for $ac_word... " >&6; }
25554if test "${ac_cv_path_GNM+set}" = set; then :
25555  $as_echo_n "(cached) " >&6
25556else
25557  case $GNM in
25558  [\\/]* | ?:[\\/]*)
25559  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25560  ;;
25561  *)
25562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25563for as_dir in $PATH
25564do
25565  IFS=$as_save_IFS
25566  test -z "$as_dir" && as_dir=.
25567    for ac_exec_ext in '' $ac_executable_extensions; do
25568  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25569    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25571    break 2
25572  fi
25573done
25574  done
25575IFS=$as_save_IFS
25576
25577  ;;
25578esac
25579fi
25580GNM=$ac_cv_path_GNM
25581if test -n "$GNM"; then
25582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25583$as_echo "$GNM" >&6; }
25584else
25585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25586$as_echo "no" >&6; }
25587fi
25588
25589
25590
25591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25592
25593  # First separate the path from the arguments. This will split at the first
25594  # space.
25595  complete="$GNM"
25596  path="${complete%% *}"
25597  tmp="$complete EOL"
25598  arguments="${tmp#* }"
25599
25600  # Input might be given as Windows format, start by converting to
25601  # unix format.
25602  new_path=`$CYGPATH -u "$path"`
25603
25604  # Now try to locate executable using which
25605  new_path=`$WHICH "$new_path" 2> /dev/null`
25606  # bat and cmd files are not always considered executable in cygwin causing which
25607  # to not find them
25608  if test "x$new_path" = x \
25609           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25610           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25611    new_path=`$CYGPATH -u "$path"`
25612  fi
25613  if test "x$new_path" = x; then
25614    # Oops. Which didn't find the executable.
25615    # The splitting of arguments from the executable at a space might have been incorrect,
25616    # since paths with space are more likely in Windows. Give it another try with the whole
25617    # argument.
25618    path="$complete"
25619    arguments="EOL"
25620    new_path=`$CYGPATH -u "$path"`
25621    new_path=`$WHICH "$new_path" 2> /dev/null`
25622    # bat and cmd files are not always considered executable in cygwin causing which
25623    # to not find them
25624    if test "x$new_path" = x \
25625             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25626             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25627      new_path=`$CYGPATH -u "$path"`
25628    fi
25629    if test "x$new_path" = x; then
25630      # It's still not found. Now this is an unrecoverable error.
25631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25632$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25633      has_space=`$ECHO "$complete" | $GREP " "`
25634      if test "x$has_space" != x; then
25635        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25636$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25637      fi
25638      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25639    fi
25640  fi
25641
25642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25645  # "foo.exe" is OK but "foo" is an error.
25646  #
25647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25648  # It is also a way to make sure we got the proper file name for the real test later on.
25649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25650  if test "x$test_shortpath" = x; then
25651    # Short path failed, file does not exist as specified.
25652    # Try adding .exe or .cmd
25653    if test -f "${new_path}.exe"; then
25654       input_to_shortpath="${new_path}.exe"
25655    elif test -f "${new_path}.cmd"; then
25656       input_to_shortpath="${new_path}.cmd"
25657    else
25658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25659$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25660      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25661$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25662      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25663    fi
25664  else
25665    input_to_shortpath="$new_path"
25666  fi
25667
25668  # Call helper function which possibly converts this using DOS-style short mode.
25669  # If so, the updated path is stored in $new_path.
25670  new_path="$input_to_shortpath"
25671
25672  input_path="$input_to_shortpath"
25673  # Check if we need to convert this using DOS-style short mode. If the path
25674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25675  # take no chances and rewrite it.
25676  # Note: m4 eats our [], so we need to use [ and ] instead.
25677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25678  if test "x$has_forbidden_chars" != x; then
25679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25683      # Going to short mode and back again did indeed matter. Since short mode is
25684      # case insensitive, let's make it lowercase to improve readability.
25685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25686      # Now convert it back to Unix-stile (cygpath)
25687      input_path=`$CYGPATH -u "$shortmode_path"`
25688      new_path="$input_path"
25689    fi
25690  fi
25691
25692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25693  if test "x$test_cygdrive_prefix" = x; then
25694    # As a simple fix, exclude /usr/bin since it's not a real path.
25695    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25697      # a path prefixed by /cygdrive for fixpath to work.
25698      new_path="$CYGWIN_ROOT_PATH$input_path"
25699    fi
25700  fi
25701
25702  # remove trailing .exe if any
25703  new_path="${new_path/%.exe/}"
25704
25705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25706
25707  # First separate the path from the arguments. This will split at the first
25708  # space.
25709  complete="$GNM"
25710  path="${complete%% *}"
25711  tmp="$complete EOL"
25712  arguments="${tmp#* }"
25713
25714  # Input might be given as Windows format, start by converting to
25715  # unix format.
25716  new_path="$path"
25717
25718  windows_path="$new_path"
25719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25720    unix_path=`$CYGPATH -u "$windows_path"`
25721    new_path="$unix_path"
25722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25724    new_path="$unix_path"
25725  fi
25726
25727
25728  # Now try to locate executable using which
25729  new_path=`$WHICH "$new_path" 2> /dev/null`
25730
25731  if test "x$new_path" = x; then
25732    # Oops. Which didn't find the executable.
25733    # The splitting of arguments from the executable at a space might have been incorrect,
25734    # since paths with space are more likely in Windows. Give it another try with the whole
25735    # argument.
25736    path="$complete"
25737    arguments="EOL"
25738    new_path="$path"
25739
25740  windows_path="$new_path"
25741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25742    unix_path=`$CYGPATH -u "$windows_path"`
25743    new_path="$unix_path"
25744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25746    new_path="$unix_path"
25747  fi
25748
25749
25750    new_path=`$WHICH "$new_path" 2> /dev/null`
25751
25752    if test "x$new_path" = x; then
25753      # It's still not found. Now this is an unrecoverable error.
25754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25755$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25756      has_space=`$ECHO "$complete" | $GREP " "`
25757      if test "x$has_space" != x; then
25758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25760      fi
25761      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25762    fi
25763  fi
25764
25765  # Now new_path has a complete unix path to the binary
25766  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25767    # Keep paths in /bin as-is, but remove trailing .exe if any
25768    new_path="${new_path/%.exe/}"
25769    # Do not save /bin paths to all_fixpath_prefixes!
25770  else
25771    # Not in mixed or Windows style, start by that.
25772    new_path=`cmd //c echo $new_path`
25773
25774  input_path="$new_path"
25775  # Check if we need to convert this using DOS-style short mode. If the path
25776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25777  # take no chances and rewrite it.
25778  # Note: m4 eats our [], so we need to use [ and ] instead.
25779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25780  if test "x$has_forbidden_chars" != x; then
25781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25783  fi
25784
25785    # Output is in $new_path
25786
25787  windows_path="$new_path"
25788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25789    unix_path=`$CYGPATH -u "$windows_path"`
25790    new_path="$unix_path"
25791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25793    new_path="$unix_path"
25794  fi
25795
25796    # remove trailing .exe if any
25797    new_path="${new_path/%.exe/}"
25798
25799    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25800    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25801  fi
25802
25803  else
25804    # We're on a posix platform. Hooray! :)
25805    # First separate the path from the arguments. This will split at the first
25806    # space.
25807    complete="$GNM"
25808    path="${complete%% *}"
25809    tmp="$complete EOL"
25810    arguments="${tmp#* }"
25811
25812    # Cannot rely on the command "which" here since it doesn't always work.
25813    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25814    if test -z "$is_absolute_path"; then
25815      # Path to executable is not absolute. Find it.
25816      IFS_save="$IFS"
25817      IFS=:
25818      for p in $PATH; do
25819        if test -f "$p/$path" && test -x "$p/$path"; then
25820          new_path="$p/$path"
25821          break
25822        fi
25823      done
25824      IFS="$IFS_save"
25825    else
25826      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
25827$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
25828      new_path="$path"
25829    fi
25830
25831    if test "x$new_path" = x; then
25832        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25833$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25834        has_space=`$ECHO "$complete" | $GREP " "`
25835        if test "x$has_space" != x; then
25836          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25837$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25838        fi
25839        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25840      fi
25841  fi
25842
25843      # Now join together the path and the arguments once again
25844      if test "x$arguments" != xEOL; then
25845        new_complete="$new_path ${arguments% *}"
25846      else
25847        new_complete="$new_path"
25848      fi
25849
25850  if test "x$complete" != "x$new_complete"; then
25851      GNM="$new_complete"
25852      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
25853$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
25854    fi
25855
25856    # Extract the first word of "strip", so it can be a program name with args.
25857set dummy strip; ac_word=$2
25858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25859$as_echo_n "checking for $ac_word... " >&6; }
25860if test "${ac_cv_path_STRIP+set}" = set; then :
25861  $as_echo_n "(cached) " >&6
25862else
25863  case $STRIP in
25864  [\\/]* | ?:[\\/]*)
25865  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25866  ;;
25867  *)
25868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25869for as_dir in $PATH
25870do
25871  IFS=$as_save_IFS
25872  test -z "$as_dir" && as_dir=.
25873    for ac_exec_ext in '' $ac_executable_extensions; do
25874  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25875    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25877    break 2
25878  fi
25879done
25880  done
25881IFS=$as_save_IFS
25882
25883  ;;
25884esac
25885fi
25886STRIP=$ac_cv_path_STRIP
25887if test -n "$STRIP"; then
25888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25889$as_echo "$STRIP" >&6; }
25890else
25891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25892$as_echo "no" >&6; }
25893fi
25894
25895
25896
25897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25898
25899  # First separate the path from the arguments. This will split at the first
25900  # space.
25901  complete="$STRIP"
25902  path="${complete%% *}"
25903  tmp="$complete EOL"
25904  arguments="${tmp#* }"
25905
25906  # Input might be given as Windows format, start by converting to
25907  # unix format.
25908  new_path=`$CYGPATH -u "$path"`
25909
25910  # Now try to locate executable using which
25911  new_path=`$WHICH "$new_path" 2> /dev/null`
25912  # bat and cmd files are not always considered executable in cygwin causing which
25913  # to not find them
25914  if test "x$new_path" = x \
25915           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25916           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25917    new_path=`$CYGPATH -u "$path"`
25918  fi
25919  if test "x$new_path" = x; then
25920    # Oops. Which didn't find the executable.
25921    # The splitting of arguments from the executable at a space might have been incorrect,
25922    # since paths with space are more likely in Windows. Give it another try with the whole
25923    # argument.
25924    path="$complete"
25925    arguments="EOL"
25926    new_path=`$CYGPATH -u "$path"`
25927    new_path=`$WHICH "$new_path" 2> /dev/null`
25928    # bat and cmd files are not always considered executable in cygwin causing which
25929    # to not find them
25930    if test "x$new_path" = x \
25931             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25932             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25933      new_path=`$CYGPATH -u "$path"`
25934    fi
25935    if test "x$new_path" = x; then
25936      # It's still not found. Now this is an unrecoverable error.
25937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25938$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25939      has_space=`$ECHO "$complete" | $GREP " "`
25940      if test "x$has_space" != x; then
25941        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25942$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25943      fi
25944      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25945    fi
25946  fi
25947
25948  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25949  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25950  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25951  # "foo.exe" is OK but "foo" is an error.
25952  #
25953  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25954  # It is also a way to make sure we got the proper file name for the real test later on.
25955  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25956  if test "x$test_shortpath" = x; then
25957    # Short path failed, file does not exist as specified.
25958    # Try adding .exe or .cmd
25959    if test -f "${new_path}.exe"; then
25960       input_to_shortpath="${new_path}.exe"
25961    elif test -f "${new_path}.cmd"; then
25962       input_to_shortpath="${new_path}.cmd"
25963    else
25964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25965$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25966      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25967$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25968      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25969    fi
25970  else
25971    input_to_shortpath="$new_path"
25972  fi
25973
25974  # Call helper function which possibly converts this using DOS-style short mode.
25975  # If so, the updated path is stored in $new_path.
25976  new_path="$input_to_shortpath"
25977
25978  input_path="$input_to_shortpath"
25979  # Check if we need to convert this using DOS-style short mode. If the path
25980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25981  # take no chances and rewrite it.
25982  # Note: m4 eats our [], so we need to use [ and ] instead.
25983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25984  if test "x$has_forbidden_chars" != x; then
25985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25986    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25987    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25988    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25989      # Going to short mode and back again did indeed matter. Since short mode is
25990      # case insensitive, let's make it lowercase to improve readability.
25991      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25992      # Now convert it back to Unix-stile (cygpath)
25993      input_path=`$CYGPATH -u "$shortmode_path"`
25994      new_path="$input_path"
25995    fi
25996  fi
25997
25998  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25999  if test "x$test_cygdrive_prefix" = x; then
26000    # As a simple fix, exclude /usr/bin since it's not a real path.
26001    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26002      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26003      # a path prefixed by /cygdrive for fixpath to work.
26004      new_path="$CYGWIN_ROOT_PATH$input_path"
26005    fi
26006  fi
26007
26008  # remove trailing .exe if any
26009  new_path="${new_path/%.exe/}"
26010
26011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26012
26013  # First separate the path from the arguments. This will split at the first
26014  # space.
26015  complete="$STRIP"
26016  path="${complete%% *}"
26017  tmp="$complete EOL"
26018  arguments="${tmp#* }"
26019
26020  # Input might be given as Windows format, start by converting to
26021  # unix format.
26022  new_path="$path"
26023
26024  windows_path="$new_path"
26025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26026    unix_path=`$CYGPATH -u "$windows_path"`
26027    new_path="$unix_path"
26028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26030    new_path="$unix_path"
26031  fi
26032
26033
26034  # Now try to locate executable using which
26035  new_path=`$WHICH "$new_path" 2> /dev/null`
26036
26037  if test "x$new_path" = x; then
26038    # Oops. Which didn't find the executable.
26039    # The splitting of arguments from the executable at a space might have been incorrect,
26040    # since paths with space are more likely in Windows. Give it another try with the whole
26041    # argument.
26042    path="$complete"
26043    arguments="EOL"
26044    new_path="$path"
26045
26046  windows_path="$new_path"
26047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26048    unix_path=`$CYGPATH -u "$windows_path"`
26049    new_path="$unix_path"
26050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26052    new_path="$unix_path"
26053  fi
26054
26055
26056    new_path=`$WHICH "$new_path" 2> /dev/null`
26057
26058    if test "x$new_path" = x; then
26059      # It's still not found. Now this is an unrecoverable error.
26060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26061$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26062      has_space=`$ECHO "$complete" | $GREP " "`
26063      if test "x$has_space" != x; then
26064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26066      fi
26067      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26068    fi
26069  fi
26070
26071  # Now new_path has a complete unix path to the binary
26072  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26073    # Keep paths in /bin as-is, but remove trailing .exe if any
26074    new_path="${new_path/%.exe/}"
26075    # Do not save /bin paths to all_fixpath_prefixes!
26076  else
26077    # Not in mixed or Windows style, start by that.
26078    new_path=`cmd //c echo $new_path`
26079
26080  input_path="$new_path"
26081  # Check if we need to convert this using DOS-style short mode. If the path
26082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26083  # take no chances and rewrite it.
26084  # Note: m4 eats our [], so we need to use [ and ] instead.
26085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26086  if test "x$has_forbidden_chars" != x; then
26087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26089  fi
26090
26091    # Output is in $new_path
26092
26093  windows_path="$new_path"
26094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26095    unix_path=`$CYGPATH -u "$windows_path"`
26096    new_path="$unix_path"
26097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26099    new_path="$unix_path"
26100  fi
26101
26102    # remove trailing .exe if any
26103    new_path="${new_path/%.exe/}"
26104
26105    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26106    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26107  fi
26108
26109  else
26110    # We're on a posix platform. Hooray! :)
26111    # First separate the path from the arguments. This will split at the first
26112    # space.
26113    complete="$STRIP"
26114    path="${complete%% *}"
26115    tmp="$complete EOL"
26116    arguments="${tmp#* }"
26117
26118    # Cannot rely on the command "which" here since it doesn't always work.
26119    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26120    if test -z "$is_absolute_path"; then
26121      # Path to executable is not absolute. Find it.
26122      IFS_save="$IFS"
26123      IFS=:
26124      for p in $PATH; do
26125        if test -f "$p/$path" && test -x "$p/$path"; then
26126          new_path="$p/$path"
26127          break
26128        fi
26129      done
26130      IFS="$IFS_save"
26131    else
26132      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26133$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26134      new_path="$path"
26135    fi
26136
26137    if test "x$new_path" = x; then
26138        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26139$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26140        has_space=`$ECHO "$complete" | $GREP " "`
26141        if test "x$has_space" != x; then
26142          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26143$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26144        fi
26145        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26146      fi
26147  fi
26148
26149      # Now join together the path and the arguments once again
26150      if test "x$arguments" != xEOL; then
26151        new_complete="$new_path ${arguments% *}"
26152      else
26153        new_complete="$new_path"
26154      fi
26155
26156  if test "x$complete" != "x$new_complete"; then
26157      STRIP="$new_complete"
26158      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26159$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26160    fi
26161
26162    # Extract the first word of "mcs", so it can be a program name with args.
26163set dummy mcs; ac_word=$2
26164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26165$as_echo_n "checking for $ac_word... " >&6; }
26166if test "${ac_cv_path_MCS+set}" = set; then :
26167  $as_echo_n "(cached) " >&6
26168else
26169  case $MCS in
26170  [\\/]* | ?:[\\/]*)
26171  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26172  ;;
26173  *)
26174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26175for as_dir in $PATH
26176do
26177  IFS=$as_save_IFS
26178  test -z "$as_dir" && as_dir=.
26179    for ac_exec_ext in '' $ac_executable_extensions; do
26180  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26181    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26183    break 2
26184  fi
26185done
26186  done
26187IFS=$as_save_IFS
26188
26189  ;;
26190esac
26191fi
26192MCS=$ac_cv_path_MCS
26193if test -n "$MCS"; then
26194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26195$as_echo "$MCS" >&6; }
26196else
26197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26198$as_echo "no" >&6; }
26199fi
26200
26201
26202
26203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26204
26205  # First separate the path from the arguments. This will split at the first
26206  # space.
26207  complete="$MCS"
26208  path="${complete%% *}"
26209  tmp="$complete EOL"
26210  arguments="${tmp#* }"
26211
26212  # Input might be given as Windows format, start by converting to
26213  # unix format.
26214  new_path=`$CYGPATH -u "$path"`
26215
26216  # Now try to locate executable using which
26217  new_path=`$WHICH "$new_path" 2> /dev/null`
26218  # bat and cmd files are not always considered executable in cygwin causing which
26219  # to not find them
26220  if test "x$new_path" = x \
26221           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26222           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26223    new_path=`$CYGPATH -u "$path"`
26224  fi
26225  if test "x$new_path" = x; then
26226    # Oops. Which didn't find the executable.
26227    # The splitting of arguments from the executable at a space might have been incorrect,
26228    # since paths with space are more likely in Windows. Give it another try with the whole
26229    # argument.
26230    path="$complete"
26231    arguments="EOL"
26232    new_path=`$CYGPATH -u "$path"`
26233    new_path=`$WHICH "$new_path" 2> /dev/null`
26234    # bat and cmd files are not always considered executable in cygwin causing which
26235    # to not find them
26236    if test "x$new_path" = x \
26237             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26238             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26239      new_path=`$CYGPATH -u "$path"`
26240    fi
26241    if test "x$new_path" = x; then
26242      # It's still not found. Now this is an unrecoverable error.
26243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26244$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26245      has_space=`$ECHO "$complete" | $GREP " "`
26246      if test "x$has_space" != x; then
26247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26249      fi
26250      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26251    fi
26252  fi
26253
26254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26257  # "foo.exe" is OK but "foo" is an error.
26258  #
26259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26260  # It is also a way to make sure we got the proper file name for the real test later on.
26261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26262  if test "x$test_shortpath" = x; then
26263    # Short path failed, file does not exist as specified.
26264    # Try adding .exe or .cmd
26265    if test -f "${new_path}.exe"; then
26266       input_to_shortpath="${new_path}.exe"
26267    elif test -f "${new_path}.cmd"; then
26268       input_to_shortpath="${new_path}.cmd"
26269    else
26270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26271$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26272      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26273$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26274      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26275    fi
26276  else
26277    input_to_shortpath="$new_path"
26278  fi
26279
26280  # Call helper function which possibly converts this using DOS-style short mode.
26281  # If so, the updated path is stored in $new_path.
26282  new_path="$input_to_shortpath"
26283
26284  input_path="$input_to_shortpath"
26285  # Check if we need to convert this using DOS-style short mode. If the path
26286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26287  # take no chances and rewrite it.
26288  # Note: m4 eats our [], so we need to use [ and ] instead.
26289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26290  if test "x$has_forbidden_chars" != x; then
26291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26295      # Going to short mode and back again did indeed matter. Since short mode is
26296      # case insensitive, let's make it lowercase to improve readability.
26297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26298      # Now convert it back to Unix-stile (cygpath)
26299      input_path=`$CYGPATH -u "$shortmode_path"`
26300      new_path="$input_path"
26301    fi
26302  fi
26303
26304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26305  if test "x$test_cygdrive_prefix" = x; then
26306    # As a simple fix, exclude /usr/bin since it's not a real path.
26307    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26309      # a path prefixed by /cygdrive for fixpath to work.
26310      new_path="$CYGWIN_ROOT_PATH$input_path"
26311    fi
26312  fi
26313
26314  # remove trailing .exe if any
26315  new_path="${new_path/%.exe/}"
26316
26317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26318
26319  # First separate the path from the arguments. This will split at the first
26320  # space.
26321  complete="$MCS"
26322  path="${complete%% *}"
26323  tmp="$complete EOL"
26324  arguments="${tmp#* }"
26325
26326  # Input might be given as Windows format, start by converting to
26327  # unix format.
26328  new_path="$path"
26329
26330  windows_path="$new_path"
26331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26332    unix_path=`$CYGPATH -u "$windows_path"`
26333    new_path="$unix_path"
26334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26336    new_path="$unix_path"
26337  fi
26338
26339
26340  # Now try to locate executable using which
26341  new_path=`$WHICH "$new_path" 2> /dev/null`
26342
26343  if test "x$new_path" = x; then
26344    # Oops. Which didn't find the executable.
26345    # The splitting of arguments from the executable at a space might have been incorrect,
26346    # since paths with space are more likely in Windows. Give it another try with the whole
26347    # argument.
26348    path="$complete"
26349    arguments="EOL"
26350    new_path="$path"
26351
26352  windows_path="$new_path"
26353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26354    unix_path=`$CYGPATH -u "$windows_path"`
26355    new_path="$unix_path"
26356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26358    new_path="$unix_path"
26359  fi
26360
26361
26362    new_path=`$WHICH "$new_path" 2> /dev/null`
26363
26364    if test "x$new_path" = x; then
26365      # It's still not found. Now this is an unrecoverable error.
26366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26367$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26368      has_space=`$ECHO "$complete" | $GREP " "`
26369      if test "x$has_space" != x; then
26370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26372      fi
26373      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26374    fi
26375  fi
26376
26377  # Now new_path has a complete unix path to the binary
26378  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26379    # Keep paths in /bin as-is, but remove trailing .exe if any
26380    new_path="${new_path/%.exe/}"
26381    # Do not save /bin paths to all_fixpath_prefixes!
26382  else
26383    # Not in mixed or Windows style, start by that.
26384    new_path=`cmd //c echo $new_path`
26385
26386  input_path="$new_path"
26387  # Check if we need to convert this using DOS-style short mode. If the path
26388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26389  # take no chances and rewrite it.
26390  # Note: m4 eats our [], so we need to use [ and ] instead.
26391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26392  if test "x$has_forbidden_chars" != x; then
26393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26395  fi
26396
26397    # Output is in $new_path
26398
26399  windows_path="$new_path"
26400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26401    unix_path=`$CYGPATH -u "$windows_path"`
26402    new_path="$unix_path"
26403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26405    new_path="$unix_path"
26406  fi
26407
26408    # remove trailing .exe if any
26409    new_path="${new_path/%.exe/}"
26410
26411    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26412    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26413  fi
26414
26415  else
26416    # We're on a posix platform. Hooray! :)
26417    # First separate the path from the arguments. This will split at the first
26418    # space.
26419    complete="$MCS"
26420    path="${complete%% *}"
26421    tmp="$complete EOL"
26422    arguments="${tmp#* }"
26423
26424    # Cannot rely on the command "which" here since it doesn't always work.
26425    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26426    if test -z "$is_absolute_path"; then
26427      # Path to executable is not absolute. Find it.
26428      IFS_save="$IFS"
26429      IFS=:
26430      for p in $PATH; do
26431        if test -f "$p/$path" && test -x "$p/$path"; then
26432          new_path="$p/$path"
26433          break
26434        fi
26435      done
26436      IFS="$IFS_save"
26437    else
26438      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26439$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26440      new_path="$path"
26441    fi
26442
26443    if test "x$new_path" = x; then
26444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26445$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26446        has_space=`$ECHO "$complete" | $GREP " "`
26447        if test "x$has_space" != x; then
26448          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26450        fi
26451        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26452      fi
26453  fi
26454
26455      # Now join together the path and the arguments once again
26456      if test "x$arguments" != xEOL; then
26457        new_complete="$new_path ${arguments% *}"
26458      else
26459        new_complete="$new_path"
26460      fi
26461
26462  if test "x$complete" != "x$new_complete"; then
26463      MCS="$new_complete"
26464      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26465$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26466    fi
26467
26468elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26469    if test -n "$ac_tool_prefix"; then
26470  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26471set dummy ${ac_tool_prefix}nm; ac_word=$2
26472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26473$as_echo_n "checking for $ac_word... " >&6; }
26474if test "${ac_cv_prog_NM+set}" = set; then :
26475  $as_echo_n "(cached) " >&6
26476else
26477  if test -n "$NM"; then
26478  ac_cv_prog_NM="$NM" # Let the user override the test.
26479else
26480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26481for as_dir in $PATH
26482do
26483  IFS=$as_save_IFS
26484  test -z "$as_dir" && as_dir=.
26485    for ac_exec_ext in '' $ac_executable_extensions; do
26486  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26487    ac_cv_prog_NM="${ac_tool_prefix}nm"
26488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26489    break 2
26490  fi
26491done
26492  done
26493IFS=$as_save_IFS
26494
26495fi
26496fi
26497NM=$ac_cv_prog_NM
26498if test -n "$NM"; then
26499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26500$as_echo "$NM" >&6; }
26501else
26502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26503$as_echo "no" >&6; }
26504fi
26505
26506
26507fi
26508if test -z "$ac_cv_prog_NM"; then
26509  ac_ct_NM=$NM
26510  # Extract the first word of "nm", so it can be a program name with args.
26511set dummy nm; ac_word=$2
26512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26513$as_echo_n "checking for $ac_word... " >&6; }
26514if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26515  $as_echo_n "(cached) " >&6
26516else
26517  if test -n "$ac_ct_NM"; then
26518  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26519else
26520as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26521for as_dir in $PATH
26522do
26523  IFS=$as_save_IFS
26524  test -z "$as_dir" && as_dir=.
26525    for ac_exec_ext in '' $ac_executable_extensions; do
26526  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26527    ac_cv_prog_ac_ct_NM="nm"
26528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26529    break 2
26530  fi
26531done
26532  done
26533IFS=$as_save_IFS
26534
26535fi
26536fi
26537ac_ct_NM=$ac_cv_prog_ac_ct_NM
26538if test -n "$ac_ct_NM"; then
26539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26540$as_echo "$ac_ct_NM" >&6; }
26541else
26542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26543$as_echo "no" >&6; }
26544fi
26545
26546  if test "x$ac_ct_NM" = x; then
26547    NM=""
26548  else
26549    case $cross_compiling:$ac_tool_warned in
26550yes:)
26551{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26552$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26553ac_tool_warned=yes ;;
26554esac
26555    NM=$ac_ct_NM
26556  fi
26557else
26558  NM="$ac_cv_prog_NM"
26559fi
26560
26561
26562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26563
26564  # First separate the path from the arguments. This will split at the first
26565  # space.
26566  complete="$NM"
26567  path="${complete%% *}"
26568  tmp="$complete EOL"
26569  arguments="${tmp#* }"
26570
26571  # Input might be given as Windows format, start by converting to
26572  # unix format.
26573  new_path=`$CYGPATH -u "$path"`
26574
26575  # Now try to locate executable using which
26576  new_path=`$WHICH "$new_path" 2> /dev/null`
26577  # bat and cmd files are not always considered executable in cygwin causing which
26578  # to not find them
26579  if test "x$new_path" = x \
26580           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26581           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26582    new_path=`$CYGPATH -u "$path"`
26583  fi
26584  if test "x$new_path" = x; then
26585    # Oops. Which didn't find the executable.
26586    # The splitting of arguments from the executable at a space might have been incorrect,
26587    # since paths with space are more likely in Windows. Give it another try with the whole
26588    # argument.
26589    path="$complete"
26590    arguments="EOL"
26591    new_path=`$CYGPATH -u "$path"`
26592    new_path=`$WHICH "$new_path" 2> /dev/null`
26593    # bat and cmd files are not always considered executable in cygwin causing which
26594    # to not find them
26595    if test "x$new_path" = x \
26596             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26597             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26598      new_path=`$CYGPATH -u "$path"`
26599    fi
26600    if test "x$new_path" = x; then
26601      # It's still not found. Now this is an unrecoverable error.
26602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26603$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26604      has_space=`$ECHO "$complete" | $GREP " "`
26605      if test "x$has_space" != x; then
26606        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26607$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26608      fi
26609      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26610    fi
26611  fi
26612
26613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26616  # "foo.exe" is OK but "foo" is an error.
26617  #
26618  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26619  # It is also a way to make sure we got the proper file name for the real test later on.
26620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26621  if test "x$test_shortpath" = x; then
26622    # Short path failed, file does not exist as specified.
26623    # Try adding .exe or .cmd
26624    if test -f "${new_path}.exe"; then
26625       input_to_shortpath="${new_path}.exe"
26626    elif test -f "${new_path}.cmd"; then
26627       input_to_shortpath="${new_path}.cmd"
26628    else
26629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26630$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26631      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26632$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26633      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26634    fi
26635  else
26636    input_to_shortpath="$new_path"
26637  fi
26638
26639  # Call helper function which possibly converts this using DOS-style short mode.
26640  # If so, the updated path is stored in $new_path.
26641  new_path="$input_to_shortpath"
26642
26643  input_path="$input_to_shortpath"
26644  # Check if we need to convert this using DOS-style short mode. If the path
26645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26646  # take no chances and rewrite it.
26647  # Note: m4 eats our [], so we need to use [ and ] instead.
26648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26649  if test "x$has_forbidden_chars" != x; then
26650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26651    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26652    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26653    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26654      # Going to short mode and back again did indeed matter. Since short mode is
26655      # case insensitive, let's make it lowercase to improve readability.
26656      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26657      # Now convert it back to Unix-stile (cygpath)
26658      input_path=`$CYGPATH -u "$shortmode_path"`
26659      new_path="$input_path"
26660    fi
26661  fi
26662
26663  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26664  if test "x$test_cygdrive_prefix" = x; then
26665    # As a simple fix, exclude /usr/bin since it's not a real path.
26666    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26667      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26668      # a path prefixed by /cygdrive for fixpath to work.
26669      new_path="$CYGWIN_ROOT_PATH$input_path"
26670    fi
26671  fi
26672
26673  # remove trailing .exe if any
26674  new_path="${new_path/%.exe/}"
26675
26676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26677
26678  # First separate the path from the arguments. This will split at the first
26679  # space.
26680  complete="$NM"
26681  path="${complete%% *}"
26682  tmp="$complete EOL"
26683  arguments="${tmp#* }"
26684
26685  # Input might be given as Windows format, start by converting to
26686  # unix format.
26687  new_path="$path"
26688
26689  windows_path="$new_path"
26690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26691    unix_path=`$CYGPATH -u "$windows_path"`
26692    new_path="$unix_path"
26693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26695    new_path="$unix_path"
26696  fi
26697
26698
26699  # Now try to locate executable using which
26700  new_path=`$WHICH "$new_path" 2> /dev/null`
26701
26702  if test "x$new_path" = x; then
26703    # Oops. Which didn't find the executable.
26704    # The splitting of arguments from the executable at a space might have been incorrect,
26705    # since paths with space are more likely in Windows. Give it another try with the whole
26706    # argument.
26707    path="$complete"
26708    arguments="EOL"
26709    new_path="$path"
26710
26711  windows_path="$new_path"
26712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26713    unix_path=`$CYGPATH -u "$windows_path"`
26714    new_path="$unix_path"
26715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26717    new_path="$unix_path"
26718  fi
26719
26720
26721    new_path=`$WHICH "$new_path" 2> /dev/null`
26722
26723    if test "x$new_path" = x; then
26724      # It's still not found. Now this is an unrecoverable error.
26725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26726$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26727      has_space=`$ECHO "$complete" | $GREP " "`
26728      if test "x$has_space" != x; then
26729        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26731      fi
26732      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26733    fi
26734  fi
26735
26736  # Now new_path has a complete unix path to the binary
26737  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26738    # Keep paths in /bin as-is, but remove trailing .exe if any
26739    new_path="${new_path/%.exe/}"
26740    # Do not save /bin paths to all_fixpath_prefixes!
26741  else
26742    # Not in mixed or Windows style, start by that.
26743    new_path=`cmd //c echo $new_path`
26744
26745  input_path="$new_path"
26746  # Check if we need to convert this using DOS-style short mode. If the path
26747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26748  # take no chances and rewrite it.
26749  # Note: m4 eats our [], so we need to use [ and ] instead.
26750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26751  if test "x$has_forbidden_chars" != x; then
26752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26753    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26754  fi
26755
26756    # Output is in $new_path
26757
26758  windows_path="$new_path"
26759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26760    unix_path=`$CYGPATH -u "$windows_path"`
26761    new_path="$unix_path"
26762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26764    new_path="$unix_path"
26765  fi
26766
26767    # remove trailing .exe if any
26768    new_path="${new_path/%.exe/}"
26769
26770    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26771    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26772  fi
26773
26774  else
26775    # We're on a posix platform. Hooray! :)
26776    # First separate the path from the arguments. This will split at the first
26777    # space.
26778    complete="$NM"
26779    path="${complete%% *}"
26780    tmp="$complete EOL"
26781    arguments="${tmp#* }"
26782
26783    # Cannot rely on the command "which" here since it doesn't always work.
26784    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26785    if test -z "$is_absolute_path"; then
26786      # Path to executable is not absolute. Find it.
26787      IFS_save="$IFS"
26788      IFS=:
26789      for p in $PATH; do
26790        if test -f "$p/$path" && test -x "$p/$path"; then
26791          new_path="$p/$path"
26792          break
26793        fi
26794      done
26795      IFS="$IFS_save"
26796    else
26797      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26798$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26799      new_path="$path"
26800    fi
26801
26802    if test "x$new_path" = x; then
26803        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26804$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26805        has_space=`$ECHO "$complete" | $GREP " "`
26806        if test "x$has_space" != x; then
26807          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26808$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26809        fi
26810        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26811      fi
26812  fi
26813
26814      # Now join together the path and the arguments once again
26815      if test "x$arguments" != xEOL; then
26816        new_complete="$new_path ${arguments% *}"
26817      else
26818        new_complete="$new_path"
26819      fi
26820
26821  if test "x$complete" != "x$new_complete"; then
26822      NM="$new_complete"
26823      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26824$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26825    fi
26826
26827    GNM="$NM"
26828
26829    if test -n "$ac_tool_prefix"; then
26830  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26831set dummy ${ac_tool_prefix}strip; ac_word=$2
26832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26833$as_echo_n "checking for $ac_word... " >&6; }
26834if test "${ac_cv_prog_STRIP+set}" = set; then :
26835  $as_echo_n "(cached) " >&6
26836else
26837  if test -n "$STRIP"; then
26838  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26839else
26840as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26841for as_dir in $PATH
26842do
26843  IFS=$as_save_IFS
26844  test -z "$as_dir" && as_dir=.
26845    for ac_exec_ext in '' $ac_executable_extensions; do
26846  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26847    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26849    break 2
26850  fi
26851done
26852  done
26853IFS=$as_save_IFS
26854
26855fi
26856fi
26857STRIP=$ac_cv_prog_STRIP
26858if test -n "$STRIP"; then
26859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26860$as_echo "$STRIP" >&6; }
26861else
26862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26863$as_echo "no" >&6; }
26864fi
26865
26866
26867fi
26868if test -z "$ac_cv_prog_STRIP"; then
26869  ac_ct_STRIP=$STRIP
26870  # Extract the first word of "strip", so it can be a program name with args.
26871set dummy strip; ac_word=$2
26872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26873$as_echo_n "checking for $ac_word... " >&6; }
26874if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
26875  $as_echo_n "(cached) " >&6
26876else
26877  if test -n "$ac_ct_STRIP"; then
26878  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26879else
26880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26881for as_dir in $PATH
26882do
26883  IFS=$as_save_IFS
26884  test -z "$as_dir" && as_dir=.
26885    for ac_exec_ext in '' $ac_executable_extensions; do
26886  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26887    ac_cv_prog_ac_ct_STRIP="strip"
26888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26889    break 2
26890  fi
26891done
26892  done
26893IFS=$as_save_IFS
26894
26895fi
26896fi
26897ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26898if test -n "$ac_ct_STRIP"; then
26899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26900$as_echo "$ac_ct_STRIP" >&6; }
26901else
26902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26903$as_echo "no" >&6; }
26904fi
26905
26906  if test "x$ac_ct_STRIP" = x; then
26907    STRIP=""
26908  else
26909    case $cross_compiling:$ac_tool_warned in
26910yes:)
26911{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26912$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26913ac_tool_warned=yes ;;
26914esac
26915    STRIP=$ac_ct_STRIP
26916  fi
26917else
26918  STRIP="$ac_cv_prog_STRIP"
26919fi
26920
26921
26922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26923
26924  # First separate the path from the arguments. This will split at the first
26925  # space.
26926  complete="$STRIP"
26927  path="${complete%% *}"
26928  tmp="$complete EOL"
26929  arguments="${tmp#* }"
26930
26931  # Input might be given as Windows format, start by converting to
26932  # unix format.
26933  new_path=`$CYGPATH -u "$path"`
26934
26935  # Now try to locate executable using which
26936  new_path=`$WHICH "$new_path" 2> /dev/null`
26937  # bat and cmd files are not always considered executable in cygwin causing which
26938  # to not find them
26939  if test "x$new_path" = x \
26940           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26941           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26942    new_path=`$CYGPATH -u "$path"`
26943  fi
26944  if test "x$new_path" = x; then
26945    # Oops. Which didn't find the executable.
26946    # The splitting of arguments from the executable at a space might have been incorrect,
26947    # since paths with space are more likely in Windows. Give it another try with the whole
26948    # argument.
26949    path="$complete"
26950    arguments="EOL"
26951    new_path=`$CYGPATH -u "$path"`
26952    new_path=`$WHICH "$new_path" 2> /dev/null`
26953    # bat and cmd files are not always considered executable in cygwin causing which
26954    # to not find them
26955    if test "x$new_path" = x \
26956             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26957             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26958      new_path=`$CYGPATH -u "$path"`
26959    fi
26960    if test "x$new_path" = x; then
26961      # It's still not found. Now this is an unrecoverable error.
26962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26963$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26964      has_space=`$ECHO "$complete" | $GREP " "`
26965      if test "x$has_space" != x; then
26966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26968      fi
26969      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26970    fi
26971  fi
26972
26973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26976  # "foo.exe" is OK but "foo" is an error.
26977  #
26978  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26979  # It is also a way to make sure we got the proper file name for the real test later on.
26980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26981  if test "x$test_shortpath" = x; then
26982    # Short path failed, file does not exist as specified.
26983    # Try adding .exe or .cmd
26984    if test -f "${new_path}.exe"; then
26985       input_to_shortpath="${new_path}.exe"
26986    elif test -f "${new_path}.cmd"; then
26987       input_to_shortpath="${new_path}.cmd"
26988    else
26989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26990$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26991      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26992$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26993      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26994    fi
26995  else
26996    input_to_shortpath="$new_path"
26997  fi
26998
26999  # Call helper function which possibly converts this using DOS-style short mode.
27000  # If so, the updated path is stored in $new_path.
27001  new_path="$input_to_shortpath"
27002
27003  input_path="$input_to_shortpath"
27004  # Check if we need to convert this using DOS-style short mode. If the path
27005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27006  # take no chances and rewrite it.
27007  # Note: m4 eats our [], so we need to use [ and ] instead.
27008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27009  if test "x$has_forbidden_chars" != x; then
27010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27014      # Going to short mode and back again did indeed matter. Since short mode is
27015      # case insensitive, let's make it lowercase to improve readability.
27016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27017      # Now convert it back to Unix-stile (cygpath)
27018      input_path=`$CYGPATH -u "$shortmode_path"`
27019      new_path="$input_path"
27020    fi
27021  fi
27022
27023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27024  if test "x$test_cygdrive_prefix" = x; then
27025    # As a simple fix, exclude /usr/bin since it's not a real path.
27026    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27028      # a path prefixed by /cygdrive for fixpath to work.
27029      new_path="$CYGWIN_ROOT_PATH$input_path"
27030    fi
27031  fi
27032
27033  # remove trailing .exe if any
27034  new_path="${new_path/%.exe/}"
27035
27036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27037
27038  # First separate the path from the arguments. This will split at the first
27039  # space.
27040  complete="$STRIP"
27041  path="${complete%% *}"
27042  tmp="$complete EOL"
27043  arguments="${tmp#* }"
27044
27045  # Input might be given as Windows format, start by converting to
27046  # unix format.
27047  new_path="$path"
27048
27049  windows_path="$new_path"
27050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27051    unix_path=`$CYGPATH -u "$windows_path"`
27052    new_path="$unix_path"
27053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27055    new_path="$unix_path"
27056  fi
27057
27058
27059  # Now try to locate executable using which
27060  new_path=`$WHICH "$new_path" 2> /dev/null`
27061
27062  if test "x$new_path" = x; then
27063    # Oops. Which didn't find the executable.
27064    # The splitting of arguments from the executable at a space might have been incorrect,
27065    # since paths with space are more likely in Windows. Give it another try with the whole
27066    # argument.
27067    path="$complete"
27068    arguments="EOL"
27069    new_path="$path"
27070
27071  windows_path="$new_path"
27072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27073    unix_path=`$CYGPATH -u "$windows_path"`
27074    new_path="$unix_path"
27075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27077    new_path="$unix_path"
27078  fi
27079
27080
27081    new_path=`$WHICH "$new_path" 2> /dev/null`
27082
27083    if test "x$new_path" = x; then
27084      # It's still not found. Now this is an unrecoverable error.
27085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27086$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27087      has_space=`$ECHO "$complete" | $GREP " "`
27088      if test "x$has_space" != x; then
27089        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27090$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27091      fi
27092      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27093    fi
27094  fi
27095
27096  # Now new_path has a complete unix path to the binary
27097  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27098    # Keep paths in /bin as-is, but remove trailing .exe if any
27099    new_path="${new_path/%.exe/}"
27100    # Do not save /bin paths to all_fixpath_prefixes!
27101  else
27102    # Not in mixed or Windows style, start by that.
27103    new_path=`cmd //c echo $new_path`
27104
27105  input_path="$new_path"
27106  # Check if we need to convert this using DOS-style short mode. If the path
27107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27108  # take no chances and rewrite it.
27109  # Note: m4 eats our [], so we need to use [ and ] instead.
27110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27111  if test "x$has_forbidden_chars" != x; then
27112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27113    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27114  fi
27115
27116    # Output is in $new_path
27117
27118  windows_path="$new_path"
27119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27120    unix_path=`$CYGPATH -u "$windows_path"`
27121    new_path="$unix_path"
27122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27124    new_path="$unix_path"
27125  fi
27126
27127    # remove trailing .exe if any
27128    new_path="${new_path/%.exe/}"
27129
27130    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27131    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27132  fi
27133
27134  else
27135    # We're on a posix platform. Hooray! :)
27136    # First separate the path from the arguments. This will split at the first
27137    # space.
27138    complete="$STRIP"
27139    path="${complete%% *}"
27140    tmp="$complete EOL"
27141    arguments="${tmp#* }"
27142
27143    # Cannot rely on the command "which" here since it doesn't always work.
27144    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27145    if test -z "$is_absolute_path"; then
27146      # Path to executable is not absolute. Find it.
27147      IFS_save="$IFS"
27148      IFS=:
27149      for p in $PATH; do
27150        if test -f "$p/$path" && test -x "$p/$path"; then
27151          new_path="$p/$path"
27152          break
27153        fi
27154      done
27155      IFS="$IFS_save"
27156    else
27157      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27158$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27159      new_path="$path"
27160    fi
27161
27162    if test "x$new_path" = x; then
27163        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27164$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27165        has_space=`$ECHO "$complete" | $GREP " "`
27166        if test "x$has_space" != x; then
27167          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27168$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27169        fi
27170        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27171      fi
27172  fi
27173
27174      # Now join together the path and the arguments once again
27175      if test "x$arguments" != xEOL; then
27176        new_complete="$new_path ${arguments% *}"
27177      else
27178        new_complete="$new_path"
27179      fi
27180
27181  if test "x$complete" != "x$new_complete"; then
27182      STRIP="$new_complete"
27183      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27184$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27185    fi
27186
27187fi
27188
27189# objcopy is used for moving debug symbols to separate files when
27190# full debug symbols are enabled.
27191if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27192    if test -n "$ac_tool_prefix"; then
27193  for ac_prog in gobjcopy objcopy
27194  do
27195    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27196set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27198$as_echo_n "checking for $ac_word... " >&6; }
27199if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
27200  $as_echo_n "(cached) " >&6
27201else
27202  if test -n "$OBJCOPY"; then
27203  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27204else
27205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27206for as_dir in $PATH
27207do
27208  IFS=$as_save_IFS
27209  test -z "$as_dir" && as_dir=.
27210    for ac_exec_ext in '' $ac_executable_extensions; do
27211  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27212    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27214    break 2
27215  fi
27216done
27217  done
27218IFS=$as_save_IFS
27219
27220fi
27221fi
27222OBJCOPY=$ac_cv_prog_OBJCOPY
27223if test -n "$OBJCOPY"; then
27224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27225$as_echo "$OBJCOPY" >&6; }
27226else
27227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27228$as_echo "no" >&6; }
27229fi
27230
27231
27232    test -n "$OBJCOPY" && break
27233  done
27234fi
27235if test -z "$OBJCOPY"; then
27236  ac_ct_OBJCOPY=$OBJCOPY
27237  for ac_prog in gobjcopy objcopy
27238do
27239  # Extract the first word of "$ac_prog", so it can be a program name with args.
27240set dummy $ac_prog; ac_word=$2
27241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27242$as_echo_n "checking for $ac_word... " >&6; }
27243if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
27244  $as_echo_n "(cached) " >&6
27245else
27246  if test -n "$ac_ct_OBJCOPY"; then
27247  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27248else
27249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27250for as_dir in $PATH
27251do
27252  IFS=$as_save_IFS
27253  test -z "$as_dir" && as_dir=.
27254    for ac_exec_ext in '' $ac_executable_extensions; do
27255  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27256    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27258    break 2
27259  fi
27260done
27261  done
27262IFS=$as_save_IFS
27263
27264fi
27265fi
27266ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27267if test -n "$ac_ct_OBJCOPY"; then
27268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27269$as_echo "$ac_ct_OBJCOPY" >&6; }
27270else
27271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27272$as_echo "no" >&6; }
27273fi
27274
27275
27276  test -n "$ac_ct_OBJCOPY" && break
27277done
27278
27279  if test "x$ac_ct_OBJCOPY" = x; then
27280    OBJCOPY=""
27281  else
27282    case $cross_compiling:$ac_tool_warned in
27283yes:)
27284{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27285$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27286ac_tool_warned=yes ;;
27287esac
27288    OBJCOPY=$ac_ct_OBJCOPY
27289  fi
27290fi
27291
27292    # Only call fixup if objcopy was found.
27293    if test -n "$OBJCOPY"; then
27294
27295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27296
27297  # First separate the path from the arguments. This will split at the first
27298  # space.
27299  complete="$OBJCOPY"
27300  path="${complete%% *}"
27301  tmp="$complete EOL"
27302  arguments="${tmp#* }"
27303
27304  # Input might be given as Windows format, start by converting to
27305  # unix format.
27306  new_path=`$CYGPATH -u "$path"`
27307
27308  # Now try to locate executable using which
27309  new_path=`$WHICH "$new_path" 2> /dev/null`
27310  # bat and cmd files are not always considered executable in cygwin causing which
27311  # to not find them
27312  if test "x$new_path" = x \
27313           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27314           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27315    new_path=`$CYGPATH -u "$path"`
27316  fi
27317  if test "x$new_path" = x; then
27318    # Oops. Which didn't find the executable.
27319    # The splitting of arguments from the executable at a space might have been incorrect,
27320    # since paths with space are more likely in Windows. Give it another try with the whole
27321    # argument.
27322    path="$complete"
27323    arguments="EOL"
27324    new_path=`$CYGPATH -u "$path"`
27325    new_path=`$WHICH "$new_path" 2> /dev/null`
27326    # bat and cmd files are not always considered executable in cygwin causing which
27327    # to not find them
27328    if test "x$new_path" = x \
27329             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27330             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27331      new_path=`$CYGPATH -u "$path"`
27332    fi
27333    if test "x$new_path" = x; then
27334      # It's still not found. Now this is an unrecoverable error.
27335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27336$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27337      has_space=`$ECHO "$complete" | $GREP " "`
27338      if test "x$has_space" != x; then
27339        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27340$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27341      fi
27342      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27343    fi
27344  fi
27345
27346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27349  # "foo.exe" is OK but "foo" is an error.
27350  #
27351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27352  # It is also a way to make sure we got the proper file name for the real test later on.
27353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27354  if test "x$test_shortpath" = x; then
27355    # Short path failed, file does not exist as specified.
27356    # Try adding .exe or .cmd
27357    if test -f "${new_path}.exe"; then
27358       input_to_shortpath="${new_path}.exe"
27359    elif test -f "${new_path}.cmd"; then
27360       input_to_shortpath="${new_path}.cmd"
27361    else
27362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27363$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27364      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27365$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27366      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27367    fi
27368  else
27369    input_to_shortpath="$new_path"
27370  fi
27371
27372  # Call helper function which possibly converts this using DOS-style short mode.
27373  # If so, the updated path is stored in $new_path.
27374  new_path="$input_to_shortpath"
27375
27376  input_path="$input_to_shortpath"
27377  # Check if we need to convert this using DOS-style short mode. If the path
27378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27379  # take no chances and rewrite it.
27380  # Note: m4 eats our [], so we need to use [ and ] instead.
27381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27382  if test "x$has_forbidden_chars" != x; then
27383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27384    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27385    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27386    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27387      # Going to short mode and back again did indeed matter. Since short mode is
27388      # case insensitive, let's make it lowercase to improve readability.
27389      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27390      # Now convert it back to Unix-stile (cygpath)
27391      input_path=`$CYGPATH -u "$shortmode_path"`
27392      new_path="$input_path"
27393    fi
27394  fi
27395
27396  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27397  if test "x$test_cygdrive_prefix" = x; then
27398    # As a simple fix, exclude /usr/bin since it's not a real path.
27399    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27400      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27401      # a path prefixed by /cygdrive for fixpath to work.
27402      new_path="$CYGWIN_ROOT_PATH$input_path"
27403    fi
27404  fi
27405
27406  # remove trailing .exe if any
27407  new_path="${new_path/%.exe/}"
27408
27409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27410
27411  # First separate the path from the arguments. This will split at the first
27412  # space.
27413  complete="$OBJCOPY"
27414  path="${complete%% *}"
27415  tmp="$complete EOL"
27416  arguments="${tmp#* }"
27417
27418  # Input might be given as Windows format, start by converting to
27419  # unix format.
27420  new_path="$path"
27421
27422  windows_path="$new_path"
27423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27424    unix_path=`$CYGPATH -u "$windows_path"`
27425    new_path="$unix_path"
27426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27428    new_path="$unix_path"
27429  fi
27430
27431
27432  # Now try to locate executable using which
27433  new_path=`$WHICH "$new_path" 2> /dev/null`
27434
27435  if test "x$new_path" = x; then
27436    # Oops. Which didn't find the executable.
27437    # The splitting of arguments from the executable at a space might have been incorrect,
27438    # since paths with space are more likely in Windows. Give it another try with the whole
27439    # argument.
27440    path="$complete"
27441    arguments="EOL"
27442    new_path="$path"
27443
27444  windows_path="$new_path"
27445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27446    unix_path=`$CYGPATH -u "$windows_path"`
27447    new_path="$unix_path"
27448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27450    new_path="$unix_path"
27451  fi
27452
27453
27454    new_path=`$WHICH "$new_path" 2> /dev/null`
27455
27456    if test "x$new_path" = x; then
27457      # It's still not found. Now this is an unrecoverable error.
27458      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27459$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27460      has_space=`$ECHO "$complete" | $GREP " "`
27461      if test "x$has_space" != x; then
27462        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27463$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27464      fi
27465      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27466    fi
27467  fi
27468
27469  # Now new_path has a complete unix path to the binary
27470  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27471    # Keep paths in /bin as-is, but remove trailing .exe if any
27472    new_path="${new_path/%.exe/}"
27473    # Do not save /bin paths to all_fixpath_prefixes!
27474  else
27475    # Not in mixed or Windows style, start by that.
27476    new_path=`cmd //c echo $new_path`
27477
27478  input_path="$new_path"
27479  # Check if we need to convert this using DOS-style short mode. If the path
27480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27481  # take no chances and rewrite it.
27482  # Note: m4 eats our [], so we need to use [ and ] instead.
27483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27484  if test "x$has_forbidden_chars" != x; then
27485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27486    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27487  fi
27488
27489    # Output is in $new_path
27490
27491  windows_path="$new_path"
27492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27493    unix_path=`$CYGPATH -u "$windows_path"`
27494    new_path="$unix_path"
27495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27497    new_path="$unix_path"
27498  fi
27499
27500    # remove trailing .exe if any
27501    new_path="${new_path/%.exe/}"
27502
27503    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27504    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27505  fi
27506
27507  else
27508    # We're on a posix platform. Hooray! :)
27509    # First separate the path from the arguments. This will split at the first
27510    # space.
27511    complete="$OBJCOPY"
27512    path="${complete%% *}"
27513    tmp="$complete EOL"
27514    arguments="${tmp#* }"
27515
27516    # Cannot rely on the command "which" here since it doesn't always work.
27517    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27518    if test -z "$is_absolute_path"; then
27519      # Path to executable is not absolute. Find it.
27520      IFS_save="$IFS"
27521      IFS=:
27522      for p in $PATH; do
27523        if test -f "$p/$path" && test -x "$p/$path"; then
27524          new_path="$p/$path"
27525          break
27526        fi
27527      done
27528      IFS="$IFS_save"
27529    else
27530      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27531$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27532      new_path="$path"
27533    fi
27534
27535    if test "x$new_path" = x; then
27536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27537$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27538        has_space=`$ECHO "$complete" | $GREP " "`
27539        if test "x$has_space" != x; then
27540          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27541$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27542        fi
27543        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27544      fi
27545  fi
27546
27547      # Now join together the path and the arguments once again
27548      if test "x$arguments" != xEOL; then
27549        new_complete="$new_path ${arguments% *}"
27550      else
27551        new_complete="$new_path"
27552      fi
27553
27554  if test "x$complete" != "x$new_complete"; then
27555      OBJCOPY="$new_complete"
27556      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27557$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27558    fi
27559
27560    fi
27561fi
27562
27563if test -n "$ac_tool_prefix"; then
27564  for ac_prog in gobjdump objdump
27565  do
27566    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27567set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27569$as_echo_n "checking for $ac_word... " >&6; }
27570if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
27571  $as_echo_n "(cached) " >&6
27572else
27573  if test -n "$OBJDUMP"; then
27574  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27575else
27576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27577for as_dir in $PATH
27578do
27579  IFS=$as_save_IFS
27580  test -z "$as_dir" && as_dir=.
27581    for ac_exec_ext in '' $ac_executable_extensions; do
27582  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27583    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27585    break 2
27586  fi
27587done
27588  done
27589IFS=$as_save_IFS
27590
27591fi
27592fi
27593OBJDUMP=$ac_cv_prog_OBJDUMP
27594if test -n "$OBJDUMP"; then
27595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27596$as_echo "$OBJDUMP" >&6; }
27597else
27598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27599$as_echo "no" >&6; }
27600fi
27601
27602
27603    test -n "$OBJDUMP" && break
27604  done
27605fi
27606if test -z "$OBJDUMP"; then
27607  ac_ct_OBJDUMP=$OBJDUMP
27608  for ac_prog in gobjdump objdump
27609do
27610  # Extract the first word of "$ac_prog", so it can be a program name with args.
27611set dummy $ac_prog; ac_word=$2
27612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27613$as_echo_n "checking for $ac_word... " >&6; }
27614if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
27615  $as_echo_n "(cached) " >&6
27616else
27617  if test -n "$ac_ct_OBJDUMP"; then
27618  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27619else
27620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27621for as_dir in $PATH
27622do
27623  IFS=$as_save_IFS
27624  test -z "$as_dir" && as_dir=.
27625    for ac_exec_ext in '' $ac_executable_extensions; do
27626  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27627    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27629    break 2
27630  fi
27631done
27632  done
27633IFS=$as_save_IFS
27634
27635fi
27636fi
27637ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27638if test -n "$ac_ct_OBJDUMP"; then
27639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27640$as_echo "$ac_ct_OBJDUMP" >&6; }
27641else
27642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27643$as_echo "no" >&6; }
27644fi
27645
27646
27647  test -n "$ac_ct_OBJDUMP" && break
27648done
27649
27650  if test "x$ac_ct_OBJDUMP" = x; then
27651    OBJDUMP=""
27652  else
27653    case $cross_compiling:$ac_tool_warned in
27654yes:)
27655{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27656$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27657ac_tool_warned=yes ;;
27658esac
27659    OBJDUMP=$ac_ct_OBJDUMP
27660  fi
27661fi
27662
27663if test "x$OBJDUMP" != x; then
27664  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27665
27666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27667
27668  # First separate the path from the arguments. This will split at the first
27669  # space.
27670  complete="$OBJDUMP"
27671  path="${complete%% *}"
27672  tmp="$complete EOL"
27673  arguments="${tmp#* }"
27674
27675  # Input might be given as Windows format, start by converting to
27676  # unix format.
27677  new_path=`$CYGPATH -u "$path"`
27678
27679  # Now try to locate executable using which
27680  new_path=`$WHICH "$new_path" 2> /dev/null`
27681  # bat and cmd files are not always considered executable in cygwin causing which
27682  # to not find them
27683  if test "x$new_path" = x \
27684           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27685           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27686    new_path=`$CYGPATH -u "$path"`
27687  fi
27688  if test "x$new_path" = x; then
27689    # Oops. Which didn't find the executable.
27690    # The splitting of arguments from the executable at a space might have been incorrect,
27691    # since paths with space are more likely in Windows. Give it another try with the whole
27692    # argument.
27693    path="$complete"
27694    arguments="EOL"
27695    new_path=`$CYGPATH -u "$path"`
27696    new_path=`$WHICH "$new_path" 2> /dev/null`
27697    # bat and cmd files are not always considered executable in cygwin causing which
27698    # to not find them
27699    if test "x$new_path" = x \
27700             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27701             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27702      new_path=`$CYGPATH -u "$path"`
27703    fi
27704    if test "x$new_path" = x; then
27705      # It's still not found. Now this is an unrecoverable error.
27706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27707$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27708      has_space=`$ECHO "$complete" | $GREP " "`
27709      if test "x$has_space" != x; then
27710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27712      fi
27713      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27714    fi
27715  fi
27716
27717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27720  # "foo.exe" is OK but "foo" is an error.
27721  #
27722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27723  # It is also a way to make sure we got the proper file name for the real test later on.
27724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27725  if test "x$test_shortpath" = x; then
27726    # Short path failed, file does not exist as specified.
27727    # Try adding .exe or .cmd
27728    if test -f "${new_path}.exe"; then
27729       input_to_shortpath="${new_path}.exe"
27730    elif test -f "${new_path}.cmd"; then
27731       input_to_shortpath="${new_path}.cmd"
27732    else
27733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27734$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27735      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27736$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27737      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27738    fi
27739  else
27740    input_to_shortpath="$new_path"
27741  fi
27742
27743  # Call helper function which possibly converts this using DOS-style short mode.
27744  # If so, the updated path is stored in $new_path.
27745  new_path="$input_to_shortpath"
27746
27747  input_path="$input_to_shortpath"
27748  # Check if we need to convert this using DOS-style short mode. If the path
27749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27750  # take no chances and rewrite it.
27751  # Note: m4 eats our [], so we need to use [ and ] instead.
27752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27753  if test "x$has_forbidden_chars" != x; then
27754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27758      # Going to short mode and back again did indeed matter. Since short mode is
27759      # case insensitive, let's make it lowercase to improve readability.
27760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27761      # Now convert it back to Unix-stile (cygpath)
27762      input_path=`$CYGPATH -u "$shortmode_path"`
27763      new_path="$input_path"
27764    fi
27765  fi
27766
27767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27768  if test "x$test_cygdrive_prefix" = x; then
27769    # As a simple fix, exclude /usr/bin since it's not a real path.
27770    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27772      # a path prefixed by /cygdrive for fixpath to work.
27773      new_path="$CYGWIN_ROOT_PATH$input_path"
27774    fi
27775  fi
27776
27777  # remove trailing .exe if any
27778  new_path="${new_path/%.exe/}"
27779
27780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27781
27782  # First separate the path from the arguments. This will split at the first
27783  # space.
27784  complete="$OBJDUMP"
27785  path="${complete%% *}"
27786  tmp="$complete EOL"
27787  arguments="${tmp#* }"
27788
27789  # Input might be given as Windows format, start by converting to
27790  # unix format.
27791  new_path="$path"
27792
27793  windows_path="$new_path"
27794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27795    unix_path=`$CYGPATH -u "$windows_path"`
27796    new_path="$unix_path"
27797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27799    new_path="$unix_path"
27800  fi
27801
27802
27803  # Now try to locate executable using which
27804  new_path=`$WHICH "$new_path" 2> /dev/null`
27805
27806  if test "x$new_path" = x; then
27807    # Oops. Which didn't find the executable.
27808    # The splitting of arguments from the executable at a space might have been incorrect,
27809    # since paths with space are more likely in Windows. Give it another try with the whole
27810    # argument.
27811    path="$complete"
27812    arguments="EOL"
27813    new_path="$path"
27814
27815  windows_path="$new_path"
27816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27817    unix_path=`$CYGPATH -u "$windows_path"`
27818    new_path="$unix_path"
27819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27821    new_path="$unix_path"
27822  fi
27823
27824
27825    new_path=`$WHICH "$new_path" 2> /dev/null`
27826
27827    if test "x$new_path" = x; then
27828      # It's still not found. Now this is an unrecoverable error.
27829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27830$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27831      has_space=`$ECHO "$complete" | $GREP " "`
27832      if test "x$has_space" != x; then
27833        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27834$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27835      fi
27836      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27837    fi
27838  fi
27839
27840  # Now new_path has a complete unix path to the binary
27841  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27842    # Keep paths in /bin as-is, but remove trailing .exe if any
27843    new_path="${new_path/%.exe/}"
27844    # Do not save /bin paths to all_fixpath_prefixes!
27845  else
27846    # Not in mixed or Windows style, start by that.
27847    new_path=`cmd //c echo $new_path`
27848
27849  input_path="$new_path"
27850  # Check if we need to convert this using DOS-style short mode. If the path
27851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27852  # take no chances and rewrite it.
27853  # Note: m4 eats our [], so we need to use [ and ] instead.
27854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27855  if test "x$has_forbidden_chars" != x; then
27856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27858  fi
27859
27860    # Output is in $new_path
27861
27862  windows_path="$new_path"
27863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27864    unix_path=`$CYGPATH -u "$windows_path"`
27865    new_path="$unix_path"
27866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27868    new_path="$unix_path"
27869  fi
27870
27871    # remove trailing .exe if any
27872    new_path="${new_path/%.exe/}"
27873
27874    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27875    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27876  fi
27877
27878  else
27879    # We're on a posix platform. Hooray! :)
27880    # First separate the path from the arguments. This will split at the first
27881    # space.
27882    complete="$OBJDUMP"
27883    path="${complete%% *}"
27884    tmp="$complete EOL"
27885    arguments="${tmp#* }"
27886
27887    # Cannot rely on the command "which" here since it doesn't always work.
27888    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27889    if test -z "$is_absolute_path"; then
27890      # Path to executable is not absolute. Find it.
27891      IFS_save="$IFS"
27892      IFS=:
27893      for p in $PATH; do
27894        if test -f "$p/$path" && test -x "$p/$path"; then
27895          new_path="$p/$path"
27896          break
27897        fi
27898      done
27899      IFS="$IFS_save"
27900    else
27901      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27902$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27903      new_path="$path"
27904    fi
27905
27906    if test "x$new_path" = x; then
27907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27908$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27909        has_space=`$ECHO "$complete" | $GREP " "`
27910        if test "x$has_space" != x; then
27911          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27912$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27913        fi
27914        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27915      fi
27916  fi
27917
27918      # Now join together the path and the arguments once again
27919      if test "x$arguments" != xEOL; then
27920        new_complete="$new_path ${arguments% *}"
27921      else
27922        new_complete="$new_path"
27923      fi
27924
27925  if test "x$complete" != "x$new_complete"; then
27926      OBJDUMP="$new_complete"
27927      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27928$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27929    fi
27930
27931fi
27932
27933if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27934   # Extract the first word of "lipo", so it can be a program name with args.
27935set dummy lipo; ac_word=$2
27936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27937$as_echo_n "checking for $ac_word... " >&6; }
27938if test "${ac_cv_path_LIPO+set}" = set; then :
27939  $as_echo_n "(cached) " >&6
27940else
27941  case $LIPO in
27942  [\\/]* | ?:[\\/]*)
27943  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27944  ;;
27945  *)
27946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27947for as_dir in $PATH
27948do
27949  IFS=$as_save_IFS
27950  test -z "$as_dir" && as_dir=.
27951    for ac_exec_ext in '' $ac_executable_extensions; do
27952  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27953    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27955    break 2
27956  fi
27957done
27958  done
27959IFS=$as_save_IFS
27960
27961  ;;
27962esac
27963fi
27964LIPO=$ac_cv_path_LIPO
27965if test -n "$LIPO"; then
27966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27967$as_echo "$LIPO" >&6; }
27968else
27969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27970$as_echo "no" >&6; }
27971fi
27972
27973
27974
27975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27976
27977  # First separate the path from the arguments. This will split at the first
27978  # space.
27979  complete="$LIPO"
27980  path="${complete%% *}"
27981  tmp="$complete EOL"
27982  arguments="${tmp#* }"
27983
27984  # Input might be given as Windows format, start by converting to
27985  # unix format.
27986  new_path=`$CYGPATH -u "$path"`
27987
27988  # Now try to locate executable using which
27989  new_path=`$WHICH "$new_path" 2> /dev/null`
27990  # bat and cmd files are not always considered executable in cygwin causing which
27991  # to not find them
27992  if test "x$new_path" = x \
27993           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27994           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27995    new_path=`$CYGPATH -u "$path"`
27996  fi
27997  if test "x$new_path" = x; then
27998    # Oops. Which didn't find the executable.
27999    # The splitting of arguments from the executable at a space might have been incorrect,
28000    # since paths with space are more likely in Windows. Give it another try with the whole
28001    # argument.
28002    path="$complete"
28003    arguments="EOL"
28004    new_path=`$CYGPATH -u "$path"`
28005    new_path=`$WHICH "$new_path" 2> /dev/null`
28006    # bat and cmd files are not always considered executable in cygwin causing which
28007    # to not find them
28008    if test "x$new_path" = x \
28009             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28010             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28011      new_path=`$CYGPATH -u "$path"`
28012    fi
28013    if test "x$new_path" = x; then
28014      # It's still not found. Now this is an unrecoverable error.
28015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28016$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28017      has_space=`$ECHO "$complete" | $GREP " "`
28018      if test "x$has_space" != x; then
28019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28021      fi
28022      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28023    fi
28024  fi
28025
28026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28029  # "foo.exe" is OK but "foo" is an error.
28030  #
28031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28032  # It is also a way to make sure we got the proper file name for the real test later on.
28033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28034  if test "x$test_shortpath" = x; then
28035    # Short path failed, file does not exist as specified.
28036    # Try adding .exe or .cmd
28037    if test -f "${new_path}.exe"; then
28038       input_to_shortpath="${new_path}.exe"
28039    elif test -f "${new_path}.cmd"; then
28040       input_to_shortpath="${new_path}.cmd"
28041    else
28042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28043$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28044      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28045$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28046      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28047    fi
28048  else
28049    input_to_shortpath="$new_path"
28050  fi
28051
28052  # Call helper function which possibly converts this using DOS-style short mode.
28053  # If so, the updated path is stored in $new_path.
28054  new_path="$input_to_shortpath"
28055
28056  input_path="$input_to_shortpath"
28057  # Check if we need to convert this using DOS-style short mode. If the path
28058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28059  # take no chances and rewrite it.
28060  # Note: m4 eats our [], so we need to use [ and ] instead.
28061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28062  if test "x$has_forbidden_chars" != x; then
28063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28067      # Going to short mode and back again did indeed matter. Since short mode is
28068      # case insensitive, let's make it lowercase to improve readability.
28069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28070      # Now convert it back to Unix-stile (cygpath)
28071      input_path=`$CYGPATH -u "$shortmode_path"`
28072      new_path="$input_path"
28073    fi
28074  fi
28075
28076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28077  if test "x$test_cygdrive_prefix" = x; then
28078    # As a simple fix, exclude /usr/bin since it's not a real path.
28079    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28081      # a path prefixed by /cygdrive for fixpath to work.
28082      new_path="$CYGWIN_ROOT_PATH$input_path"
28083    fi
28084  fi
28085
28086  # remove trailing .exe if any
28087  new_path="${new_path/%.exe/}"
28088
28089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28090
28091  # First separate the path from the arguments. This will split at the first
28092  # space.
28093  complete="$LIPO"
28094  path="${complete%% *}"
28095  tmp="$complete EOL"
28096  arguments="${tmp#* }"
28097
28098  # Input might be given as Windows format, start by converting to
28099  # unix format.
28100  new_path="$path"
28101
28102  windows_path="$new_path"
28103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28104    unix_path=`$CYGPATH -u "$windows_path"`
28105    new_path="$unix_path"
28106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28108    new_path="$unix_path"
28109  fi
28110
28111
28112  # Now try to locate executable using which
28113  new_path=`$WHICH "$new_path" 2> /dev/null`
28114
28115  if test "x$new_path" = x; then
28116    # Oops. Which didn't find the executable.
28117    # The splitting of arguments from the executable at a space might have been incorrect,
28118    # since paths with space are more likely in Windows. Give it another try with the whole
28119    # argument.
28120    path="$complete"
28121    arguments="EOL"
28122    new_path="$path"
28123
28124  windows_path="$new_path"
28125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28126    unix_path=`$CYGPATH -u "$windows_path"`
28127    new_path="$unix_path"
28128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28130    new_path="$unix_path"
28131  fi
28132
28133
28134    new_path=`$WHICH "$new_path" 2> /dev/null`
28135
28136    if test "x$new_path" = x; then
28137      # It's still not found. Now this is an unrecoverable error.
28138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28139$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28140      has_space=`$ECHO "$complete" | $GREP " "`
28141      if test "x$has_space" != x; then
28142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28144      fi
28145      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28146    fi
28147  fi
28148
28149  # Now new_path has a complete unix path to the binary
28150  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28151    # Keep paths in /bin as-is, but remove trailing .exe if any
28152    new_path="${new_path/%.exe/}"
28153    # Do not save /bin paths to all_fixpath_prefixes!
28154  else
28155    # Not in mixed or Windows style, start by that.
28156    new_path=`cmd //c echo $new_path`
28157
28158  input_path="$new_path"
28159  # Check if we need to convert this using DOS-style short mode. If the path
28160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28161  # take no chances and rewrite it.
28162  # Note: m4 eats our [], so we need to use [ and ] instead.
28163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28164  if test "x$has_forbidden_chars" != x; then
28165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28167  fi
28168
28169    # Output is in $new_path
28170
28171  windows_path="$new_path"
28172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28173    unix_path=`$CYGPATH -u "$windows_path"`
28174    new_path="$unix_path"
28175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28177    new_path="$unix_path"
28178  fi
28179
28180    # remove trailing .exe if any
28181    new_path="${new_path/%.exe/}"
28182
28183    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28184    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28185  fi
28186
28187  else
28188    # We're on a posix platform. Hooray! :)
28189    # First separate the path from the arguments. This will split at the first
28190    # space.
28191    complete="$LIPO"
28192    path="${complete%% *}"
28193    tmp="$complete EOL"
28194    arguments="${tmp#* }"
28195
28196    # Cannot rely on the command "which" here since it doesn't always work.
28197    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28198    if test -z "$is_absolute_path"; then
28199      # Path to executable is not absolute. Find it.
28200      IFS_save="$IFS"
28201      IFS=:
28202      for p in $PATH; do
28203        if test -f "$p/$path" && test -x "$p/$path"; then
28204          new_path="$p/$path"
28205          break
28206        fi
28207      done
28208      IFS="$IFS_save"
28209    else
28210      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28211$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28212      new_path="$path"
28213    fi
28214
28215    if test "x$new_path" = x; then
28216        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28217$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28218        has_space=`$ECHO "$complete" | $GREP " "`
28219        if test "x$has_space" != x; then
28220          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28221$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28222        fi
28223        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28224      fi
28225  fi
28226
28227      # Now join together the path and the arguments once again
28228      if test "x$arguments" != xEOL; then
28229        new_complete="$new_path ${arguments% *}"
28230      else
28231        new_complete="$new_path"
28232      fi
28233
28234  if test "x$complete" != "x$new_complete"; then
28235      LIPO="$new_complete"
28236      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28237$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28238    fi
28239
28240fi
28241
28242# Restore old path without tools dir
28243PATH="$OLD_PATH"
28244
28245
28246# FIXME: Currently we must test this after paths but before flags. Fix!
28247
28248# And we can test some aspects on the target using configure macros.
28249
28250
28251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28252$as_echo_n "checking for ANSI C header files... " >&6; }
28253if test "${ac_cv_header_stdc+set}" = set; then :
28254  $as_echo_n "(cached) " >&6
28255else
28256  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28257/* end confdefs.h.  */
28258#include <stdlib.h>
28259#include <stdarg.h>
28260#include <string.h>
28261#include <float.h>
28262
28263int
28264main ()
28265{
28266
28267  ;
28268  return 0;
28269}
28270_ACEOF
28271if ac_fn_cxx_try_compile "$LINENO"; then :
28272  ac_cv_header_stdc=yes
28273else
28274  ac_cv_header_stdc=no
28275fi
28276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28277
28278if test $ac_cv_header_stdc = yes; then
28279  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28280  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28281/* end confdefs.h.  */
28282#include <string.h>
28283
28284_ACEOF
28285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28286  $EGREP "memchr" >/dev/null 2>&1; then :
28287
28288else
28289  ac_cv_header_stdc=no
28290fi
28291rm -f conftest*
28292
28293fi
28294
28295if test $ac_cv_header_stdc = yes; then
28296  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28297  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28298/* end confdefs.h.  */
28299#include <stdlib.h>
28300
28301_ACEOF
28302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28303  $EGREP "free" >/dev/null 2>&1; then :
28304
28305else
28306  ac_cv_header_stdc=no
28307fi
28308rm -f conftest*
28309
28310fi
28311
28312if test $ac_cv_header_stdc = yes; then
28313  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28314  if test "$cross_compiling" = yes; then :
28315  :
28316else
28317  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28318/* end confdefs.h.  */
28319#include <ctype.h>
28320#include <stdlib.h>
28321#if ((' ' & 0x0FF) == 0x020)
28322# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28323# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28324#else
28325# define ISLOWER(c) \
28326		   (('a' <= (c) && (c) <= 'i') \
28327		     || ('j' <= (c) && (c) <= 'r') \
28328		     || ('s' <= (c) && (c) <= 'z'))
28329# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28330#endif
28331
28332#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28333int
28334main ()
28335{
28336  int i;
28337  for (i = 0; i < 256; i++)
28338    if (XOR (islower (i), ISLOWER (i))
28339	|| toupper (i) != TOUPPER (i))
28340      return 2;
28341  return 0;
28342}
28343_ACEOF
28344if ac_fn_cxx_try_run "$LINENO"; then :
28345
28346else
28347  ac_cv_header_stdc=no
28348fi
28349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28350  conftest.$ac_objext conftest.beam conftest.$ac_ext
28351fi
28352
28353fi
28354fi
28355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28356$as_echo "$ac_cv_header_stdc" >&6; }
28357if test $ac_cv_header_stdc = yes; then
28358
28359$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28360
28361fi
28362
28363# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28364for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28365		  inttypes.h stdint.h unistd.h
28366do :
28367  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28368ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28369"
28370if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28371  cat >>confdefs.h <<_ACEOF
28372#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28373_ACEOF
28374
28375fi
28376
28377done
28378
28379
28380
28381###############################################################################
28382#
28383# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28384# (The JVM can use 32 or 64 bit Java pointers but that decision
28385# is made at runtime.)
28386#
28387
28388if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28389  # Always specify -m flags on Solaris
28390
28391  # keep track of c/cxx flags that we added outselves...
28392  #   to prevent emitting warning...
28393  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28394  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28395  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28396
28397  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28398  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28399  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28400
28401  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28402  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28403  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28404
28405elif test "x$COMPILE_TYPE" = xreduced; then
28406  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28407    # Specify -m if running reduced on other Posix platforms
28408
28409  # keep track of c/cxx flags that we added outselves...
28410  #   to prevent emitting warning...
28411  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28412  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28413  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28414
28415  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28416  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28417  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28418
28419  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28420  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28421  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28422
28423  fi
28424fi
28425
28426# Make compilation sanity check
28427for ac_header in stdio.h
28428do :
28429  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28430if test "x$ac_cv_header_stdio_h" = x""yes; then :
28431  cat >>confdefs.h <<_ACEOF
28432#define HAVE_STDIO_H 1
28433_ACEOF
28434
28435else
28436
28437  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28438$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28439  if test "x$COMPILE_TYPE" = xreduced; then
28440    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28441$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28442  elif test "x$COMPILE_TYPE" = xcross; then
28443    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28444$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28445  fi
28446  as_fn_error $? "Cannot continue." "$LINENO" 5
28447
28448fi
28449
28450done
28451
28452
28453# The cast to long int works around a bug in the HP C Compiler
28454# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28455# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28456# This bug is HP SR number 8606223364.
28457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28458$as_echo_n "checking size of int *... " >&6; }
28459if test "${ac_cv_sizeof_int_p+set}" = set; then :
28460  $as_echo_n "(cached) " >&6
28461else
28462  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28463
28464else
28465  if test "$ac_cv_type_int_p" = yes; then
28466     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28467$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28468as_fn_error 77 "cannot compute sizeof (int *)
28469See \`config.log' for more details" "$LINENO" 5 ; }
28470   else
28471     ac_cv_sizeof_int_p=0
28472   fi
28473fi
28474
28475fi
28476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28477$as_echo "$ac_cv_sizeof_int_p" >&6; }
28478
28479
28480
28481cat >>confdefs.h <<_ACEOF
28482#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28483_ACEOF
28484
28485
28486
28487if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28488  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28489  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28490fi
28491
28492if test "x$SIZEOF_INT_P" = x; then
28493    # The test failed, lets stick to the assumed value.
28494    { $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
28495$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28496else
28497    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28498
28499    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28500        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
28501    fi
28502fi
28503
28504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28505$as_echo_n "checking for target address size... " >&6; }
28506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28507$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28508
28509
28510###############################################################################
28511#
28512# Is the target little of big endian?
28513#
28514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28515$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28516if test "${ac_cv_c_bigendian+set}" = set; then :
28517  $as_echo_n "(cached) " >&6
28518else
28519  ac_cv_c_bigendian=unknown
28520    # See if we're dealing with a universal compiler.
28521    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28522/* end confdefs.h.  */
28523#ifndef __APPLE_CC__
28524	       not a universal capable compiler
28525	     #endif
28526	     typedef int dummy;
28527
28528_ACEOF
28529if ac_fn_cxx_try_compile "$LINENO"; then :
28530
28531	# Check for potential -arch flags.  It is not universal unless
28532	# there are at least two -arch flags with different values.
28533	ac_arch=
28534	ac_prev=
28535	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28536	 if test -n "$ac_prev"; then
28537	   case $ac_word in
28538	     i?86 | x86_64 | ppc | ppc64)
28539	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28540		 ac_arch=$ac_word
28541	       else
28542		 ac_cv_c_bigendian=universal
28543		 break
28544	       fi
28545	       ;;
28546	   esac
28547	   ac_prev=
28548	 elif test "x$ac_word" = "x-arch"; then
28549	   ac_prev=arch
28550	 fi
28551       done
28552fi
28553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28554    if test $ac_cv_c_bigendian = unknown; then
28555      # See if sys/param.h defines the BYTE_ORDER macro.
28556      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28557/* end confdefs.h.  */
28558#include <sys/types.h>
28559	     #include <sys/param.h>
28560
28561int
28562main ()
28563{
28564#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28565		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28566		     && LITTLE_ENDIAN)
28567	      bogus endian macros
28568	     #endif
28569
28570  ;
28571  return 0;
28572}
28573_ACEOF
28574if ac_fn_cxx_try_compile "$LINENO"; then :
28575  # It does; now see whether it defined to BIG_ENDIAN or not.
28576	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28577/* end confdefs.h.  */
28578#include <sys/types.h>
28579		#include <sys/param.h>
28580
28581int
28582main ()
28583{
28584#if BYTE_ORDER != BIG_ENDIAN
28585		 not big endian
28586		#endif
28587
28588  ;
28589  return 0;
28590}
28591_ACEOF
28592if ac_fn_cxx_try_compile "$LINENO"; then :
28593  ac_cv_c_bigendian=yes
28594else
28595  ac_cv_c_bigendian=no
28596fi
28597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28598fi
28599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28600    fi
28601    if test $ac_cv_c_bigendian = unknown; then
28602      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28603      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28604/* end confdefs.h.  */
28605#include <limits.h>
28606
28607int
28608main ()
28609{
28610#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28611	      bogus endian macros
28612	     #endif
28613
28614  ;
28615  return 0;
28616}
28617_ACEOF
28618if ac_fn_cxx_try_compile "$LINENO"; then :
28619  # It does; now see whether it defined to _BIG_ENDIAN or not.
28620	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28621/* end confdefs.h.  */
28622#include <limits.h>
28623
28624int
28625main ()
28626{
28627#ifndef _BIG_ENDIAN
28628		 not big endian
28629		#endif
28630
28631  ;
28632  return 0;
28633}
28634_ACEOF
28635if ac_fn_cxx_try_compile "$LINENO"; then :
28636  ac_cv_c_bigendian=yes
28637else
28638  ac_cv_c_bigendian=no
28639fi
28640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28641fi
28642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28643    fi
28644    if test $ac_cv_c_bigendian = unknown; then
28645      # Compile a test program.
28646      if test "$cross_compiling" = yes; then :
28647  # Try to guess by grepping values from an object file.
28648	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28649/* end confdefs.h.  */
28650short int ascii_mm[] =
28651		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28652		short int ascii_ii[] =
28653		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28654		int use_ascii (int i) {
28655		  return ascii_mm[i] + ascii_ii[i];
28656		}
28657		short int ebcdic_ii[] =
28658		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28659		short int ebcdic_mm[] =
28660		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28661		int use_ebcdic (int i) {
28662		  return ebcdic_mm[i] + ebcdic_ii[i];
28663		}
28664		extern int foo;
28665
28666int
28667main ()
28668{
28669return use_ascii (foo) == use_ebcdic (foo);
28670  ;
28671  return 0;
28672}
28673_ACEOF
28674if ac_fn_cxx_try_compile "$LINENO"; then :
28675  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28676	      ac_cv_c_bigendian=yes
28677	    fi
28678	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28679	      if test "$ac_cv_c_bigendian" = unknown; then
28680		ac_cv_c_bigendian=no
28681	      else
28682		# finding both strings is unlikely to happen, but who knows?
28683		ac_cv_c_bigendian=unknown
28684	      fi
28685	    fi
28686fi
28687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28688else
28689  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28690/* end confdefs.h.  */
28691$ac_includes_default
28692int
28693main ()
28694{
28695
28696	     /* Are we little or big endian?  From Harbison&Steele.  */
28697	     union
28698	     {
28699	       long int l;
28700	       char c[sizeof (long int)];
28701	     } u;
28702	     u.l = 1;
28703	     return u.c[sizeof (long int) - 1] == 1;
28704
28705  ;
28706  return 0;
28707}
28708_ACEOF
28709if ac_fn_cxx_try_run "$LINENO"; then :
28710  ac_cv_c_bigendian=no
28711else
28712  ac_cv_c_bigendian=yes
28713fi
28714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28715  conftest.$ac_objext conftest.beam conftest.$ac_ext
28716fi
28717
28718    fi
28719fi
28720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28721$as_echo "$ac_cv_c_bigendian" >&6; }
28722 case $ac_cv_c_bigendian in #(
28723   yes)
28724     ENDIAN="big";; #(
28725   no)
28726     ENDIAN="little" ;; #(
28727   universal)
28728     ENDIAN="universal_endianness"
28729     ;; #(
28730   *)
28731     ENDIAN="unknown" ;;
28732 esac
28733
28734
28735if test "x$ENDIAN" = xuniversal_endianness; then
28736    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28737fi
28738if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28739    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
28740fi
28741
28742
28743# Configure flags for the tools
28744
28745
28746###############################################################################
28747#
28748# How to compile shared libraries.
28749#
28750
28751if test "x$GCC" = xyes; then
28752    COMPILER_NAME=gcc
28753    PICFLAG="-fPIC"
28754    LIBRARY_PREFIX=lib
28755    SHARED_LIBRARY='lib$1.so'
28756    STATIC_LIBRARY='lib$1.a'
28757    SHARED_LIBRARY_FLAGS="-shared"
28758    SHARED_LIBRARY_SUFFIX='.so'
28759    STATIC_LIBRARY_SUFFIX='.a'
28760    OBJ_SUFFIX='.o'
28761    EXE_SUFFIX=''
28762    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28763    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28764    C_FLAG_REORDER=''
28765    CXX_FLAG_REORDER=''
28766    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28767    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28768    LD="$CC"
28769    LDEXE="$CC"
28770    LDCXX="$CXX"
28771    LDEXECXX="$CXX"
28772    POST_STRIP_CMD="$STRIP -g"
28773
28774    # Linking is different on MacOSX
28775    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28776        # Might change in the future to clang.
28777        COMPILER_NAME=gcc
28778        SHARED_LIBRARY='lib$1.dylib'
28779        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28780        SHARED_LIBRARY_SUFFIX='.dylib'
28781        EXE_SUFFIX=''
28782        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28783        SET_SHARED_LIBRARY_MAPFILE=''
28784        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28785        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28786        POST_STRIP_CMD="$STRIP -S"
28787    fi
28788else
28789    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28790        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28791        COMPILER_NAME=ossc
28792        PICFLAG="-KPIC"
28793        LIBRARY_PREFIX=lib
28794        SHARED_LIBRARY='lib$1.so'
28795        STATIC_LIBRARY='lib$1.a'
28796        SHARED_LIBRARY_FLAGS="-G"
28797        SHARED_LIBRARY_SUFFIX='.so'
28798        STATIC_LIBRARY_SUFFIX='.a'
28799        OBJ_SUFFIX='.o'
28800        EXE_SUFFIX=''
28801        SET_SHARED_LIBRARY_NAME=''
28802        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28803	C_FLAG_REORDER='-xF'
28804	CXX_FLAG_REORDER='-xF'
28805        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28806        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28807        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28808        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28809        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28810        POST_STRIP_CMD="$STRIP -x"
28811        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28812    fi
28813    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28814        # If it is not gcc, then assume it is the MS Visual Studio compiler
28815        COMPILER_NAME=cl
28816        PICFLAG=""
28817        LIBRARY_PREFIX=
28818        SHARED_LIBRARY='$1.dll'
28819        STATIC_LIBRARY='$1.lib'
28820        SHARED_LIBRARY_FLAGS="-LD"
28821        SHARED_LIBRARY_SUFFIX='.dll'
28822        STATIC_LIBRARY_SUFFIX='.lib'
28823        OBJ_SUFFIX='.obj'
28824        EXE_SUFFIX='.exe'
28825        SET_SHARED_LIBRARY_NAME=''
28826        SET_SHARED_LIBRARY_MAPFILE=''
28827        SET_SHARED_LIBRARY_ORIGIN=''
28828        SET_EXECUTABLE_ORIGIN=''
28829    fi
28830fi
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850# The (cross) compiler is now configured, we can now test capabilities
28851# of the target platform.
28852
28853
28854
28855###############################################################################
28856#
28857# Setup the opt flags for different compilers
28858# and different operating systems.
28859#
28860
28861#
28862# NOTE: check for -mstackrealign needs to be below potential addition of -m32
28863#
28864if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28865    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28866    # While waiting for a better solution, the current workaround is to use -mstackrealign.
28867    CFLAGS="$CFLAGS -mstackrealign"
28868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28869$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28870    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28871/* end confdefs.h.  */
28872int main() { return 0; }
28873_ACEOF
28874if ac_fn_cxx_try_link "$LINENO"; then :
28875
28876		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28877$as_echo "yes" >&6; }
28878
28879else
28880
28881		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28882$as_echo "no" >&6; }
28883	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28884
28885fi
28886rm -f core conftest.err conftest.$ac_objext \
28887    conftest$ac_exeext conftest.$ac_ext
28888fi
28889
28890C_FLAG_DEPS="-MMD -MF"
28891CXX_FLAG_DEPS="-MMD -MF"
28892
28893case $COMPILER_TYPE in
28894  CC )
28895    D_FLAG="-g"
28896    case $COMPILER_NAME in
28897      gcc )
28898      	case $OPENJDK_TARGET_OS in
28899	  macosx )
28900	    # On MacOSX we optimize for size, something
28901	    # we should do for all platforms?
28902	    C_O_FLAG_HI="-Os"
28903	    C_O_FLAG_NORM="-Os"
28904	    C_O_FLAG_NONE=""
28905	    ;;
28906	  *)
28907	    C_O_FLAG_HI="-O3"
28908	    C_O_FLAG_NORM="-O2"
28909	    C_O_FLAG_NONE="-O0"
28910	    CFLAGS_DEBUG_SYMBOLS="-g"
28911	    CXXFLAGS_DEBUG_SYMBOLS="-g"
28912	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28913	       CFLAGS_DEBUG_SYMBOLS="-g1"
28914	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
28915	    fi
28916	    ;;
28917	esac
28918        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28919        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28920        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28921        ;;
28922      ossc )
28923        #
28924        # Forte has different names for this with their C++ compiler...
28925        #
28926        C_FLAG_DEPS="-xMMD -xMF"
28927        CXX_FLAG_DEPS="-xMMD -xMF"
28928
28929        # Extra options used with HIGHEST
28930        #
28931        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28932        #          done with care, there are some assumptions below that need to
28933        #          be understood about the use of pointers, and IEEE behavior.
28934        #
28935        # Use non-standard floating point mode (not IEEE 754)
28936        CC_HIGHEST="$CC_HIGHEST -fns"
28937        # Do some simplification of floating point arithmetic (not IEEE 754)
28938        CC_HIGHEST="$CC_HIGHEST -fsimple"
28939        # Use single precision floating point with 'float'
28940        CC_HIGHEST="$CC_HIGHEST -fsingle"
28941        # Assume memory references via basic pointer types do not alias
28942        #   (Source with excessing pointer casting and data access with mixed
28943        #    pointer types are not recommended)
28944        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28945        # Use intrinsic or inline versions for math/std functions
28946        #   (If you expect perfect errno behavior, do not use this)
28947        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28948        # Loop data dependency optimizations (need -xO3 or higher)
28949        CC_HIGHEST="$CC_HIGHEST -xdepend"
28950        # Pointer parameters to functions do not overlap
28951        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28952        #    If you pass in multiple pointers to the same data, do not use this)
28953        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28954        # Inline some library routines
28955        #   (If you expect perfect errno behavior, do not use this)
28956        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28957        # Use optimized math routines
28958        #   (If you expect perfect errno behavior, do not use this)
28959        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28960        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28961
28962        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28963          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28964          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28965        fi
28966
28967        case $OPENJDK_TARGET_CPU_ARCH in
28968          x86)
28969            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28970            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28971            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28972            C_O_FLAG_NONE="-xregs=no%frameptr"
28973            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28974            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28975            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28976            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28977            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28978               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28979               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28980            fi
28981            ;;
28982          sparc)
28983            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28984            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28985            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28986            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28987            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28988            C_O_FLAG_NONE=""
28989            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28990            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28991            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28992            CXX_O_FLAG_NONE=""
28993            ;;
28994        esac
28995
28996    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28997    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28998    esac
28999    ;;
29000  CL )
29001    D_FLAG=
29002    C_O_FLAG_HIGHEST="-O2"
29003    C_O_FLAG_HI="-O1"
29004    C_O_FLAG_NORM="-O1"
29005    C_O_FLAG_NONE="-Od"
29006    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29007    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29008    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29009    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29010    ;;
29011esac
29012
29013if test -z "$C_O_FLAG_HIGHEST"; then
29014   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29015fi
29016
29017if test -z "$CXX_O_FLAG_HIGHEST"; then
29018   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29019fi
29020
29021
29022
29023
29024
29025
29026
29027
29028
29029
29030
29031
29032
29033
29034if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29035   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29036$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29037fi
29038
29039if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29040   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29041$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29042fi
29043
29044if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29045   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29046$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29047fi
29048
29049
29050# Check whether --with-extra-cflags was given.
29051if test "${with_extra_cflags+set}" = set; then :
29052  withval=$with_extra_cflags;
29053fi
29054
29055
29056
29057# Check whether --with-extra-cxxflags was given.
29058if test "${with_extra_cxxflags+set}" = set; then :
29059  withval=$with_extra_cxxflags;
29060fi
29061
29062
29063
29064# Check whether --with-extra-ldflags was given.
29065if test "${with_extra_ldflags+set}" = set; then :
29066  withval=$with_extra_ldflags;
29067fi
29068
29069
29070CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29071CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29072LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29073
29074# Hotspot needs these set in their legacy form
29075LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29076LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29077LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29078
29079
29080
29081
29082
29083###############################################################################
29084#
29085# Now setup the CFLAGS and LDFLAGS for the JDK build.
29086# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29087#
29088case $COMPILER_NAME in
29089      gcc )
29090      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29091                          -pipe \
29092                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29093	  case $OPENJDK_TARGET_CPU_ARCH in
29094	  arm )
29095            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29096	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29097	  ;;
29098	  ppc )
29099            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29100	  ;;
29101	  * )
29102	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29103	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29104          ;;
29105	  esac
29106          ;;
29107      ossc )
29108          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29109          case $OPENJDK_TARGET_CPU_ARCH in
29110          x86 )
29111            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29112       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29113          ;;
29114          esac
29115
29116      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29117      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29118
29119          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29120          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29121          ;;
29122      cl )
29123          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29124               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29125	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29126	       -DWIN32 -DIAL"
29127          case $OPENJDK_TARGET_CPU in
29128              x86 )
29129                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29130                  ;;
29131              x86_64 )
29132                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29133                  ;;
29134          esac
29135          ;;
29136esac
29137
29138###############################################################################
29139
29140CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29141
29142# The package path is used only on macosx?
29143PACKAGE_PATH=/opt/local
29144
29145
29146if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29147    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29148    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29149    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29150    #   Note: -Dmacro         is the same as    #define macro 1
29151    #         -Dmacro=	    is the same as    #define macro
29152    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29153        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29154    else
29155        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29156    fi
29157else
29158    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29159fi
29160if test "x$OPENJDK_TARGET_OS" = xlinux; then
29161    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29162fi
29163if test "x$OPENJDK_TARGET_OS" = xwindows; then
29164    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29165fi
29166if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29167    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29168fi
29169if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29170    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29171    # Setting these parameters makes it an error to link to macosx APIs that are
29172    # newer than the given OS version and makes the linked binaries compatible even
29173    # if built on a newer version of the OS.
29174    # The expected format is X.Y.Z
29175    MACOSX_VERSION_MIN=10.7.0
29176
29177    # The macro takes the version with no dots, ex: 1070
29178    # Let the flags variables get resolved in make for easier override on make
29179    # command line.
29180    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29181    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29182fi
29183if test "x$OPENJDK_TARGET_OS" = xbsd; then
29184    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29185fi
29186if test "x$DEBUG_LEVEL" = xrelease; then
29187    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29188    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29189        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29190    fi
29191else
29192    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29193fi
29194
29195CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29196CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29197
29198CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29199        -I${JDK_OUTPUTDIR}/include \
29200        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29201        -I${JDK_TOPDIR}/src/share/javavm/export \
29202        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29203        -I${JDK_TOPDIR}/src/share/native/common \
29204        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29205
29206# The shared libraries are compiled using the picflag.
29207CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29208CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29209
29210# Executable flags
29211CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29212CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29213
29214# Now this is odd. The JDK native libraries have to link against libjvm.so
29215# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29216# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29217# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29218# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29219# libraries will link to whatever is in memory. Yuck.
29220#
29221# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29222if test "x$COMPILER_NAME" = xcl; then
29223    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29224    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29225        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29226    fi
29227    # TODO: make -debug optional "--disable-full-debug-symbols"
29228    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29229    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29230    LDFLAGS_JDKLIB_SUFFIX=""
29231    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29232        LDFLAGS_STACK_SIZE=1048576
29233    else
29234        LDFLAGS_STACK_SIZE=327680
29235    fi
29236    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29237else
29238    if test "x$COMPILER_NAME" = xgcc; then
29239        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29240        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29241        if test -n "$HAS_GNU_HASH"; then
29242            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29243        fi
29244        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29245          # And since we now know that the linker is gnu, then add -z defs, to forbid
29246          # undefined symbols in object files.
29247          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29248          if test "x$DEBUG_LEVEL" = "xrelease"; then
29249              # When building release libraries, tell the linker optimize them.
29250              # Should this be supplied to the OSS linker as well?
29251              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29252          fi
29253        fi
29254    fi
29255    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29256                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29257
29258    # On some platforms (mac) the linker warns about non existing -L dirs.
29259    # Add server first if available. Linking aginst client does not always produce the same results.
29260    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29261    # Default to server for other variants.
29262    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29263        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29264    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29265        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29266    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29267        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29268    else
29269        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29270    fi
29271
29272    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29273    if test "x$COMPILER_NAME" = xossc; then
29274        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29275    fi
29276
29277    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29278    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29279        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29280    fi
29281fi
29282
29283# Adjust flags according to debug level.
29284case $DEBUG_LEVEL in
29285      fastdebug )
29286              CFLAGS="$CFLAGS $D_FLAG"
29287              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29288              ;;
29289      slowdebug )
29290              CFLAGS="$CFLAGS $D_FLAG"
29291	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29292	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29293	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29294	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29295              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29296              ;;
29297esac
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314  # Some Zero and Shark settings.
29315  # ZERO_ARCHFLAG tells the compiler which mode to build for
29316  case "${OPENJDK_TARGET_CPU}" in
29317    s390)
29318      ZERO_ARCHFLAG="-m31"
29319      ;;
29320    *)
29321      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29322  esac
29323
29324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29325$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29326  supports=yes
29327
29328  saved_cflags="$CFLAGS"
29329  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29330  ac_ext=c
29331ac_cpp='$CPP $CPPFLAGS'
29332ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29333ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29334ac_compiler_gnu=$ac_cv_c_compiler_gnu
29335
29336  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29337/* end confdefs.h.  */
29338
29339    int i;
29340
29341_ACEOF
29342if ac_fn_c_try_compile "$LINENO"; then :
29343
29344else
29345  supports=no
29346fi
29347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29348  ac_ext=cpp
29349ac_cpp='$CXXCPP $CPPFLAGS'
29350ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29351ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29352ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29353
29354  CFLAGS="$saved_cflags"
29355
29356  saved_cxxflags="$CXXFLAGS"
29357  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29358  ac_ext=cpp
29359ac_cpp='$CXXCPP $CPPFLAGS'
29360ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29361ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29362ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29363
29364  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29365/* end confdefs.h.  */
29366
29367    int i;
29368
29369_ACEOF
29370if ac_fn_cxx_try_compile "$LINENO"; then :
29371
29372else
29373  supports=no
29374fi
29375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29376  ac_ext=cpp
29377ac_cpp='$CXXCPP $CPPFLAGS'
29378ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29379ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29380ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29381
29382  CXXFLAGS="$saved_cxxflags"
29383
29384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29385$as_echo "$supports" >&6; }
29386  if test "x$supports" = "xyes" ; then
29387    :
29388  else
29389    ZERO_ARCHFLAG=""
29390  fi
29391
29392
29393
29394  # Check that the compiler supports -mX flags
29395  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29396
29397  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29398$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29399  supports=yes
29400
29401  saved_cflags="$CFLAGS"
29402  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29403  ac_ext=c
29404ac_cpp='$CPP $CPPFLAGS'
29405ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29406ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29407ac_compiler_gnu=$ac_cv_c_compiler_gnu
29408
29409  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29410/* end confdefs.h.  */
29411
29412    int i;
29413
29414_ACEOF
29415if ac_fn_c_try_compile "$LINENO"; then :
29416
29417else
29418  supports=no
29419fi
29420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29421  ac_ext=cpp
29422ac_cpp='$CXXCPP $CPPFLAGS'
29423ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29424ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29425ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29426
29427  CFLAGS="$saved_cflags"
29428
29429  saved_cxxflags="$CXXFLAGS"
29430  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29431  ac_ext=cpp
29432ac_cpp='$CXXCPP $CPPFLAGS'
29433ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29434ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29435ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29436
29437  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29438/* end confdefs.h.  */
29439
29440    int i;
29441
29442_ACEOF
29443if ac_fn_cxx_try_compile "$LINENO"; then :
29444
29445else
29446  supports=no
29447fi
29448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29449  ac_ext=cpp
29450ac_cpp='$CXXCPP $CPPFLAGS'
29451ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29452ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29453ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29454
29455  CXXFLAGS="$saved_cxxflags"
29456
29457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29458$as_echo "$supports" >&6; }
29459  if test "x$supports" = "xyes" ; then
29460    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29461  else
29462    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29463  fi
29464
29465
29466
29467
29468# Setup debug symbols (need objcopy from the toolchain for that)
29469
29470#
29471# ENABLE_DEBUG_SYMBOLS
29472# This must be done after the toolchain is setup, since we're looking at objcopy.
29473#
29474# Check whether --enable-debug-symbols was given.
29475if test "${enable_debug_symbols+set}" = set; then :
29476  enableval=$enable_debug_symbols;
29477fi
29478
29479
29480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29481$as_echo_n "checking if we should generate debug symbols... " >&6; }
29482
29483if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29484   # explicit enabling of enable-debug-symbols and can't find objcopy
29485   #   this is an error
29486   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29487fi
29488
29489if test "x$enable_debug_symbols" = "xyes"; then
29490  ENABLE_DEBUG_SYMBOLS=true
29491elif test "x$enable_debug_symbols" = "xno"; then
29492  ENABLE_DEBUG_SYMBOLS=false
29493else
29494  # default on macosx is false
29495  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29496    ENABLE_DEBUG_SYMBOLS=false
29497  # Default is on if objcopy is found, otherwise off
29498  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29499    ENABLE_DEBUG_SYMBOLS=true
29500  else
29501    ENABLE_DEBUG_SYMBOLS=false
29502  fi
29503fi
29504
29505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29506$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29507
29508#
29509# ZIP_DEBUGINFO_FILES
29510#
29511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29512$as_echo_n "checking if we should zip debug-info files... " >&6; }
29513# Check whether --enable-zip-debug-info was given.
29514if test "${enable_zip_debug_info+set}" = set; then :
29515  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29516else
29517  enable_zip_debug_info="yes"
29518fi
29519
29520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29521$as_echo "${enable_zip_debug_info}" >&6; }
29522
29523if test "x${enable_zip_debug_info}" = "xno"; then
29524   ZIP_DEBUGINFO_FILES=false
29525else
29526   ZIP_DEBUGINFO_FILES=true
29527fi
29528
29529
29530
29531
29532
29533
29534
29535###############################################################################
29536#
29537# Check dependencies for external and internal libraries.
29538#
29539###############################################################################
29540
29541
29542
29543###############################################################################
29544#
29545# OS specific settings that we never will need to probe.
29546#
29547if test "x$OPENJDK_TARGET_OS" = xlinux; then
29548    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29549$as_echo_n "checking what is not needed on Linux?... " >&6; }
29550    PULSE_NOT_NEEDED=yes
29551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29552$as_echo "pulse" >&6; }
29553fi
29554
29555if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29557$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29558    ALSA_NOT_NEEDED=yes
29559    PULSE_NOT_NEEDED=yes
29560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29561$as_echo "alsa pulse" >&6; }
29562fi
29563
29564if test "x$OPENJDK_TARGET_OS" = xwindows; then
29565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29566$as_echo_n "checking what is not needed on Windows?... " >&6; }
29567    CUPS_NOT_NEEDED=yes
29568    ALSA_NOT_NEEDED=yes
29569    PULSE_NOT_NEEDED=yes
29570    X11_NOT_NEEDED=yes
29571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29572$as_echo "alsa cups pulse x11" >&6; }
29573fi
29574
29575if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29577$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29578    ALSA_NOT_NEEDED=yes
29579    PULSE_NOT_NEEDED=yes
29580    X11_NOT_NEEDED=yes
29581    FREETYPE2_NOT_NEEDED=yes
29582    # If the java runtime framework is disabled, then we need X11.
29583    # This will be adjusted below.
29584    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29585$as_echo "alsa pulse x11" >&6; }
29586fi
29587
29588if test "x$OPENJDK_TARGET_OS" = xbsd; then
29589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29590$as_echo_n "checking what is not needed on bsd?... " >&6; }
29591    ALSA_NOT_NEEDED=yes
29592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29593$as_echo "alsa" >&6; }
29594fi
29595
29596if test "x$OPENJDK" = "xfalse"; then
29597    FREETYPE2_NOT_NEEDED=yes
29598fi
29599
29600if test "x$SUPPORT_HEADFUL" = xno; then
29601    X11_NOT_NEEDED=yes
29602fi
29603
29604###############################################################################
29605#
29606# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29607# that uses this API.
29608#
29609# Check whether --enable-macosx-runtime-support was given.
29610if test "${enable_macosx_runtime_support+set}" = set; then :
29611  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29612else
29613  MACOSX_RUNTIME_SUPPORT="no"
29614fi
29615
29616
29617USE_MACOSX_RUNTIME_SUPPORT=no
29618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29619$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29620if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29621    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29622        MACOSX_RUNTIME_SUPPORT=yes
29623        USE_MACOSX_RUNTIME_SUPPORT=yes
29624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29625$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29626    else
29627        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29628$as_echo "yes, but explicitly disabled." >&6; }
29629    fi
29630else
29631    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29632$as_echo "no" >&6; }
29633fi
29634
29635if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29636    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29637$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29638    X11_NOT_NEEDED=
29639    FREETYPE2_NOT_NEEDED=
29640    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29641$as_echo "alsa pulse" >&6; }
29642fi
29643
29644
29645
29646###############################################################################
29647#
29648# Check for X Windows
29649#
29650
29651# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29652# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29653# --x-libraries for the sysroot, if that seems to be correct.
29654if test "x$SYS_ROOT" != "x/"; then
29655  if test "x$x_includes" = xNONE; then
29656    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29657      x_includes="$SYS_ROOT/usr/X11R6/include"
29658    fi
29659  fi
29660  if test "x$x_libraries" = xNONE; then
29661    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29662      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29663    fi
29664  fi
29665fi
29666
29667# Now let autoconf do it's magic
29668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29669$as_echo_n "checking for X... " >&6; }
29670
29671
29672# Check whether --with-x was given.
29673if test "${with_x+set}" = set; then :
29674  withval=$with_x;
29675fi
29676
29677# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29678if test "x$with_x" = xno; then
29679  # The user explicitly disabled X.
29680  have_x=disabled
29681else
29682  case $x_includes,$x_libraries in #(
29683    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
29684    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
29685  $as_echo_n "(cached) " >&6
29686else
29687  # One or both of the vars are not set, and there is no cached value.
29688ac_x_includes=no ac_x_libraries=no
29689rm -f -r conftest.dir
29690if mkdir conftest.dir; then
29691  cd conftest.dir
29692  cat >Imakefile <<'_ACEOF'
29693incroot:
29694	@echo incroot='${INCROOT}'
29695usrlibdir:
29696	@echo usrlibdir='${USRLIBDIR}'
29697libdir:
29698	@echo libdir='${LIBDIR}'
29699_ACEOF
29700  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29701    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29702    for ac_var in incroot usrlibdir libdir; do
29703      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29704    done
29705    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29706    for ac_extension in a so sl dylib la dll; do
29707      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29708	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29709	ac_im_usrlibdir=$ac_im_libdir; break
29710      fi
29711    done
29712    # Screen out bogus values from the imake configuration.  They are
29713    # bogus both because they are the default anyway, and because
29714    # using them would break gcc on systems where it needs fixed includes.
29715    case $ac_im_incroot in
29716	/usr/include) ac_x_includes= ;;
29717	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29718    esac
29719    case $ac_im_usrlibdir in
29720	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29721	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29722    esac
29723  fi
29724  cd ..
29725  rm -f -r conftest.dir
29726fi
29727
29728# Standard set of common directories for X headers.
29729# Check X11 before X11Rn because it is often a symlink to the current release.
29730ac_x_header_dirs='
29731/usr/X11/include
29732/usr/X11R7/include
29733/usr/X11R6/include
29734/usr/X11R5/include
29735/usr/X11R4/include
29736
29737/usr/include/X11
29738/usr/include/X11R7
29739/usr/include/X11R6
29740/usr/include/X11R5
29741/usr/include/X11R4
29742
29743/usr/local/X11/include
29744/usr/local/X11R7/include
29745/usr/local/X11R6/include
29746/usr/local/X11R5/include
29747/usr/local/X11R4/include
29748
29749/usr/local/include/X11
29750/usr/local/include/X11R7
29751/usr/local/include/X11R6
29752/usr/local/include/X11R5
29753/usr/local/include/X11R4
29754
29755/usr/X386/include
29756/usr/x386/include
29757/usr/XFree86/include/X11
29758
29759/usr/include
29760/usr/local/include
29761/usr/unsupported/include
29762/usr/athena/include
29763/usr/local/x11r5/include
29764/usr/lpp/Xamples/include
29765
29766/usr/openwin/include
29767/usr/openwin/share/include'
29768
29769if test "$ac_x_includes" = no; then
29770  # Guess where to find include files, by looking for Xlib.h.
29771  # First, try using that file with no special directory specified.
29772  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29773/* end confdefs.h.  */
29774#include <X11/Xlib.h>
29775_ACEOF
29776if ac_fn_cxx_try_cpp "$LINENO"; then :
29777  # We can compile using X headers with no special include directory.
29778ac_x_includes=
29779else
29780  for ac_dir in $ac_x_header_dirs; do
29781  if test -r "$ac_dir/X11/Xlib.h"; then
29782    ac_x_includes=$ac_dir
29783    break
29784  fi
29785done
29786fi
29787rm -f conftest.err conftest.i conftest.$ac_ext
29788fi # $ac_x_includes = no
29789
29790if test "$ac_x_libraries" = no; then
29791  # Check for the libraries.
29792  # See if we find them without any special options.
29793  # Don't add to $LIBS permanently.
29794  ac_save_LIBS=$LIBS
29795  LIBS="-lX11 $LIBS"
29796  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29797/* end confdefs.h.  */
29798#include <X11/Xlib.h>
29799int
29800main ()
29801{
29802XrmInitialize ()
29803  ;
29804  return 0;
29805}
29806_ACEOF
29807if ac_fn_cxx_try_link "$LINENO"; then :
29808  LIBS=$ac_save_LIBS
29809# We can link X programs with no special library path.
29810ac_x_libraries=
29811else
29812  LIBS=$ac_save_LIBS
29813for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29814do
29815  # Don't even attempt the hair of trying to link an X program!
29816  for ac_extension in a so sl dylib la dll; do
29817    if test -r "$ac_dir/libX11.$ac_extension"; then
29818      ac_x_libraries=$ac_dir
29819      break 2
29820    fi
29821  done
29822done
29823fi
29824rm -f core conftest.err conftest.$ac_objext \
29825    conftest$ac_exeext conftest.$ac_ext
29826fi # $ac_x_libraries = no
29827
29828case $ac_x_includes,$ac_x_libraries in #(
29829  no,* | *,no | *\'*)
29830    # Didn't find X, or a directory has "'" in its name.
29831    ac_cv_have_x="have_x=no";; #(
29832  *)
29833    # Record where we found X for the cache.
29834    ac_cv_have_x="have_x=yes\
29835	ac_x_includes='$ac_x_includes'\
29836	ac_x_libraries='$ac_x_libraries'"
29837esac
29838fi
29839;; #(
29840    *) have_x=yes;;
29841  esac
29842  eval "$ac_cv_have_x"
29843fi # $with_x != no
29844
29845if test "$have_x" != yes; then
29846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29847$as_echo "$have_x" >&6; }
29848  no_x=yes
29849else
29850  # If each of the values was on the command line, it overrides each guess.
29851  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29852  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29853  # Update the cache value to reflect the command line values.
29854  ac_cv_have_x="have_x=yes\
29855	ac_x_includes='$x_includes'\
29856	ac_x_libraries='$x_libraries'"
29857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29858$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29859fi
29860
29861if test "$no_x" = yes; then
29862  # Not all programs may use this symbol, but it does not hurt to define it.
29863
29864$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29865
29866  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29867else
29868  if test -n "$x_includes"; then
29869    X_CFLAGS="$X_CFLAGS -I$x_includes"
29870  fi
29871
29872  # It would also be nice to do this for all -L options, not just this one.
29873  if test -n "$x_libraries"; then
29874    X_LIBS="$X_LIBS -L$x_libraries"
29875    # For Solaris; some versions of Sun CC require a space after -R and
29876    # others require no space.  Words are not sufficient . . . .
29877    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29878$as_echo_n "checking whether -R must be followed by a space... " >&6; }
29879    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29880    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29881    ac_cxx_werror_flag=yes
29882    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29883/* end confdefs.h.  */
29884
29885int
29886main ()
29887{
29888
29889  ;
29890  return 0;
29891}
29892_ACEOF
29893if ac_fn_cxx_try_link "$LINENO"; then :
29894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29895$as_echo "no" >&6; }
29896       X_LIBS="$X_LIBS -R$x_libraries"
29897else
29898  LIBS="$ac_xsave_LIBS -R $x_libraries"
29899       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29900/* end confdefs.h.  */
29901
29902int
29903main ()
29904{
29905
29906  ;
29907  return 0;
29908}
29909_ACEOF
29910if ac_fn_cxx_try_link "$LINENO"; then :
29911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29912$as_echo "yes" >&6; }
29913	  X_LIBS="$X_LIBS -R $x_libraries"
29914else
29915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29916$as_echo "neither works" >&6; }
29917fi
29918rm -f core conftest.err conftest.$ac_objext \
29919    conftest$ac_exeext conftest.$ac_ext
29920fi
29921rm -f core conftest.err conftest.$ac_objext \
29922    conftest$ac_exeext conftest.$ac_ext
29923    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29924    LIBS=$ac_xsave_LIBS
29925  fi
29926
29927  # Check for system-dependent libraries X programs must link with.
29928  # Do this before checking for the system-independent R6 libraries
29929  # (-lICE), since we may need -lsocket or whatever for X linking.
29930
29931  if test "$ISC" = yes; then
29932    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29933  else
29934    # Martyn Johnson says this is needed for Ultrix, if the X
29935    # libraries were built with DECnet support.  And Karl Berry says
29936    # the Alpha needs dnet_stub (dnet does not exist).
29937    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29938    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29939/* end confdefs.h.  */
29940
29941/* Override any GCC internal prototype to avoid an error.
29942   Use char because int might match the return type of a GCC
29943   builtin and then its argument prototype would still apply.  */
29944#ifdef __cplusplus
29945extern "C"
29946#endif
29947char XOpenDisplay ();
29948int
29949main ()
29950{
29951return XOpenDisplay ();
29952  ;
29953  return 0;
29954}
29955_ACEOF
29956if ac_fn_cxx_try_link "$LINENO"; then :
29957
29958else
29959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
29960$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29961if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
29962  $as_echo_n "(cached) " >&6
29963else
29964  ac_check_lib_save_LIBS=$LIBS
29965LIBS="-ldnet  $LIBS"
29966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29967/* end confdefs.h.  */
29968
29969/* Override any GCC internal prototype to avoid an error.
29970   Use char because int might match the return type of a GCC
29971   builtin and then its argument prototype would still apply.  */
29972#ifdef __cplusplus
29973extern "C"
29974#endif
29975char dnet_ntoa ();
29976int
29977main ()
29978{
29979return dnet_ntoa ();
29980  ;
29981  return 0;
29982}
29983_ACEOF
29984if ac_fn_cxx_try_link "$LINENO"; then :
29985  ac_cv_lib_dnet_dnet_ntoa=yes
29986else
29987  ac_cv_lib_dnet_dnet_ntoa=no
29988fi
29989rm -f core conftest.err conftest.$ac_objext \
29990    conftest$ac_exeext conftest.$ac_ext
29991LIBS=$ac_check_lib_save_LIBS
29992fi
29993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29994$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29995if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
29996  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29997fi
29998
29999    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30000      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30001$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30002if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
30003  $as_echo_n "(cached) " >&6
30004else
30005  ac_check_lib_save_LIBS=$LIBS
30006LIBS="-ldnet_stub  $LIBS"
30007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30008/* end confdefs.h.  */
30009
30010/* Override any GCC internal prototype to avoid an error.
30011   Use char because int might match the return type of a GCC
30012   builtin and then its argument prototype would still apply.  */
30013#ifdef __cplusplus
30014extern "C"
30015#endif
30016char dnet_ntoa ();
30017int
30018main ()
30019{
30020return dnet_ntoa ();
30021  ;
30022  return 0;
30023}
30024_ACEOF
30025if ac_fn_cxx_try_link "$LINENO"; then :
30026  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30027else
30028  ac_cv_lib_dnet_stub_dnet_ntoa=no
30029fi
30030rm -f core conftest.err conftest.$ac_objext \
30031    conftest$ac_exeext conftest.$ac_ext
30032LIBS=$ac_check_lib_save_LIBS
30033fi
30034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30035$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30036if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
30037  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30038fi
30039
30040    fi
30041fi
30042rm -f core conftest.err conftest.$ac_objext \
30043    conftest$ac_exeext conftest.$ac_ext
30044    LIBS="$ac_xsave_LIBS"
30045
30046    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30047    # to get the SysV transport functions.
30048    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30049    # needs -lnsl.
30050    # The nsl library prevents programs from opening the X display
30051    # on Irix 5.2, according to T.E. Dickey.
30052    # The functions gethostbyname, getservbyname, and inet_addr are
30053    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30054    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30055if test "x$ac_cv_func_gethostbyname" = x""yes; then :
30056
30057fi
30058
30059    if test $ac_cv_func_gethostbyname = no; then
30060      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30061$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30062if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
30063  $as_echo_n "(cached) " >&6
30064else
30065  ac_check_lib_save_LIBS=$LIBS
30066LIBS="-lnsl  $LIBS"
30067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30068/* end confdefs.h.  */
30069
30070/* Override any GCC internal prototype to avoid an error.
30071   Use char because int might match the return type of a GCC
30072   builtin and then its argument prototype would still apply.  */
30073#ifdef __cplusplus
30074extern "C"
30075#endif
30076char gethostbyname ();
30077int
30078main ()
30079{
30080return gethostbyname ();
30081  ;
30082  return 0;
30083}
30084_ACEOF
30085if ac_fn_cxx_try_link "$LINENO"; then :
30086  ac_cv_lib_nsl_gethostbyname=yes
30087else
30088  ac_cv_lib_nsl_gethostbyname=no
30089fi
30090rm -f core conftest.err conftest.$ac_objext \
30091    conftest$ac_exeext conftest.$ac_ext
30092LIBS=$ac_check_lib_save_LIBS
30093fi
30094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30095$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30096if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
30097  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30098fi
30099
30100      if test $ac_cv_lib_nsl_gethostbyname = no; then
30101	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30102$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30103if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
30104  $as_echo_n "(cached) " >&6
30105else
30106  ac_check_lib_save_LIBS=$LIBS
30107LIBS="-lbsd  $LIBS"
30108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30109/* end confdefs.h.  */
30110
30111/* Override any GCC internal prototype to avoid an error.
30112   Use char because int might match the return type of a GCC
30113   builtin and then its argument prototype would still apply.  */
30114#ifdef __cplusplus
30115extern "C"
30116#endif
30117char gethostbyname ();
30118int
30119main ()
30120{
30121return gethostbyname ();
30122  ;
30123  return 0;
30124}
30125_ACEOF
30126if ac_fn_cxx_try_link "$LINENO"; then :
30127  ac_cv_lib_bsd_gethostbyname=yes
30128else
30129  ac_cv_lib_bsd_gethostbyname=no
30130fi
30131rm -f core conftest.err conftest.$ac_objext \
30132    conftest$ac_exeext conftest.$ac_ext
30133LIBS=$ac_check_lib_save_LIBS
30134fi
30135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30136$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30137if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
30138  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30139fi
30140
30141      fi
30142    fi
30143
30144    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30145    # socket/setsockopt and other routines are undefined under SCO ODT
30146    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30147    # on later versions), says Simon Leinen: it contains gethostby*
30148    # variants that don't use the name server (or something).  -lsocket
30149    # must be given before -lnsl if both are needed.  We assume that
30150    # if connect needs -lnsl, so does gethostbyname.
30151    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30152if test "x$ac_cv_func_connect" = x""yes; then :
30153
30154fi
30155
30156    if test $ac_cv_func_connect = no; then
30157      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30158$as_echo_n "checking for connect in -lsocket... " >&6; }
30159if test "${ac_cv_lib_socket_connect+set}" = set; then :
30160  $as_echo_n "(cached) " >&6
30161else
30162  ac_check_lib_save_LIBS=$LIBS
30163LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30165/* end confdefs.h.  */
30166
30167/* Override any GCC internal prototype to avoid an error.
30168   Use char because int might match the return type of a GCC
30169   builtin and then its argument prototype would still apply.  */
30170#ifdef __cplusplus
30171extern "C"
30172#endif
30173char connect ();
30174int
30175main ()
30176{
30177return connect ();
30178  ;
30179  return 0;
30180}
30181_ACEOF
30182if ac_fn_cxx_try_link "$LINENO"; then :
30183  ac_cv_lib_socket_connect=yes
30184else
30185  ac_cv_lib_socket_connect=no
30186fi
30187rm -f core conftest.err conftest.$ac_objext \
30188    conftest$ac_exeext conftest.$ac_ext
30189LIBS=$ac_check_lib_save_LIBS
30190fi
30191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30192$as_echo "$ac_cv_lib_socket_connect" >&6; }
30193if test "x$ac_cv_lib_socket_connect" = x""yes; then :
30194  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30195fi
30196
30197    fi
30198
30199    # Guillermo Gomez says -lposix is necessary on A/UX.
30200    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30201if test "x$ac_cv_func_remove" = x""yes; then :
30202
30203fi
30204
30205    if test $ac_cv_func_remove = no; then
30206      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30207$as_echo_n "checking for remove in -lposix... " >&6; }
30208if test "${ac_cv_lib_posix_remove+set}" = set; then :
30209  $as_echo_n "(cached) " >&6
30210else
30211  ac_check_lib_save_LIBS=$LIBS
30212LIBS="-lposix  $LIBS"
30213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30214/* end confdefs.h.  */
30215
30216/* Override any GCC internal prototype to avoid an error.
30217   Use char because int might match the return type of a GCC
30218   builtin and then its argument prototype would still apply.  */
30219#ifdef __cplusplus
30220extern "C"
30221#endif
30222char remove ();
30223int
30224main ()
30225{
30226return remove ();
30227  ;
30228  return 0;
30229}
30230_ACEOF
30231if ac_fn_cxx_try_link "$LINENO"; then :
30232  ac_cv_lib_posix_remove=yes
30233else
30234  ac_cv_lib_posix_remove=no
30235fi
30236rm -f core conftest.err conftest.$ac_objext \
30237    conftest$ac_exeext conftest.$ac_ext
30238LIBS=$ac_check_lib_save_LIBS
30239fi
30240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30241$as_echo "$ac_cv_lib_posix_remove" >&6; }
30242if test "x$ac_cv_lib_posix_remove" = x""yes; then :
30243  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30244fi
30245
30246    fi
30247
30248    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30249    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30250if test "x$ac_cv_func_shmat" = x""yes; then :
30251
30252fi
30253
30254    if test $ac_cv_func_shmat = no; then
30255      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30256$as_echo_n "checking for shmat in -lipc... " >&6; }
30257if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
30258  $as_echo_n "(cached) " >&6
30259else
30260  ac_check_lib_save_LIBS=$LIBS
30261LIBS="-lipc  $LIBS"
30262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30263/* end confdefs.h.  */
30264
30265/* Override any GCC internal prototype to avoid an error.
30266   Use char because int might match the return type of a GCC
30267   builtin and then its argument prototype would still apply.  */
30268#ifdef __cplusplus
30269extern "C"
30270#endif
30271char shmat ();
30272int
30273main ()
30274{
30275return shmat ();
30276  ;
30277  return 0;
30278}
30279_ACEOF
30280if ac_fn_cxx_try_link "$LINENO"; then :
30281  ac_cv_lib_ipc_shmat=yes
30282else
30283  ac_cv_lib_ipc_shmat=no
30284fi
30285rm -f core conftest.err conftest.$ac_objext \
30286    conftest$ac_exeext conftest.$ac_ext
30287LIBS=$ac_check_lib_save_LIBS
30288fi
30289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30290$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30291if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
30292  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30293fi
30294
30295    fi
30296  fi
30297
30298  # Check for libraries that X11R6 Xt/Xaw programs need.
30299  ac_save_LDFLAGS=$LDFLAGS
30300  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30301  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30302  # check for ICE first), but we must link in the order -lSM -lICE or
30303  # we get undefined symbols.  So assume we have SM if we have ICE.
30304  # These have to be linked with before -lX11, unlike the other
30305  # libraries we check for below, so use a different variable.
30306  # John Interrante, Karl Berry
30307  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30308$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30309if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
30310  $as_echo_n "(cached) " >&6
30311else
30312  ac_check_lib_save_LIBS=$LIBS
30313LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30315/* end confdefs.h.  */
30316
30317/* Override any GCC internal prototype to avoid an error.
30318   Use char because int might match the return type of a GCC
30319   builtin and then its argument prototype would still apply.  */
30320#ifdef __cplusplus
30321extern "C"
30322#endif
30323char IceConnectionNumber ();
30324int
30325main ()
30326{
30327return IceConnectionNumber ();
30328  ;
30329  return 0;
30330}
30331_ACEOF
30332if ac_fn_cxx_try_link "$LINENO"; then :
30333  ac_cv_lib_ICE_IceConnectionNumber=yes
30334else
30335  ac_cv_lib_ICE_IceConnectionNumber=no
30336fi
30337rm -f core conftest.err conftest.$ac_objext \
30338    conftest$ac_exeext conftest.$ac_ext
30339LIBS=$ac_check_lib_save_LIBS
30340fi
30341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30342$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30343if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
30344  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30345fi
30346
30347  LDFLAGS=$ac_save_LDFLAGS
30348
30349fi
30350
30351
30352# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30353# this doesn't make sense so we remove it.
30354if test "x$COMPILE_TYPE" = xcross; then
30355  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30356fi
30357
30358if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30359
30360    # Print a helpful message on how to acquire the necessary build dependency.
30361    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30362    MISSING_DEPENDENCY=x11
30363    PKGHANDLER_COMMAND=
30364
30365    case $PKGHANDLER in
30366	apt-get)
30367                apt_help     $MISSING_DEPENDENCY ;;
30368    yum)
30369                yum_help     $MISSING_DEPENDENCY ;;
30370	port)
30371                port_help    $MISSING_DEPENDENCY ;;
30372	pkgutil)
30373                pkgutil_help $MISSING_DEPENDENCY ;;
30374	pkgadd)
30375                pkgadd_help  $MISSING_DEPENDENCY ;;
30376    * )
30377      break ;;
30378    esac
30379
30380    if test "x$PKGHANDLER_COMMAND" != x; then
30381        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30382    fi
30383
30384    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30385fi
30386
30387# Some of the old makefiles require a setting of OPENWIN_HOME
30388# Since the X11R6 directory has disappeared on later Linuxes,
30389# we need to probe for it.
30390if test "x$OPENJDK_TARGET_OS" = xlinux; then
30391    if test -d "$SYS_ROOT/usr/X11R6"; then
30392        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30393    fi
30394    if test -d "$SYS_ROOT/usr/include/X11"; then
30395        OPENWIN_HOME="$SYS_ROOT/usr"
30396    fi
30397fi
30398if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30399    OPENWIN_HOME="/usr/openwin"
30400fi
30401
30402
30403
30404#
30405# Weird Sol10 something check...TODO change to try compile
30406#
30407if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30408  if test "`uname -r`" = "5.10"; then
30409     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30410     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30411     fi
30412  fi
30413fi
30414
30415ac_ext=c
30416ac_cpp='$CPP $CPPFLAGS'
30417ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30418ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30419ac_compiler_gnu=$ac_cv_c_compiler_gnu
30420
30421OLD_CFLAGS="$CFLAGS"
30422CFLAGS="$CFLAGS $X_CFLAGS"
30423
30424# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30425for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30426do :
30427  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30428ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30429                   # include <X11/Xutil.h>
30430
30431"
30432if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30433  cat >>confdefs.h <<_ACEOF
30434#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30435_ACEOF
30436 X11_A_OK=yes
30437else
30438  X11_A_OK=no; break
30439fi
30440
30441done
30442
30443
30444CFLAGS="$OLD_CFLAGS"
30445ac_ext=cpp
30446ac_cpp='$CXXCPP $CPPFLAGS'
30447ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30448ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30449ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30450
30451
30452if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30453
30454    # Print a helpful message on how to acquire the necessary build dependency.
30455    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30456    MISSING_DEPENDENCY=x11
30457    PKGHANDLER_COMMAND=
30458
30459    case $PKGHANDLER in
30460	apt-get)
30461                apt_help     $MISSING_DEPENDENCY ;;
30462    yum)
30463                yum_help     $MISSING_DEPENDENCY ;;
30464	port)
30465                port_help    $MISSING_DEPENDENCY ;;
30466	pkgutil)
30467                pkgutil_help $MISSING_DEPENDENCY ;;
30468	pkgadd)
30469                pkgadd_help  $MISSING_DEPENDENCY ;;
30470    * )
30471      break ;;
30472    esac
30473
30474    if test "x$PKGHANDLER_COMMAND" != x; then
30475        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30476    fi
30477
30478    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30479fi
30480
30481
30482
30483
30484
30485
30486###############################################################################
30487#
30488# The common unix printing system cups is used to print from java.
30489#
30490
30491# Check whether --with-cups was given.
30492if test "${with_cups+set}" = set; then :
30493  withval=$with_cups;
30494fi
30495
30496
30497# Check whether --with-cups-include was given.
30498if test "${with_cups_include+set}" = set; then :
30499  withval=$with_cups_include;
30500fi
30501
30502
30503if test "x$CUPS_NOT_NEEDED" = xyes; then
30504	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30505		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30506$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30507	fi
30508	CUPS_CFLAGS=
30509else
30510	CUPS_FOUND=no
30511
30512	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30513	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30514	fi
30515
30516	if test "x${with_cups}" != x; then
30517	    CUPS_CFLAGS="-I${with_cups}/include"
30518	    CUPS_FOUND=yes
30519	fi
30520	if test "x${with_cups_include}" != x; then
30521	    CUPS_CFLAGS="-I${with_cups_include}"
30522	    CUPS_FOUND=yes
30523	fi
30524	if test "x$CUPS_FOUND" = xno; then
30525
30526
30527    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30528        # Source the builddeps file again, to make sure it uses the latest variables!
30529        . $builddepsfile
30530        # Look for a target and build machine specific resource!
30531        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30532        if test "x$resource" = x; then
30533            # Ok, lets instead look for a target specific resource
30534            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30535        fi
30536        if test "x$resource" = x; then
30537            # Ok, lets instead look for a build specific resource
30538            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30539        fi
30540        if test "x$resource" = x; then
30541            # Ok, lets instead look for a generic resource
30542            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30543            resource=${builddep_cups}
30544        fi
30545        if test "x$resource" != x; then
30546            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30547$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30548	    # If the resource in the builddeps.conf file is an existing directory,
30549	    # for example /java/linux/cups
30550	    if test -d ${resource}; then
30551	       depdir=${resource}
30552	    else
30553
30554# cups is for example mymodule
30555# $resource is for example libs/general/libmymod_1_2_3.zip
30556# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30557# $with_builddeps_dir is for example /localhome/builddeps
30558# depdir is the name of the variable into which we store the depdir, eg MYMOD
30559# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30560# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30561    filename=`basename $resource`
30562    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30563    filebase=${filename%%.*}
30564    extension=${filename#*.}
30565    installdir=$with_builddeps_dir/$filebase
30566    if test ! -f $installdir/$filename.unpacked; then
30567        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30568$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30569        if test ! -d $installdir; then
30570            mkdir -p $installdir
30571        fi
30572        if test ! -d $installdir; then
30573            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30574        fi
30575        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30576        touch $tmpfile
30577        if test ! -f $tmpfile; then
30578            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30579        fi
30580
30581    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30582    # $tmpfile is the local file name for the downloaded file.
30583    VALID_TOOL=no
30584    if test "x$BDEPS_FTP" = xwget; then
30585       VALID_TOOL=yes
30586       wget -O $tmpfile $with_builddeps_server/$resource
30587    fi
30588    if test "x$BDEPS_FTP" = xlftp; then
30589       VALID_TOOL=yes
30590       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30591    fi
30592    if test "x$BDEPS_FTP" = xftp; then
30593        VALID_TOOL=yes
30594        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30595        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30596        FTPUSERPWD=${FTPSERVER%%@*}
30597        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30598            FTPUSER=${userpwd%%:*}
30599            FTPPWD=${userpwd#*@}
30600            FTPSERVER=${FTPSERVER#*@}
30601        else
30602            FTPUSER=ftp
30603            FTPPWD=ftp
30604        fi
30605        # the "pass" command does not work on some
30606        # ftp clients (read ftp.exe) but if it works,
30607        # passive mode is better!
30608        (\
30609            echo "user $FTPUSER $FTPPWD"        ;\
30610            echo "pass"                         ;\
30611            echo "bin"                          ;\
30612            echo "get $FTPPATH $tmpfile"              ;\
30613        ) | ftp -in $FTPSERVER
30614    fi
30615    if test "x$VALID_TOOL" != xyes; then
30616       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30617    fi
30618
30619        mv $tmpfile $installdir/$filename
30620        if test ! -s $installdir/$filename; then
30621            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30622        fi
30623        case "$extension" in
30624            zip)  echo "Unzipping $installdir/$filename..."
30625               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30626            ;;
30627            tar.gz) echo "Untaring $installdir/$filename..."
30628               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30629            ;;
30630            tgz) echo "Untaring $installdir/$filename..."
30631               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30632            ;;
30633            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30634            ;;
30635        esac
30636    fi
30637    if test -f $installdir/$filename.unpacked; then
30638        depdir=$installdir
30639    fi
30640
30641	    fi
30642            # Source the builddeps file again, because in the previous command, the depdir
30643            # was updated to point at the current build dependency install directory.
30644            . $builddepsfile
30645            # Now extract variables from the builddeps.conf files.
30646            theroot=${builddep_cups_ROOT}
30647            thecflags=${builddep_cups_CFLAGS}
30648            thelibs=${builddep_cups_LIBS}
30649            if test "x$depdir" = x; then
30650                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30651            fi
30652            CUPS=$depdir
30653            if test "x$theroot" != x; then
30654               CUPS="$theroot"
30655            fi
30656            if test "x$thecflags" != x; then
30657               CUPS_CFLAGS="$thecflags"
30658            fi
30659            if test "x$thelibs" != x; then
30660               CUPS_LIBS="$thelibs"
30661            fi
30662            CUPS_FOUND=yes
30663
30664        fi
30665
30666    fi
30667
30668	fi
30669	if test "x$CUPS_FOUND" = xno; then
30670	    # Are the cups headers installed in the default /usr/include location?
30671	    for ac_header in cups/cups.h cups/ppd.h
30672do :
30673  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30674ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30675if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30676  cat >>confdefs.h <<_ACEOF
30677#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30678_ACEOF
30679 CUPS_FOUND=yes
30680	                      CUPS_CFLAGS=
30681	                      DEFAULT_CUPS=yes
30682fi
30683
30684done
30685
30686	fi
30687	if test "x$CUPS_FOUND" = xno; then
30688	    # Getting nervous now? Lets poke around for standard Solaris third-party
30689	    # package installation locations.
30690	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30691$as_echo_n "checking for cups headers... " >&6; }
30692	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30693	       # An SFW package seems to be installed!
30694	       CUPS_FOUND=yes
30695	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30696	    elif test -s /opt/csw/include/cups/cups.h; then
30697	       # A CSW package seems to be installed!
30698	       CUPS_FOUND=yes
30699	       CUPS_CFLAGS="-I/opt/csw/include"
30700	    fi
30701	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30702$as_echo "$CUPS_FOUND" >&6; }
30703	fi
30704	if test "x$CUPS_FOUND" = xno; then
30705
30706    # Print a helpful message on how to acquire the necessary build dependency.
30707    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30708    MISSING_DEPENDENCY=cups
30709    PKGHANDLER_COMMAND=
30710
30711    case $PKGHANDLER in
30712	apt-get)
30713                apt_help     $MISSING_DEPENDENCY ;;
30714    yum)
30715                yum_help     $MISSING_DEPENDENCY ;;
30716	port)
30717                port_help    $MISSING_DEPENDENCY ;;
30718	pkgutil)
30719                pkgutil_help $MISSING_DEPENDENCY ;;
30720	pkgadd)
30721                pkgadd_help  $MISSING_DEPENDENCY ;;
30722    * )
30723      break ;;
30724    esac
30725
30726    if test "x$PKGHANDLER_COMMAND" != x; then
30727        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30728    fi
30729
30730	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30731	fi
30732fi
30733
30734
30735
30736
30737
30738
30739###############################################################################
30740#
30741# The ubiquitous freetype2 library is used to render fonts.
30742#
30743
30744# Check whether --with-freetype was given.
30745if test "${with_freetype+set}" = set; then :
30746  withval=$with_freetype;
30747fi
30748
30749
30750# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30751USING_SYSTEM_FT_LIB=false
30752
30753if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30754	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30755		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30756$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30757	fi
30758	FREETYPE2_CFLAGS=
30759	FREETYPE2_LIBS=
30760        FREETYPE2_LIB_PATH=
30761else
30762	FREETYPE2_FOUND=no
30763
30764	if test "x$with_freetype" != x; then
30765
30766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30767
30768  # Input might be given as Windows format, start by converting to
30769  # unix format.
30770  path="$with_freetype"
30771  new_path=`$CYGPATH -u "$path"`
30772
30773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30776  # "foo.exe" is OK but "foo" is an error.
30777  #
30778  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30779  # It is also a way to make sure we got the proper file name for the real test later on.
30780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30781  if test "x$test_shortpath" = x; then
30782    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30783$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30784    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30785  fi
30786
30787  # Call helper function which possibly converts this using DOS-style short mode.
30788  # If so, the updated path is stored in $new_path.
30789
30790  input_path="$new_path"
30791  # Check if we need to convert this using DOS-style short mode. If the path
30792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30793  # take no chances and rewrite it.
30794  # Note: m4 eats our [], so we need to use [ and ] instead.
30795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30796  if test "x$has_forbidden_chars" != x; then
30797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30801      # Going to short mode and back again did indeed matter. Since short mode is
30802      # case insensitive, let's make it lowercase to improve readability.
30803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30804      # Now convert it back to Unix-stile (cygpath)
30805      input_path=`$CYGPATH -u "$shortmode_path"`
30806      new_path="$input_path"
30807    fi
30808  fi
30809
30810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30811  if test "x$test_cygdrive_prefix" = x; then
30812    # As a simple fix, exclude /usr/bin since it's not a real path.
30813    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30815      # a path prefixed by /cygdrive for fixpath to work.
30816      new_path="$CYGWIN_ROOT_PATH$input_path"
30817    fi
30818  fi
30819
30820
30821  if test "x$path" != "x$new_path"; then
30822    with_freetype="$new_path"
30823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30824$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30825  fi
30826
30827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30828
30829  path="$with_freetype"
30830  has_colon=`$ECHO $path | $GREP ^.:`
30831  new_path="$path"
30832  if test "x$has_colon" = x; then
30833    # Not in mixed or Windows style, start by that.
30834    new_path=`cmd //c echo $path`
30835  fi
30836
30837
30838  input_path="$new_path"
30839  # Check if we need to convert this using DOS-style short mode. If the path
30840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30841  # take no chances and rewrite it.
30842  # Note: m4 eats our [], so we need to use [ and ] instead.
30843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30844  if test "x$has_forbidden_chars" != x; then
30845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30846    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30847  fi
30848
30849
30850  windows_path="$new_path"
30851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30852    unix_path=`$CYGPATH -u "$windows_path"`
30853    new_path="$unix_path"
30854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30856    new_path="$unix_path"
30857  fi
30858
30859  if test "x$path" != "x$new_path"; then
30860    with_freetype="$new_path"
30861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30862$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30863  fi
30864
30865  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30866  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30867
30868  else
30869    # We're on a posix platform. Hooray! :)
30870    path="$with_freetype"
30871
30872    if test ! -f "$path" && test ! -d "$path"; then
30873      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30874    fi
30875
30876    has_space=`$ECHO "$path" | $GREP " "`
30877    if test "x$has_space" != x; then
30878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30879$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30880      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30881    fi
30882  fi
30883
30884	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30885            FREETYPE2_LIB_PATH="$with_freetype/lib"
30886            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30887                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30888                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30889            fi
30890            if test "x$OPENJDK_TARGET_OS" = xwindows; then
30891                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30892            fi
30893	    FREETYPE2_CFLAGS="-I$with_freetype/include"
30894            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30895                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30896            fi
30897 	    FREETYPE2_FOUND=yes
30898   	    if test "x$FREETYPE2_FOUND" = xyes; then
30899	        # Verify that the directories exist
30900                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30901		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30902		fi
30903	        # List the contents of the lib.
30904		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30905                if test "x$FREETYPELIB" = x; then
30906		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30907		fi
30908	        # Check one h-file
30909                if ! test -s "$with_freetype/include/ft2build.h"; then
30910		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30911		fi
30912            fi
30913        fi
30914	if test "x$FREETYPE2_FOUND" = xno; then
30915
30916
30917    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30918        # Source the builddeps file again, to make sure it uses the latest variables!
30919        . $builddepsfile
30920        # Look for a target and build machine specific resource!
30921        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30922        if test "x$resource" = x; then
30923            # Ok, lets instead look for a target specific resource
30924            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30925        fi
30926        if test "x$resource" = x; then
30927            # Ok, lets instead look for a build specific resource
30928            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30929        fi
30930        if test "x$resource" = x; then
30931            # Ok, lets instead look for a generic resource
30932            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30933            resource=${builddep_freetype2}
30934        fi
30935        if test "x$resource" != x; then
30936            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
30937$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
30938	    # If the resource in the builddeps.conf file is an existing directory,
30939	    # for example /java/linux/cups
30940	    if test -d ${resource}; then
30941	       depdir=${resource}
30942	    else
30943
30944# freetype2 is for example mymodule
30945# $resource is for example libs/general/libmymod_1_2_3.zip
30946# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30947# $with_builddeps_dir is for example /localhome/builddeps
30948# depdir is the name of the variable into which we store the depdir, eg MYMOD
30949# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30950# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30951    filename=`basename $resource`
30952    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30953    filebase=${filename%%.*}
30954    extension=${filename#*.}
30955    installdir=$with_builddeps_dir/$filebase
30956    if test ! -f $installdir/$filename.unpacked; then
30957        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
30958$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30959        if test ! -d $installdir; then
30960            mkdir -p $installdir
30961        fi
30962        if test ! -d $installdir; then
30963            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30964        fi
30965        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
30966        touch $tmpfile
30967        if test ! -f $tmpfile; then
30968            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30969        fi
30970
30971    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30972    # $tmpfile is the local file name for the downloaded file.
30973    VALID_TOOL=no
30974    if test "x$BDEPS_FTP" = xwget; then
30975       VALID_TOOL=yes
30976       wget -O $tmpfile $with_builddeps_server/$resource
30977    fi
30978    if test "x$BDEPS_FTP" = xlftp; then
30979       VALID_TOOL=yes
30980       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30981    fi
30982    if test "x$BDEPS_FTP" = xftp; then
30983        VALID_TOOL=yes
30984        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30985        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30986        FTPUSERPWD=${FTPSERVER%%@*}
30987        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30988            FTPUSER=${userpwd%%:*}
30989            FTPPWD=${userpwd#*@}
30990            FTPSERVER=${FTPSERVER#*@}
30991        else
30992            FTPUSER=ftp
30993            FTPPWD=ftp
30994        fi
30995        # the "pass" command does not work on some
30996        # ftp clients (read ftp.exe) but if it works,
30997        # passive mode is better!
30998        (\
30999            echo "user $FTPUSER $FTPPWD"        ;\
31000            echo "pass"                         ;\
31001            echo "bin"                          ;\
31002            echo "get $FTPPATH $tmpfile"              ;\
31003        ) | ftp -in $FTPSERVER
31004    fi
31005    if test "x$VALID_TOOL" != xyes; then
31006       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31007    fi
31008
31009        mv $tmpfile $installdir/$filename
31010        if test ! -s $installdir/$filename; then
31011            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31012        fi
31013        case "$extension" in
31014            zip)  echo "Unzipping $installdir/$filename..."
31015               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31016            ;;
31017            tar.gz) echo "Untaring $installdir/$filename..."
31018               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31019            ;;
31020            tgz) echo "Untaring $installdir/$filename..."
31021               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31022            ;;
31023            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31024            ;;
31025        esac
31026    fi
31027    if test -f $installdir/$filename.unpacked; then
31028        depdir=$installdir
31029    fi
31030
31031	    fi
31032            # Source the builddeps file again, because in the previous command, the depdir
31033            # was updated to point at the current build dependency install directory.
31034            . $builddepsfile
31035            # Now extract variables from the builddeps.conf files.
31036            theroot=${builddep_freetype2_ROOT}
31037            thecflags=${builddep_freetype2_CFLAGS}
31038            thelibs=${builddep_freetype2_LIBS}
31039            if test "x$depdir" = x; then
31040                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31041            fi
31042            FREETYPE2=$depdir
31043            if test "x$theroot" != x; then
31044               FREETYPE2="$theroot"
31045            fi
31046            if test "x$thecflags" != x; then
31047               FREETYPE2_CFLAGS="$thecflags"
31048            fi
31049            if test "x$thelibs" != x; then
31050               FREETYPE2_LIBS="$thelibs"
31051            fi
31052            FREETYPE2_FOUND=yes
31053            else FREETYPE2_FOUND=no
31054
31055        fi
31056        else FREETYPE2_FOUND=no
31057
31058    fi
31059
31060            USING_SYSTEM_FT_LIB=true
31061	fi
31062	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31063            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31064
31065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31066
31067  # Input might be given as Windows format, start by converting to
31068  # unix format.
31069  path="$FREETYPELOCATION"
31070  new_path=`$CYGPATH -u "$path"`
31071
31072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31075  # "foo.exe" is OK but "foo" is an error.
31076  #
31077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31078  # It is also a way to make sure we got the proper file name for the real test later on.
31079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31080  if test "x$test_shortpath" = x; then
31081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31082$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31083    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31084  fi
31085
31086  # Call helper function which possibly converts this using DOS-style short mode.
31087  # If so, the updated path is stored in $new_path.
31088
31089  input_path="$new_path"
31090  # Check if we need to convert this using DOS-style short mode. If the path
31091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31092  # take no chances and rewrite it.
31093  # Note: m4 eats our [], so we need to use [ and ] instead.
31094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31095  if test "x$has_forbidden_chars" != x; then
31096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31100      # Going to short mode and back again did indeed matter. Since short mode is
31101      # case insensitive, let's make it lowercase to improve readability.
31102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31103      # Now convert it back to Unix-stile (cygpath)
31104      input_path=`$CYGPATH -u "$shortmode_path"`
31105      new_path="$input_path"
31106    fi
31107  fi
31108
31109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31110  if test "x$test_cygdrive_prefix" = x; then
31111    # As a simple fix, exclude /usr/bin since it's not a real path.
31112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31114      # a path prefixed by /cygdrive for fixpath to work.
31115      new_path="$CYGWIN_ROOT_PATH$input_path"
31116    fi
31117  fi
31118
31119
31120  if test "x$path" != "x$new_path"; then
31121    FREETYPELOCATION="$new_path"
31122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31123$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31124  fi
31125
31126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31127
31128  path="$FREETYPELOCATION"
31129  has_colon=`$ECHO $path | $GREP ^.:`
31130  new_path="$path"
31131  if test "x$has_colon" = x; then
31132    # Not in mixed or Windows style, start by that.
31133    new_path=`cmd //c echo $path`
31134  fi
31135
31136
31137  input_path="$new_path"
31138  # Check if we need to convert this using DOS-style short mode. If the path
31139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31140  # take no chances and rewrite it.
31141  # Note: m4 eats our [], so we need to use [ and ] instead.
31142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31143  if test "x$has_forbidden_chars" != x; then
31144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31146  fi
31147
31148
31149  windows_path="$new_path"
31150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31151    unix_path=`$CYGPATH -u "$windows_path"`
31152    new_path="$unix_path"
31153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31155    new_path="$unix_path"
31156  fi
31157
31158  if test "x$path" != "x$new_path"; then
31159    FREETYPELOCATION="$new_path"
31160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31161$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31162  fi
31163
31164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31166
31167  else
31168    # We're on a posix platform. Hooray! :)
31169    path="$FREETYPELOCATION"
31170
31171    if test ! -f "$path" && test ! -d "$path"; then
31172      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31173    fi
31174
31175    has_space=`$ECHO "$path" | $GREP " "`
31176    if test "x$has_space" != x; then
31177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31178$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31179      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31180    fi
31181  fi
31182
31183	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31184$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31185	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31186	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31187	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31188 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31189                if ! test -s "$FREETYPE2_LIBS"; then
31190		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31191		fi
31192                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31193		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31194		fi
31195                USING_SYSTEM_FT_LIB=true
31196                FREETYPE2_FOUND=yes
31197	    fi
31198	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31199$as_echo "$FREETYPE2_FOUND" >&6; }
31200        fi
31201	if test "x$FREETYPE2_FOUND" = xno; then
31202
31203pkg_failed=no
31204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31205$as_echo_n "checking for FREETYPE2... " >&6; }
31206
31207if test -n "$FREETYPE2_CFLAGS"; then
31208    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31209 elif test -n "$PKG_CONFIG"; then
31210    if test -n "$PKG_CONFIG" && \
31211    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31212  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31213  ac_status=$?
31214  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31215  test $ac_status = 0; }; then
31216  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31217else
31218  pkg_failed=yes
31219fi
31220 else
31221    pkg_failed=untried
31222fi
31223if test -n "$FREETYPE2_LIBS"; then
31224    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31225 elif test -n "$PKG_CONFIG"; then
31226    if test -n "$PKG_CONFIG" && \
31227    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31228  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31229  ac_status=$?
31230  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31231  test $ac_status = 0; }; then
31232  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31233else
31234  pkg_failed=yes
31235fi
31236 else
31237    pkg_failed=untried
31238fi
31239
31240
31241
31242if test $pkg_failed = yes; then
31243
31244if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31245        _pkg_short_errors_supported=yes
31246else
31247        _pkg_short_errors_supported=no
31248fi
31249        if test $_pkg_short_errors_supported = yes; then
31250	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31251        else
31252	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31253        fi
31254	# Put the nasty error message in config.log where it belongs
31255	echo "$FREETYPE2_PKG_ERRORS" >&5
31256
31257	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31258$as_echo "no" >&6; }
31259                FREETYPE2_FOUND=no
31260elif test $pkg_failed = untried; then
31261	FREETYPE2_FOUND=no
31262else
31263	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31264	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31266$as_echo "yes" >&6; }
31267	FREETYPE2_FOUND=yes
31268fi
31269            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31270            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31271            USING_SYSTEM_FT_LIB=true
31272            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31273            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31274              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31275            fi
31276	fi
31277	if test "x$FREETYPE2_FOUND" = xno; then
31278	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31279$as_echo_n "checking for freetype in some standard locations... " >&6; }
31280
31281	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
31282	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
31283	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
31284	    fi
31285	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
31286	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
31287	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31288	    fi
31289
31290	    PREV_CXXCFLAGS="$CXXFLAGS"
31291	    PREV_LDFLAGS="$LDFLAGS"
31292	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31293	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31294	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31295/* end confdefs.h.  */
31296#include<ft2build.h>
31297	                    #include FT_FREETYPE_H
31298	                   int main() { return 0; }
31299
31300_ACEOF
31301if ac_fn_cxx_try_link "$LINENO"; then :
31302
31303	                      # Yes, the default cflags and libs did the trick.
31304	                      FREETYPE2_FOUND=yes
31305	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31306	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31307
31308else
31309
31310	                      FREETYPE2_FOUND=no
31311
31312fi
31313rm -f core conftest.err conftest.$ac_objext \
31314    conftest$ac_exeext conftest.$ac_ext
31315            CXXCFLAGS="$PREV_CXXFLAGS"
31316	    LDFLAGS="$PREV_LDFLAGS"
31317	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31318$as_echo "$FREETYPE2_FOUND" >&6; }
31319            USING_SYSTEM_FT_LIB=true
31320	fi
31321	if test "x$FREETYPE2_FOUND" = xno; then
31322
31323    # Print a helpful message on how to acquire the necessary build dependency.
31324    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31325    MISSING_DEPENDENCY=freetype2
31326    PKGHANDLER_COMMAND=
31327
31328    case $PKGHANDLER in
31329	apt-get)
31330                apt_help     $MISSING_DEPENDENCY ;;
31331    yum)
31332                yum_help     $MISSING_DEPENDENCY ;;
31333	port)
31334                port_help    $MISSING_DEPENDENCY ;;
31335	pkgutil)
31336                pkgutil_help $MISSING_DEPENDENCY ;;
31337	pkgadd)
31338                pkgadd_help  $MISSING_DEPENDENCY ;;
31339    * )
31340      break ;;
31341    esac
31342
31343    if test "x$PKGHANDLER_COMMAND" != x; then
31344        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31345    fi
31346
31347		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31348	fi
31349
31350        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31351            # AC_CHECK_LIB does not support use of cl.exe
31352            PREV_LDFLAGS="$LDFLAGS"
31353            LDFLAGS="$FREETYPE2_LIBS"
31354            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31355$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31356if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
31357  $as_echo_n "(cached) " >&6
31358else
31359  ac_check_lib_save_LIBS=$LIBS
31360LIBS="-lfreetype  $LIBS"
31361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31362/* end confdefs.h.  */
31363
31364/* Override any GCC internal prototype to avoid an error.
31365   Use char because int might match the return type of a GCC
31366   builtin and then its argument prototype would still apply.  */
31367#ifdef __cplusplus
31368extern "C"
31369#endif
31370char FT_Init_FreeType ();
31371int
31372main ()
31373{
31374return FT_Init_FreeType ();
31375  ;
31376  return 0;
31377}
31378_ACEOF
31379if ac_fn_cxx_try_link "$LINENO"; then :
31380  ac_cv_lib_freetype_FT_Init_FreeType=yes
31381else
31382  ac_cv_lib_freetype_FT_Init_FreeType=no
31383fi
31384rm -f core conftest.err conftest.$ac_objext \
31385    conftest$ac_exeext conftest.$ac_ext
31386LIBS=$ac_check_lib_save_LIBS
31387fi
31388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31389$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31390if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
31391  FREETYPE2_FOUND=true
31392else
31393  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31394fi
31395
31396            LDFLAGS="$PREV_LDFLAGS"
31397        fi
31398fi
31399
31400
31401
31402
31403
31404
31405
31406
31407
31408###############################################################################
31409#
31410# Check for alsa headers and libraries. Used on Linux/GNU systems.
31411#
31412
31413# Check whether --with-alsa was given.
31414if test "${with_alsa+set}" = set; then :
31415  withval=$with_alsa;
31416fi
31417
31418
31419# Check whether --with-alsa-include was given.
31420if test "${with_alsa_include+set}" = set; then :
31421  withval=$with_alsa_include;
31422fi
31423
31424
31425# Check whether --with-alsa-lib was given.
31426if test "${with_alsa_lib+set}" = set; then :
31427  withval=$with_alsa_lib;
31428fi
31429
31430
31431if test "x$ALSA_NOT_NEEDED" = xyes; then
31432	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31433		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31434$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31435	fi
31436	ALSA_CFLAGS=
31437	ALSA_LIBS=
31438else
31439	ALSA_FOUND=no
31440
31441	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31442	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31443	fi
31444
31445	if test "x${with_alsa}" != x; then
31446	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31447	    ALSA_CFLAGS="-I${with_alsa}/include"
31448	    ALSA_FOUND=yes
31449	fi
31450	if test "x${with_alsa_include}" != x; then
31451	    ALSA_CFLAGS="-I${with_alsa_include}"
31452	    ALSA_FOUND=yes
31453	fi
31454	if test "x${with_alsa_lib}" != x; then
31455	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31456	    ALSA_FOUND=yes
31457	fi
31458	if test "x$ALSA_FOUND" = xno; then
31459
31460
31461    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31462        # Source the builddeps file again, to make sure it uses the latest variables!
31463        . $builddepsfile
31464        # Look for a target and build machine specific resource!
31465        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31466        if test "x$resource" = x; then
31467            # Ok, lets instead look for a target specific resource
31468            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31469        fi
31470        if test "x$resource" = x; then
31471            # Ok, lets instead look for a build specific resource
31472            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31473        fi
31474        if test "x$resource" = x; then
31475            # Ok, lets instead look for a generic resource
31476            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31477            resource=${builddep_alsa}
31478        fi
31479        if test "x$resource" != x; then
31480            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31481$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31482	    # If the resource in the builddeps.conf file is an existing directory,
31483	    # for example /java/linux/cups
31484	    if test -d ${resource}; then
31485	       depdir=${resource}
31486	    else
31487
31488# alsa is for example mymodule
31489# $resource is for example libs/general/libmymod_1_2_3.zip
31490# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31491# $with_builddeps_dir is for example /localhome/builddeps
31492# depdir is the name of the variable into which we store the depdir, eg MYMOD
31493# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31494# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31495    filename=`basename $resource`
31496    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31497    filebase=${filename%%.*}
31498    extension=${filename#*.}
31499    installdir=$with_builddeps_dir/$filebase
31500    if test ! -f $installdir/$filename.unpacked; then
31501        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31502$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31503        if test ! -d $installdir; then
31504            mkdir -p $installdir
31505        fi
31506        if test ! -d $installdir; then
31507            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31508        fi
31509        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31510        touch $tmpfile
31511        if test ! -f $tmpfile; then
31512            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31513        fi
31514
31515    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31516    # $tmpfile is the local file name for the downloaded file.
31517    VALID_TOOL=no
31518    if test "x$BDEPS_FTP" = xwget; then
31519       VALID_TOOL=yes
31520       wget -O $tmpfile $with_builddeps_server/$resource
31521    fi
31522    if test "x$BDEPS_FTP" = xlftp; then
31523       VALID_TOOL=yes
31524       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31525    fi
31526    if test "x$BDEPS_FTP" = xftp; then
31527        VALID_TOOL=yes
31528        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31529        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31530        FTPUSERPWD=${FTPSERVER%%@*}
31531        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31532            FTPUSER=${userpwd%%:*}
31533            FTPPWD=${userpwd#*@}
31534            FTPSERVER=${FTPSERVER#*@}
31535        else
31536            FTPUSER=ftp
31537            FTPPWD=ftp
31538        fi
31539        # the "pass" command does not work on some
31540        # ftp clients (read ftp.exe) but if it works,
31541        # passive mode is better!
31542        (\
31543            echo "user $FTPUSER $FTPPWD"        ;\
31544            echo "pass"                         ;\
31545            echo "bin"                          ;\
31546            echo "get $FTPPATH $tmpfile"              ;\
31547        ) | ftp -in $FTPSERVER
31548    fi
31549    if test "x$VALID_TOOL" != xyes; then
31550       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31551    fi
31552
31553        mv $tmpfile $installdir/$filename
31554        if test ! -s $installdir/$filename; then
31555            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31556        fi
31557        case "$extension" in
31558            zip)  echo "Unzipping $installdir/$filename..."
31559               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31560            ;;
31561            tar.gz) echo "Untaring $installdir/$filename..."
31562               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31563            ;;
31564            tgz) echo "Untaring $installdir/$filename..."
31565               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31566            ;;
31567            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31568            ;;
31569        esac
31570    fi
31571    if test -f $installdir/$filename.unpacked; then
31572        depdir=$installdir
31573    fi
31574
31575	    fi
31576            # Source the builddeps file again, because in the previous command, the depdir
31577            # was updated to point at the current build dependency install directory.
31578            . $builddepsfile
31579            # Now extract variables from the builddeps.conf files.
31580            theroot=${builddep_alsa_ROOT}
31581            thecflags=${builddep_alsa_CFLAGS}
31582            thelibs=${builddep_alsa_LIBS}
31583            if test "x$depdir" = x; then
31584                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31585            fi
31586            ALSA=$depdir
31587            if test "x$theroot" != x; then
31588               ALSA="$theroot"
31589            fi
31590            if test "x$thecflags" != x; then
31591               ALSA_CFLAGS="$thecflags"
31592            fi
31593            if test "x$thelibs" != x; then
31594               ALSA_LIBS="$thelibs"
31595            fi
31596            ALSA_FOUND=yes
31597            else ALSA_FOUND=no
31598
31599        fi
31600        else ALSA_FOUND=no
31601
31602    fi
31603
31604	fi
31605	if test "x$ALSA_FOUND" = xno; then
31606
31607pkg_failed=no
31608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31609$as_echo_n "checking for ALSA... " >&6; }
31610
31611if test -n "$ALSA_CFLAGS"; then
31612    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31613 elif test -n "$PKG_CONFIG"; then
31614    if test -n "$PKG_CONFIG" && \
31615    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31616  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31617  ac_status=$?
31618  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31619  test $ac_status = 0; }; then
31620  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31621else
31622  pkg_failed=yes
31623fi
31624 else
31625    pkg_failed=untried
31626fi
31627if test -n "$ALSA_LIBS"; then
31628    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31629 elif test -n "$PKG_CONFIG"; then
31630    if test -n "$PKG_CONFIG" && \
31631    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31632  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31633  ac_status=$?
31634  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31635  test $ac_status = 0; }; then
31636  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31637else
31638  pkg_failed=yes
31639fi
31640 else
31641    pkg_failed=untried
31642fi
31643
31644
31645
31646if test $pkg_failed = yes; then
31647
31648if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31649        _pkg_short_errors_supported=yes
31650else
31651        _pkg_short_errors_supported=no
31652fi
31653        if test $_pkg_short_errors_supported = yes; then
31654	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31655        else
31656	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31657        fi
31658	# Put the nasty error message in config.log where it belongs
31659	echo "$ALSA_PKG_ERRORS" >&5
31660
31661	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31662$as_echo "no" >&6; }
31663                ALSA_FOUND=no
31664elif test $pkg_failed = untried; then
31665	ALSA_FOUND=no
31666else
31667	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31668	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31669        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31670$as_echo "yes" >&6; }
31671	ALSA_FOUND=yes
31672fi
31673	fi
31674	if test "x$ALSA_FOUND" = xno; then
31675	    for ac_header in alsa/asoundlib.h
31676do :
31677  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31678if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
31679  cat >>confdefs.h <<_ACEOF
31680#define HAVE_ALSA_ASOUNDLIB_H 1
31681_ACEOF
31682 ALSA_FOUND=yes
31683	                      ALSA_CFLAGS=-Iignoreme
31684	                      ALSA_LIBS=-lasound
31685	                      DEFAULT_ALSA=yes
31686else
31687  ALSA_FOUND=no
31688fi
31689
31690done
31691
31692	fi
31693	if test "x$ALSA_FOUND" = xno; then
31694
31695    # Print a helpful message on how to acquire the necessary build dependency.
31696    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31697    MISSING_DEPENDENCY=alsa
31698    PKGHANDLER_COMMAND=
31699
31700    case $PKGHANDLER in
31701	apt-get)
31702                apt_help     $MISSING_DEPENDENCY ;;
31703    yum)
31704                yum_help     $MISSING_DEPENDENCY ;;
31705	port)
31706                port_help    $MISSING_DEPENDENCY ;;
31707	pkgutil)
31708                pkgutil_help $MISSING_DEPENDENCY ;;
31709	pkgadd)
31710                pkgadd_help  $MISSING_DEPENDENCY ;;
31711    * )
31712      break ;;
31713    esac
31714
31715    if test "x$PKGHANDLER_COMMAND" != x; then
31716        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31717    fi
31718
31719	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31720	fi
31721fi
31722
31723
31724
31725
31726
31727
31728
31729###############################################################################
31730#
31731# Check for the jpeg library
31732#
31733
31734USE_EXTERNAL_LIBJPEG=true
31735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31736$as_echo_n "checking for main in -ljpeg... " >&6; }
31737if test "${ac_cv_lib_jpeg_main+set}" = set; then :
31738  $as_echo_n "(cached) " >&6
31739else
31740  ac_check_lib_save_LIBS=$LIBS
31741LIBS="-ljpeg  $LIBS"
31742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31743/* end confdefs.h.  */
31744
31745
31746int
31747main ()
31748{
31749return main ();
31750  ;
31751  return 0;
31752}
31753_ACEOF
31754if ac_fn_cxx_try_link "$LINENO"; then :
31755  ac_cv_lib_jpeg_main=yes
31756else
31757  ac_cv_lib_jpeg_main=no
31758fi
31759rm -f core conftest.err conftest.$ac_objext \
31760    conftest$ac_exeext conftest.$ac_ext
31761LIBS=$ac_check_lib_save_LIBS
31762fi
31763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31764$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31765if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
31766  cat >>confdefs.h <<_ACEOF
31767#define HAVE_LIBJPEG 1
31768_ACEOF
31769
31770  LIBS="-ljpeg $LIBS"
31771
31772else
31773   USE_EXTERNAL_LIBJPEG=false
31774               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31775$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31776
31777fi
31778
31779
31780
31781###############################################################################
31782#
31783# Check for the gif library
31784#
31785
31786
31787# Check whether --with-giflib was given.
31788if test "${with_giflib+set}" = set; then :
31789  withval=$with_giflib;
31790fi
31791
31792
31793
31794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
31795$as_echo_n "checking for which giflib to use... " >&6; }
31796
31797# default is bundled
31798DEFAULT_GIFLIB=bundled
31799
31800#
31801# if user didn't specify, use DEFAULT_GIFLIB
31802#
31803if test "x${with_giflib}" = "x"; then
31804    with_giflib=${DEFAULT_GIFLIB}
31805fi
31806
31807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
31808$as_echo "${with_giflib}" >&6; }
31809
31810if test "x${with_giflib}" = "xbundled"; then
31811    USE_EXTERNAL_LIBGIF=false
31812elif test "x${with_giflib}" = "xsystem"; then
31813    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31814if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
31815
31816else
31817   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
31818fi
31819
31820
31821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
31822$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
31823if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
31824  $as_echo_n "(cached) " >&6
31825else
31826  ac_check_lib_save_LIBS=$LIBS
31827LIBS="-lgif  $LIBS"
31828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31829/* end confdefs.h.  */
31830
31831/* Override any GCC internal prototype to avoid an error.
31832   Use char because int might match the return type of a GCC
31833   builtin and then its argument prototype would still apply.  */
31834#ifdef __cplusplus
31835extern "C"
31836#endif
31837char DGifGetCode ();
31838int
31839main ()
31840{
31841return DGifGetCode ();
31842  ;
31843  return 0;
31844}
31845_ACEOF
31846if ac_fn_cxx_try_link "$LINENO"; then :
31847  ac_cv_lib_gif_DGifGetCode=yes
31848else
31849  ac_cv_lib_gif_DGifGetCode=no
31850fi
31851rm -f core conftest.err conftest.$ac_objext \
31852    conftest$ac_exeext conftest.$ac_ext
31853LIBS=$ac_check_lib_save_LIBS
31854fi
31855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
31856$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
31857if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
31858  cat >>confdefs.h <<_ACEOF
31859#define HAVE_LIBGIF 1
31860_ACEOF
31861
31862  LIBS="-lgif $LIBS"
31863
31864else
31865   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
31866fi
31867
31868
31869    USE_EXTERNAL_LIBGIF=true
31870else
31871    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
31872fi
31873
31874
31875###############################################################################
31876#
31877# Check for the zlib library
31878#
31879
31880
31881# Check whether --with-zlib was given.
31882if test "${with_zlib+set}" = set; then :
31883  withval=$with_zlib;
31884fi
31885
31886
31887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31888$as_echo_n "checking for compress in -lz... " >&6; }
31889if test "${ac_cv_lib_z_compress+set}" = set; then :
31890  $as_echo_n "(cached) " >&6
31891else
31892  ac_check_lib_save_LIBS=$LIBS
31893LIBS="-lz  $LIBS"
31894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31895/* end confdefs.h.  */
31896
31897/* Override any GCC internal prototype to avoid an error.
31898   Use char because int might match the return type of a GCC
31899   builtin and then its argument prototype would still apply.  */
31900#ifdef __cplusplus
31901extern "C"
31902#endif
31903char compress ();
31904int
31905main ()
31906{
31907return compress ();
31908  ;
31909  return 0;
31910}
31911_ACEOF
31912if ac_fn_cxx_try_link "$LINENO"; then :
31913  ac_cv_lib_z_compress=yes
31914else
31915  ac_cv_lib_z_compress=no
31916fi
31917rm -f core conftest.err conftest.$ac_objext \
31918    conftest$ac_exeext conftest.$ac_ext
31919LIBS=$ac_check_lib_save_LIBS
31920fi
31921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31922$as_echo "$ac_cv_lib_z_compress" >&6; }
31923if test "x$ac_cv_lib_z_compress" = x""yes; then :
31924   ZLIB_FOUND=yes
31925else
31926   ZLIB_FOUND=no
31927fi
31928
31929
31930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31931$as_echo_n "checking for which zlib to use... " >&6; }
31932
31933DEFAULT_ZLIB=bundled
31934if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31935#
31936# On macosx default is system...on others default is
31937#
31938    DEFAULT_ZLIB=system
31939fi
31940
31941if test "x${ZLIB_FOUND}" != "xyes"; then
31942#
31943# If we don't find any system...set default to bundled
31944#
31945    DEFAULT_ZLIB=bundled
31946fi
31947
31948#
31949# If user didn't specify, use DEFAULT_ZLIB
31950#
31951if test "x${with_zlib}" = "x"; then
31952    with_zlib=${DEFAULT_ZLIB}
31953fi
31954
31955if test "x${with_zlib}" = "xbundled"; then
31956    USE_EXTERNAL_LIBZ=false
31957    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
31958$as_echo "bundled" >&6; }
31959elif test "x${with_zlib}" = "xsystem"; then
31960    if test "x${ZLIB_FOUND}" = "xyes"; then
31961        USE_EXTERNAL_LIBZ=true
31962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
31963$as_echo "system" >&6; }
31964    else
31965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
31966$as_echo "system not found" >&6; }
31967        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
31968    fi
31969else
31970    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
31971fi
31972
31973
31974
31975###############################################################################
31976LIBZIP_CAN_USE_MMAP=true
31977
31978
31979
31980###############################################################################
31981#
31982# Check if altzone exists in time.h
31983#
31984
31985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31986/* end confdefs.h.  */
31987#include <time.h>
31988int
31989main ()
31990{
31991return (int)altzone;
31992  ;
31993  return 0;
31994}
31995_ACEOF
31996if ac_fn_cxx_try_link "$LINENO"; then :
31997  has_altzone=yes
31998else
31999  has_altzone=no
32000fi
32001rm -f core conftest.err conftest.$ac_objext \
32002    conftest$ac_exeext conftest.$ac_ext
32003if test "x$has_altzone" = xyes; then
32004
32005$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32006
32007fi
32008
32009###############################################################################
32010#
32011# Check the maths library
32012#
32013
32014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32015$as_echo_n "checking for cos in -lm... " >&6; }
32016if test "${ac_cv_lib_m_cos+set}" = set; then :
32017  $as_echo_n "(cached) " >&6
32018else
32019  ac_check_lib_save_LIBS=$LIBS
32020LIBS="-lm  $LIBS"
32021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32022/* end confdefs.h.  */
32023
32024/* Override any GCC internal prototype to avoid an error.
32025   Use char because int might match the return type of a GCC
32026   builtin and then its argument prototype would still apply.  */
32027#ifdef __cplusplus
32028extern "C"
32029#endif
32030char cos ();
32031int
32032main ()
32033{
32034return cos ();
32035  ;
32036  return 0;
32037}
32038_ACEOF
32039if ac_fn_cxx_try_link "$LINENO"; then :
32040  ac_cv_lib_m_cos=yes
32041else
32042  ac_cv_lib_m_cos=no
32043fi
32044rm -f core conftest.err conftest.$ac_objext \
32045    conftest$ac_exeext conftest.$ac_ext
32046LIBS=$ac_check_lib_save_LIBS
32047fi
32048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32049$as_echo "$ac_cv_lib_m_cos" >&6; }
32050if test "x$ac_cv_lib_m_cos" = x""yes; then :
32051  cat >>confdefs.h <<_ACEOF
32052#define HAVE_LIBM 1
32053_ACEOF
32054
32055  LIBS="-lm $LIBS"
32056
32057else
32058
32059                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32060$as_echo "$as_me: Maths library was not found" >&6;}
32061
32062fi
32063
32064
32065
32066###############################################################################
32067#
32068# Check for libdl.so
32069
32070save_LIBS="$LIBS"
32071LIBS=""
32072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32073$as_echo_n "checking for dlopen in -ldl... " >&6; }
32074if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
32075  $as_echo_n "(cached) " >&6
32076else
32077  ac_check_lib_save_LIBS=$LIBS
32078LIBS="-ldl  $LIBS"
32079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32080/* end confdefs.h.  */
32081
32082/* Override any GCC internal prototype to avoid an error.
32083   Use char because int might match the return type of a GCC
32084   builtin and then its argument prototype would still apply.  */
32085#ifdef __cplusplus
32086extern "C"
32087#endif
32088char dlopen ();
32089int
32090main ()
32091{
32092return dlopen ();
32093  ;
32094  return 0;
32095}
32096_ACEOF
32097if ac_fn_cxx_try_link "$LINENO"; then :
32098  ac_cv_lib_dl_dlopen=yes
32099else
32100  ac_cv_lib_dl_dlopen=no
32101fi
32102rm -f core conftest.err conftest.$ac_objext \
32103    conftest$ac_exeext conftest.$ac_ext
32104LIBS=$ac_check_lib_save_LIBS
32105fi
32106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32107$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32108if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
32109  cat >>confdefs.h <<_ACEOF
32110#define HAVE_LIBDL 1
32111_ACEOF
32112
32113  LIBS="-ldl $LIBS"
32114
32115fi
32116
32117LIBDL="$LIBS"
32118
32119LIBS="$save_LIBS"
32120
32121
32122
32123###############################################################################
32124#
32125# statically link libstdc++ before C++ ABI is stablized on Linux unless
32126# dynamic build is configured on command line.
32127#
32128
32129# Check whether --with-stdc++lib was given.
32130if test "${with_stdc__lib+set}" = set; then :
32131  withval=$with_stdc__lib;
32132    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32133        && test "x$with_stdc__lib" != xdefault; then
32134      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32135    fi
32136
32137else
32138  with_stdc__lib=default
32139
32140fi
32141
32142
32143if test "x$OPENJDK_TARGET_OS" = xlinux; then
32144    # Test if -lstdc++ works.
32145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32146$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32147    ac_ext=cpp
32148ac_cpp='$CXXCPP $CPPFLAGS'
32149ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32150ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32151ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32152
32153    OLD_CXXFLAGS="$CXXFLAGS"
32154    CXXFLAGS="$CXXFLAGS -lstdc++"
32155    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32156/* end confdefs.h.  */
32157
32158int
32159main ()
32160{
32161return 0;
32162  ;
32163  return 0;
32164}
32165_ACEOF
32166if ac_fn_cxx_try_link "$LINENO"; then :
32167  has_dynamic_libstdcxx=yes
32168else
32169  has_dynamic_libstdcxx=no
32170fi
32171rm -f core conftest.err conftest.$ac_objext \
32172    conftest$ac_exeext conftest.$ac_ext
32173    CXXFLAGS="$OLD_CXXFLAGS"
32174    ac_ext=cpp
32175ac_cpp='$CXXCPP $CPPFLAGS'
32176ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32177ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32178ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32179
32180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32181$as_echo "$has_dynamic_libstdcxx" >&6; }
32182
32183    # Test if stdc++ can be linked statically.
32184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32185$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32186    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32187    ac_ext=cpp
32188ac_cpp='$CXXCPP $CPPFLAGS'
32189ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32190ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32191ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32192
32193    OLD_LIBS="$LIBS"
32194    OLD_CXX="$CXX"
32195    LIBS="$STATIC_STDCXX_FLAGS"
32196    CXX="$CC"
32197    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32198/* end confdefs.h.  */
32199
32200int
32201main ()
32202{
32203return 0;
32204  ;
32205  return 0;
32206}
32207_ACEOF
32208if ac_fn_cxx_try_link "$LINENO"; then :
32209  has_static_libstdcxx=yes
32210else
32211  has_static_libstdcxx=no
32212fi
32213rm -f core conftest.err conftest.$ac_objext \
32214    conftest$ac_exeext conftest.$ac_ext
32215    LIBS="$OLD_LIBS"
32216    CXX="$OLD_CXX"
32217    ac_ext=cpp
32218ac_cpp='$CXXCPP $CPPFLAGS'
32219ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32220ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32221ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32222
32223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32224$as_echo "$has_static_libstdcxx" >&6; }
32225
32226    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32227        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32228    fi
32229
32230    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32231        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32232    fi
32233
32234    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32235        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32236    fi
32237
32238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32239$as_echo_n "checking how to link with libstdc++... " >&6; }
32240    # If dynamic was requested, it's available since it would fail above otherwise.
32241    # If dynamic wasn't requested, go with static unless it isn't available.
32242    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32243        LIBCXX="$LIBCXX -lstdc++"
32244        LDCXX="$CXX"
32245        STATIC_CXX_SETTING="STATIC_CXX=false"
32246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32247$as_echo "dynamic" >&6; }
32248    else
32249        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32250        LDCXX="$CC"
32251        STATIC_CXX_SETTING="STATIC_CXX=true"
32252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32253$as_echo "static" >&6; }
32254    fi
32255fi
32256
32257
32258if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32259    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32260
32261pkg_failed=no
32262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32263$as_echo_n "checking for LIBFFI... " >&6; }
32264
32265if test -n "$LIBFFI_CFLAGS"; then
32266    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32267 elif test -n "$PKG_CONFIG"; then
32268    if test -n "$PKG_CONFIG" && \
32269    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32270  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32271  ac_status=$?
32272  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32273  test $ac_status = 0; }; then
32274  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32275else
32276  pkg_failed=yes
32277fi
32278 else
32279    pkg_failed=untried
32280fi
32281if test -n "$LIBFFI_LIBS"; then
32282    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32283 elif test -n "$PKG_CONFIG"; then
32284    if test -n "$PKG_CONFIG" && \
32285    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32286  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32287  ac_status=$?
32288  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32289  test $ac_status = 0; }; then
32290  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32291else
32292  pkg_failed=yes
32293fi
32294 else
32295    pkg_failed=untried
32296fi
32297
32298
32299
32300if test $pkg_failed = yes; then
32301
32302if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32303        _pkg_short_errors_supported=yes
32304else
32305        _pkg_short_errors_supported=no
32306fi
32307        if test $_pkg_short_errors_supported = yes; then
32308	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32309        else
32310	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32311        fi
32312	# Put the nasty error message in config.log where it belongs
32313	echo "$LIBFFI_PKG_ERRORS" >&5
32314
32315	as_fn_error $? "Package requirements (libffi) were not met:
32316
32317$LIBFFI_PKG_ERRORS
32318
32319Consider adjusting the PKG_CONFIG_PATH environment variable if you
32320installed software in a non-standard prefix.
32321
32322Alternatively, you may set the environment variables LIBFFI_CFLAGS
32323and LIBFFI_LIBS to avoid the need to call pkg-config.
32324See the pkg-config man page for more details.
32325" "$LINENO" 5
32326elif test $pkg_failed = untried; then
32327	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32328$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32329as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32330is in your PATH or set the PKG_CONFIG environment variable to the full
32331path to pkg-config.
32332
32333Alternatively, you may set the environment variables LIBFFI_CFLAGS
32334and LIBFFI_LIBS to avoid the need to call pkg-config.
32335See the pkg-config man page for more details.
32336
32337To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32338See \`config.log' for more details" "$LINENO" 5 ; }
32339else
32340	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32341	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32343$as_echo "yes" >&6; }
32344	:
32345fi
32346
32347fi
32348
32349if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32350    # Extract the first word of "llvm-config", so it can be a program name with args.
32351set dummy llvm-config; ac_word=$2
32352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32353$as_echo_n "checking for $ac_word... " >&6; }
32354if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
32355  $as_echo_n "(cached) " >&6
32356else
32357  if test -n "$LLVM_CONFIG"; then
32358  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32359else
32360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32361for as_dir in $PATH
32362do
32363  IFS=$as_save_IFS
32364  test -z "$as_dir" && as_dir=.
32365    for ac_exec_ext in '' $ac_executable_extensions; do
32366  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32367    ac_cv_prog_LLVM_CONFIG="llvm-config"
32368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32369    break 2
32370  fi
32371done
32372  done
32373IFS=$as_save_IFS
32374
32375fi
32376fi
32377LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32378if test -n "$LLVM_CONFIG"; then
32379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32380$as_echo "$LLVM_CONFIG" >&6; }
32381else
32382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32383$as_echo "no" >&6; }
32384fi
32385
32386
32387
32388    if test "x$LLVM_CONFIG" != xllvm-config; then
32389        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32390    fi
32391
32392    llvm_components="jit mcjit engine nativecodegen native"
32393    unset LLVM_CFLAGS
32394    for flag in $("$LLVM_CONFIG" --cxxflags); do
32395      if echo "${flag}" | grep -q '^-[ID]'; then
32396        if test "${flag}" != "-D_DEBUG" ; then
32397          if test "${LLVM_CFLAGS}" != "" ; then
32398            LLVM_CFLAGS="${LLVM_CFLAGS} "
32399          fi
32400          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32401        fi
32402      fi
32403    done
32404    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32405    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32406
32407    unset LLVM_LDFLAGS
32408    for flag in $("${LLVM_CONFIG}" --ldflags); do
32409      if echo "${flag}" | grep -q '^-L'; then
32410        if test "${LLVM_LDFLAGS}" != ""; then
32411          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32412        fi
32413        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32414      fi
32415    done
32416
32417    unset LLVM_LIBS
32418    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32419      if echo "${flag}" | grep -q '^-l'; then
32420        if test "${LLVM_LIBS}" != ""; then
32421          LLVM_LIBS="${LLVM_LIBS} "
32422        fi
32423        LLVM_LIBS="${LLVM_LIBS}${flag}"
32424      fi
32425    done
32426
32427
32428
32429
32430fi
32431
32432# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32433if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32434    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32435fi
32436
32437# TODO better (platform agnostic) test
32438if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32439    LIBCXX="-lstdc++"
32440fi
32441
32442
32443
32444
32445
32446# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32447
32448# When using cygwin or msys, we need a wrapper binary that renames
32449# /cygdrive/c/ arguments into c:/ arguments and peeks into
32450# @files and rewrites these too! This wrapper binary is
32451# called fixpath.
32452FIXPATH=
32453if test "x$OPENJDK_BUILD_OS" = xwindows; then
32454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32455$as_echo_n "checking if fixpath can be created... " >&6; }
32456    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32457    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32458    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32459      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32460      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32461      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32462      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32463    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32464      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32465      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32466
32467      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32468      # @ was chosen as separator to minimize risk of other tools messing around with it
32469      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32470      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32471
32472      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32473    fi
32474    rm -f $OUTPUT_ROOT/fixpath*
32475    cd $OUTPUT_ROOT
32476    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32477    cd $CURDIR
32478
32479    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32481$as_echo "no" >&6; }
32482        cat $OUTPUT_ROOT/fixpath1.log
32483        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32484    fi
32485    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32486$as_echo "yes" >&6; }
32487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32488$as_echo_n "checking if fixpath.exe works... " >&6; }
32489    cd $OUTPUT_ROOT
32490    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32491    cd $CURDIR
32492    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32494$as_echo "no" >&6; }
32495        cat $OUTPUT_ROOT/fixpath2.log
32496        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32497    fi
32498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32499$as_echo "yes" >&6; }
32500    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32501fi
32502
32503
32504
32505
32506###############################################################################
32507#
32508# We need to do some final tweaking, when everything else is done.
32509#
32510###############################################################################
32511
32512
32513HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32514
32515
32516# The name of the Service Agent jar.
32517SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32518if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32519  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32520fi
32521
32522
32523
32524
32525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32526$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32527
32528if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32529    ENABLE_INTREE_EC=yes
32530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32531$as_echo "yes" >&6; }
32532else
32533    ENABLE_INTREE_EC=no
32534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32535$as_echo "no" >&6; }
32536fi
32537
32538
32539
32540
32541###############################################################################
32542#
32543# Configure parts of the build that only affect the build performance,
32544# not the result.
32545#
32546###############################################################################
32547
32548
32549  # How many cores do we have on this build system?
32550
32551# Check whether --with-num-cores was given.
32552if test "${with_num_cores+set}" = set; then :
32553  withval=$with_num_cores;
32554fi
32555
32556  if test "x$with_num_cores" = x; then
32557    # The number of cores were not specified, try to probe them.
32558
32559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32560$as_echo_n "checking for number of cores... " >&6; }
32561    NUM_CORES=1
32562    FOUND_CORES=no
32563
32564    if test -f /proc/cpuinfo; then
32565        # Looks like a Linux (or cygwin) system
32566        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32567        FOUND_CORES=yes
32568    elif test -x /usr/sbin/psrinfo; then
32569        # Looks like a Solaris system
32570        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32571        FOUND_CORES=yes
32572    elif test -x /usr/sbin/system_profiler; then
32573        # Looks like a MacOSX system
32574        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32575        FOUND_CORES=yes
32576    elif test -n "$NUMBER_OF_PROCESSORS"; then
32577        # On windows, look in the env
32578        NUM_CORES=$NUMBER_OF_PROCESSORS
32579        FOUND_CORES=yes
32580    fi
32581
32582    if test "x$FOUND_CORES" = xyes; then
32583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32584$as_echo "$NUM_CORES" >&6; }
32585    else
32586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32587$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32588        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32589$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32590    fi
32591
32592
32593  else
32594    NUM_CORES=$with_num_cores
32595  fi
32596
32597
32598
32599  # How much memory do we have on this build system?
32600
32601# Check whether --with-memory-size was given.
32602if test "${with_memory_size+set}" = set; then :
32603  withval=$with_memory_size;
32604fi
32605
32606  if test "x$with_memory_size" = x; then
32607    # The memory size was not specified, try to probe it.
32608
32609    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32610$as_echo_n "checking for memory size... " >&6; }
32611    # Default to 1024 MB
32612    MEMORY_SIZE=1024
32613    FOUND_MEM=no
32614
32615    if test -f /proc/meminfo; then
32616        # Looks like a Linux (or cygwin) system
32617        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32618        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32619        FOUND_MEM=yes
32620    elif test -x /usr/sbin/prtconf; then
32621        # Looks like a Solaris system
32622        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32623        FOUND_MEM=yes
32624    elif test -x /usr/sbin/system_profiler; then
32625        # Looks like a MacOSX system
32626        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32627        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32628        FOUND_MEM=yes
32629    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32630        # Windows, but without cygwin
32631        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32632        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32633        FOUND_MEM=yes
32634    fi
32635
32636    if test "x$FOUND_MEM" = xyes; then
32637        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32638$as_echo "$MEMORY_SIZE MB" >&6; }
32639    else
32640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32641$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32643$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32644    fi
32645
32646  else
32647    MEMORY_SIZE=$with_memory_size
32648  fi
32649
32650
32651
32652  # Provide a decent default number of parallel jobs for make depending on
32653  # number of cores, amount of memory and machine architecture.
32654
32655# Check whether --with-jobs was given.
32656if test "${with_jobs+set}" = set; then :
32657  withval=$with_jobs;
32658fi
32659
32660  if test "x$with_jobs" = x; then
32661    # Number of jobs was not specified, calculate.
32662    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32663$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32664    # Approximate memory in GB, rounding up a bit.
32665    memory_gb=`expr $MEMORY_SIZE / 1100`
32666    # Pick the lowest of memory in gb and number of cores.
32667    if test "$memory_gb" -lt "$NUM_CORES"; then
32668      JOBS="$memory_gb"
32669    else
32670      JOBS="$NUM_CORES"
32671      # On bigger machines, leave some room for other processes to run
32672      if test "$JOBS" -gt "4"; then
32673        JOBS=`expr $JOBS '*' 90 / 100`
32674      fi
32675    fi
32676    # Cap number of jobs to 16
32677    if test "$JOBS" -gt "16"; then
32678      JOBS=16
32679    fi
32680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32681$as_echo "$JOBS" >&6; }
32682  else
32683    JOBS=$with_jobs
32684  fi
32685
32686
32687
32688# Setup smart javac (after cores and memory have been setup)
32689
32690
32691# Check whether --with-sjavac-server-java was given.
32692if test "${with_sjavac_server_java+set}" = set; then :
32693  withval=$with_sjavac_server_java;
32694fi
32695
32696
32697if test "x$with_sjavac_server_java" != x; then
32698    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32699    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32700    if test "x$FOUND_VERSION" = x; then
32701        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32702    fi
32703else
32704    SJAVAC_SERVER_JAVA=""
32705    # Hotspot specific options.
32706
32707    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
32708    $ECHO "Command: $JAVA -verbosegc -version" >&5
32709    OUTPUT=`$JAVA -verbosegc -version 2>&1`
32710    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32711    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32712    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32713        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32714	JVM_ARG_OK=true
32715    else
32716	$ECHO "Arg failed:" >&5
32717	$ECHO "$OUTPUT" >&5
32718	JVM_ARG_OK=false
32719    fi
32720
32721    # JRockit specific options.
32722
32723    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
32724    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
32725    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
32726    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32727    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32728    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32729        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32730	JVM_ARG_OK=true
32731    else
32732	$ECHO "Arg failed:" >&5
32733	$ECHO "$OUTPUT" >&5
32734	JVM_ARG_OK=false
32735    fi
32736
32737    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32738fi
32739
32740
32741if test "$MEMORY_SIZE" -gt "2500"; then
32742
32743    $ECHO "Check if jvm arg is ok: -d64" >&5
32744    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
32745    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
32746    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32747    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32748    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32749        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32750	JVM_ARG_OK=true
32751    else
32752	$ECHO "Arg failed:" >&5
32753	$ECHO "$OUTPUT" >&5
32754	JVM_ARG_OK=false
32755    fi
32756
32757    if test "$JVM_ARG_OK" = true; then
32758        JVM_64BIT=true
32759	JVM_ARG_OK=false
32760    fi
32761    fi
32762
32763if test "$JVM_64BIT" = true; then
32764    if test "$MEMORY_SIZE" -gt "17000"; then
32765
32766    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
32767    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
32768    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
32769    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32770    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32771    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32772        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
32773	JVM_ARG_OK=true
32774    else
32775	$ECHO "Arg failed:" >&5
32776	$ECHO "$OUTPUT" >&5
32777	JVM_ARG_OK=false
32778    fi
32779
32780    fi
32781    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
32782
32783    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
32784    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
32785    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
32786    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32787    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32788    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32789        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
32790	JVM_ARG_OK=true
32791    else
32792	$ECHO "Arg failed:" >&5
32793	$ECHO "$OUTPUT" >&5
32794	JVM_ARG_OK=false
32795    fi
32796
32797    fi
32798    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
32799
32800    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
32801    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
32802    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
32803    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32804    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32805    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32806        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
32807	JVM_ARG_OK=true
32808    else
32809	$ECHO "Arg failed:" >&5
32810	$ECHO "$OUTPUT" >&5
32811	JVM_ARG_OK=false
32812    fi
32813
32814    fi
32815    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
32816
32817    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
32818    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
32819    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
32820    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32821    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32822    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32823        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
32824	JVM_ARG_OK=true
32825    else
32826	$ECHO "Arg failed:" >&5
32827	$ECHO "$OUTPUT" >&5
32828	JVM_ARG_OK=false
32829    fi
32830
32831    fi
32832fi
32833if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
32834
32835    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
32836    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
32837    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
32838    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32839    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32840    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32841        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
32842	JVM_ARG_OK=true
32843    else
32844	$ECHO "Arg failed:" >&5
32845	$ECHO "$OUTPUT" >&5
32846	JVM_ARG_OK=false
32847    fi
32848
32849fi
32850if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
32851
32852    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
32853    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
32854    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
32855    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32856    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32857    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32858        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
32859	JVM_ARG_OK=true
32860    else
32861	$ECHO "Arg failed:" >&5
32862	$ECHO "$OUTPUT" >&5
32863	JVM_ARG_OK=false
32864    fi
32865
32866fi
32867if test "$JVM_ARG_OK" = false; then
32868
32869    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
32870    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
32871    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
32872    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32873    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32874    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32875        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
32876	JVM_ARG_OK=true
32877    else
32878	$ECHO "Arg failed:" >&5
32879	$ECHO "$OUTPUT" >&5
32880	JVM_ARG_OK=false
32881    fi
32882
32883fi
32884
32885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32886$as_echo_n "checking whether to use sjavac... " >&6; }
32887# Check whether --enable-sjavac was given.
32888if test "${enable_sjavac+set}" = set; then :
32889  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32890else
32891  ENABLE_SJAVAC='no'
32892fi
32893
32894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32895$as_echo "$ENABLE_SJAVAC" >&6; }
32896
32897
32898if test "x$ENABLE_SJAVAC" = xyes; then
32899    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32900else
32901    SJAVAC_SERVER_DIR=
32902fi
32903
32904
32905
32906
32907# Can the C/C++ compiler use precompiled headers?
32908
32909
32910###############################################################################
32911#
32912# Can the C/C++ compiler use precompiled headers?
32913#
32914# Check whether --enable-precompiled-headers was given.
32915if test "${enable_precompiled_headers+set}" = set; then :
32916  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32917else
32918  ENABLE_PRECOMPH=yes
32919fi
32920
32921
32922USE_PRECOMPILED_HEADER=1
32923if test "x$ENABLE_PRECOMPH" = xno; then
32924    USE_PRECOMPILED_HEADER=0
32925fi
32926
32927if test "x$ENABLE_PRECOMPH" = xyes; then
32928    # Check that the compiler actually supports precomp headers.
32929    if test "x$GCC" = xyes; then
32930         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
32931$as_echo_n "checking that precompiled headers work... " >&6; }
32932         echo "int alfa();" > conftest.h
32933         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
32934         if test ! -f conftest.hpp.gch; then
32935             USE_PRECOMPILED_HEADER=0
32936             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32937$as_echo "no" >&6; }
32938         else
32939             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32940$as_echo "yes" >&6; }
32941         fi
32942         rm -f conftest.h conftest.hpp.gch
32943    fi
32944fi
32945
32946
32947
32948
32949# Setup use of ccache, if available
32950
32951    # Check whether --enable-ccache was given.
32952if test "${enable_ccache+set}" = set; then :
32953  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
32954else
32955  ENABLE_CCACHE=yes
32956fi
32957
32958    if test "x$ENABLE_CCACHE" = xyes; then
32959        # Extract the first word of "ccache", so it can be a program name with args.
32960set dummy ccache; ac_word=$2
32961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32962$as_echo_n "checking for $ac_word... " >&6; }
32963if test "${ac_cv_path_CCACHE+set}" = set; then :
32964  $as_echo_n "(cached) " >&6
32965else
32966  case $CCACHE in
32967  [\\/]* | ?:[\\/]*)
32968  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
32969  ;;
32970  *)
32971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32972for as_dir in $PATH
32973do
32974  IFS=$as_save_IFS
32975  test -z "$as_dir" && as_dir=.
32976    for ac_exec_ext in '' $ac_executable_extensions; do
32977  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32978    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
32979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32980    break 2
32981  fi
32982done
32983  done
32984IFS=$as_save_IFS
32985
32986  ;;
32987esac
32988fi
32989CCACHE=$ac_cv_path_CCACHE
32990if test -n "$CCACHE"; then
32991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
32992$as_echo "$CCACHE" >&6; }
32993else
32994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32995$as_echo "no" >&6; }
32996fi
32997
32998
32999    else
33000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33001$as_echo_n "checking for ccache... " >&6; }
33002        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33003$as_echo "explicitly disabled" >&6; }
33004        CCACHE=
33005    fi
33006
33007
33008
33009# Check whether --with-ccache-dir was given.
33010if test "${with_ccache_dir+set}" = set; then :
33011  withval=$with_ccache_dir;
33012fi
33013
33014
33015    if test "x$with_ccache_dir" != x; then
33016        # When using a non home ccache directory, assume the use is to share ccache files
33017        # with other users. Thus change the umask.
33018        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33019    fi
33020    CCACHE_FOUND=""
33021    if test "x$CCACHE" != x; then
33022
33023    if test "x$CCACHE" != x; then
33024        CCACHE_FOUND="true"
33025        # Only use ccache if it is 3.1.4 or later, which supports
33026        # precompiled headers.
33027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33028$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33029        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33030        if test "x$HAS_GOOD_CCACHE" = x; then
33031            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33032$as_echo "no, disabling ccache" >&6; }
33033            CCACHE=
33034        else
33035            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33036$as_echo "yes" >&6; }
33037            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33038$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33039            PUSHED_FLAGS="$CXXFLAGS"
33040            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33041            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33042/* end confdefs.h.  */
33043
33044int
33045main ()
33046{
33047
33048  ;
33049  return 0;
33050}
33051_ACEOF
33052if ac_fn_cxx_try_compile "$LINENO"; then :
33053  CC_KNOWS_CCACHE_TRICK=yes
33054else
33055  CC_KNOWS_CCACHE_TRICK=no
33056fi
33057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33058            CXXFLAGS="$PUSHED_FLAGS"
33059            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33060                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33061$as_echo "yes" >&6; }
33062            else
33063                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33064$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33065                CCACHE=
33066            fi
33067        fi
33068    fi
33069
33070    if test "x$CCACHE" != x; then
33071        CCACHE_SLOPPINESS=time_macros
33072        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33073        CCACHE_FLAGS=-fpch-preprocess
33074
33075        if test "x$SET_CCACHE_DIR" != x; then
33076            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33077	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33078        fi
33079    fi
33080
33081    fi
33082
33083
33084###############################################################################
33085#
33086# And now the finish...
33087#
33088###############################################################################
33089
33090# Check for some common pitfalls
33091
33092  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33093    file_to_test="$SRC_ROOT/LICENSE"
33094    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33095      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
33096    fi
33097  fi
33098
33099
33100
33101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33102$as_echo_n "checking if build directory is on local disk... " >&6; }
33103
33104	# df -l lists only local disks; if the given directory is not found then
33105	# a non-zero exit code is given
33106  if test "x$DF" = x; then
33107    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33108      # msys does not have df; use Windows "net use" instead.
33109      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33110      if test "x$IS_NETWORK_DISK" = x; then
33111        OUTPUT_DIR_IS_LOCAL="yes"
33112      else
33113        OUTPUT_DIR_IS_LOCAL="no"
33114      fi
33115    else
33116      # No df here, say it's local
33117      OUTPUT_DIR_IS_LOCAL="yes"
33118    fi
33119  else
33120    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33121      OUTPUT_DIR_IS_LOCAL="yes"
33122    else
33123      OUTPUT_DIR_IS_LOCAL="no"
33124    fi
33125  fi
33126
33127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33128$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33129
33130
33131
33132# Check if the user has any old-style ALT_ variables set.
33133FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33134
33135# Before generating output files, test if they exist. If they do, this is a reconfigure.
33136# Since we can't properly handle the dependencies for this, warn the user about the situation
33137if test -e $OUTPUT_ROOT/spec.gmk; then
33138  IS_RECONFIGURE=yes
33139else
33140  IS_RECONFIGURE=no
33141fi
33142
33143if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33144  HIDE_PERFORMANCE_HINTS=yes
33145else
33146  HIDE_PERFORMANCE_HINTS=no
33147  # Hide it the next time around...
33148  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33149fi
33150
33151
33152
33153# At the end, call the custom hook. (Dummy macro if no custom sources available)
33154
33155
33156# We're messing a bit with internal autoconf variables to put the config.status
33157# in the output directory instead of the current directory.
33158CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33159# Create the actual output files. Now the main work of configure is done.
33160cat >confcache <<\_ACEOF
33161# This file is a shell script that caches the results of configure
33162# tests run on this system so they can be shared between configure
33163# scripts and configure runs, see configure's option --config-cache.
33164# It is not useful on other systems.  If it contains results you don't
33165# want to keep, you may remove or edit it.
33166#
33167# config.status only pays attention to the cache file if you give it
33168# the --recheck option to rerun configure.
33169#
33170# `ac_cv_env_foo' variables (set or unset) will be overridden when
33171# loading this file, other *unset* `ac_cv_foo' will be assigned the
33172# following values.
33173
33174_ACEOF
33175
33176# The following way of writing the cache mishandles newlines in values,
33177# but we know of no workaround that is simple, portable, and efficient.
33178# So, we kill variables containing newlines.
33179# Ultrix sh set writes to stderr and can't be redirected directly,
33180# and sets the high bit in the cache file unless we assign to the vars.
33181(
33182  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33183    eval ac_val=\$$ac_var
33184    case $ac_val in #(
33185    *${as_nl}*)
33186      case $ac_var in #(
33187      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33188$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33189      esac
33190      case $ac_var in #(
33191      _ | IFS | as_nl) ;; #(
33192      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33193      *) { eval $ac_var=; unset $ac_var;} ;;
33194      esac ;;
33195    esac
33196  done
33197
33198  (set) 2>&1 |
33199    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33200    *${as_nl}ac_space=\ *)
33201      # `set' does not quote correctly, so add quotes: double-quote
33202      # substitution turns \\\\ into \\, and sed turns \\ into \.
33203      sed -n \
33204	"s/'/'\\\\''/g;
33205	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33206      ;; #(
33207    *)
33208      # `set' quotes correctly as required by POSIX, so do not add quotes.
33209      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33210      ;;
33211    esac |
33212    sort
33213) |
33214  sed '
33215     /^ac_cv_env_/b end
33216     t clear
33217     :clear
33218     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33219     t end
33220     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33221     :end' >>confcache
33222if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33223  if test -w "$cache_file"; then
33224    test "x$cache_file" != "x/dev/null" &&
33225      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33226$as_echo "$as_me: updating cache $cache_file" >&6;}
33227    cat confcache >$cache_file
33228  else
33229    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33230$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33231  fi
33232fi
33233rm -f confcache
33234
33235test "x$prefix" = xNONE && prefix=$ac_default_prefix
33236# Let make expand exec_prefix.
33237test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33238
33239DEFS=-DHAVE_CONFIG_H
33240
33241ac_libobjs=
33242ac_ltlibobjs=
33243U=
33244for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33245  # 1. Remove the extension, and $U if already installed.
33246  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33247  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33248  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33249  #    will be set to the directory where LIBOBJS objects are built.
33250  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33251  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33252done
33253LIBOBJS=$ac_libobjs
33254
33255LTLIBOBJS=$ac_ltlibobjs
33256
33257
33258
33259: ${CONFIG_STATUS=./config.status}
33260ac_write_fail=0
33261ac_clean_files_save=$ac_clean_files
33262ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33263{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33264$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33265as_write_fail=0
33266cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33267#! $SHELL
33268# Generated by $as_me.
33269# Run this file to recreate the current configuration.
33270# Compiler output produced by configure, useful for debugging
33271# configure, is in config.log if it exists.
33272
33273debug=false
33274ac_cs_recheck=false
33275ac_cs_silent=false
33276
33277SHELL=\${CONFIG_SHELL-$SHELL}
33278export SHELL
33279_ASEOF
33280cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33281## -------------------- ##
33282## M4sh Initialization. ##
33283## -------------------- ##
33284
33285# Be more Bourne compatible
33286DUALCASE=1; export DUALCASE # for MKS sh
33287if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33288  emulate sh
33289  NULLCMD=:
33290  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33291  # is contrary to our usage.  Disable this feature.
33292  alias -g '${1+"$@"}'='"$@"'
33293  setopt NO_GLOB_SUBST
33294else
33295  case `(set -o) 2>/dev/null` in #(
33296  *posix*) :
33297    set -o posix ;; #(
33298  *) :
33299     ;;
33300esac
33301fi
33302
33303
33304as_nl='
33305'
33306export as_nl
33307# Printing a long string crashes Solaris 7 /usr/bin/printf.
33308as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33309as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33310as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33311# Prefer a ksh shell builtin over an external printf program on Solaris,
33312# but without wasting forks for bash or zsh.
33313if test -z "$BASH_VERSION$ZSH_VERSION" \
33314    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33315  as_echo='print -r --'
33316  as_echo_n='print -rn --'
33317elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33318  as_echo='printf %s\n'
33319  as_echo_n='printf %s'
33320else
33321  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33322    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33323    as_echo_n='/usr/ucb/echo -n'
33324  else
33325    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33326    as_echo_n_body='eval
33327      arg=$1;
33328      case $arg in #(
33329      *"$as_nl"*)
33330	expr "X$arg" : "X\\(.*\\)$as_nl";
33331	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33332      esac;
33333      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33334    '
33335    export as_echo_n_body
33336    as_echo_n='sh -c $as_echo_n_body as_echo'
33337  fi
33338  export as_echo_body
33339  as_echo='sh -c $as_echo_body as_echo'
33340fi
33341
33342# The user is always right.
33343if test "${PATH_SEPARATOR+set}" != set; then
33344  PATH_SEPARATOR=:
33345  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33346    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33347      PATH_SEPARATOR=';'
33348  }
33349fi
33350
33351
33352# IFS
33353# We need space, tab and new line, in precisely that order.  Quoting is
33354# there to prevent editors from complaining about space-tab.
33355# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33356# splitting by setting IFS to empty value.)
33357IFS=" ""	$as_nl"
33358
33359# Find who we are.  Look in the path if we contain no directory separator.
33360case $0 in #((
33361  *[\\/]* ) as_myself=$0 ;;
33362  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33363for as_dir in $PATH
33364do
33365  IFS=$as_save_IFS
33366  test -z "$as_dir" && as_dir=.
33367    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33368  done
33369IFS=$as_save_IFS
33370
33371     ;;
33372esac
33373# We did not find ourselves, most probably we were run as `sh COMMAND'
33374# in which case we are not to be found in the path.
33375if test "x$as_myself" = x; then
33376  as_myself=$0
33377fi
33378if test ! -f "$as_myself"; then
33379  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33380  exit 1
33381fi
33382
33383# Unset variables that we do not need and which cause bugs (e.g. in
33384# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33385# suppresses any "Segmentation fault" message there.  '((' could
33386# trigger a bug in pdksh 5.2.14.
33387for as_var in BASH_ENV ENV MAIL MAILPATH
33388do eval test x\${$as_var+set} = xset \
33389  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33390done
33391PS1='$ '
33392PS2='> '
33393PS4='+ '
33394
33395# NLS nuisances.
33396LC_ALL=C
33397export LC_ALL
33398LANGUAGE=C
33399export LANGUAGE
33400
33401# CDPATH.
33402(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33403
33404
33405# as_fn_error STATUS ERROR [LINENO LOG_FD]
33406# ----------------------------------------
33407# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33408# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33409# script with STATUS, using 1 if that was 0.
33410as_fn_error ()
33411{
33412  as_status=$1; test $as_status -eq 0 && as_status=1
33413  if test "$4"; then
33414    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33415    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33416  fi
33417  $as_echo "$as_me: error: $2" >&2
33418  as_fn_exit $as_status
33419} # as_fn_error
33420
33421
33422# as_fn_set_status STATUS
33423# -----------------------
33424# Set $? to STATUS, without forking.
33425as_fn_set_status ()
33426{
33427  return $1
33428} # as_fn_set_status
33429
33430# as_fn_exit STATUS
33431# -----------------
33432# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33433as_fn_exit ()
33434{
33435  set +e
33436  as_fn_set_status $1
33437  exit $1
33438} # as_fn_exit
33439
33440# as_fn_unset VAR
33441# ---------------
33442# Portably unset VAR.
33443as_fn_unset ()
33444{
33445  { eval $1=; unset $1;}
33446}
33447as_unset=as_fn_unset
33448# as_fn_append VAR VALUE
33449# ----------------------
33450# Append the text in VALUE to the end of the definition contained in VAR. Take
33451# advantage of any shell optimizations that allow amortized linear growth over
33452# repeated appends, instead of the typical quadratic growth present in naive
33453# implementations.
33454if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33455  eval 'as_fn_append ()
33456  {
33457    eval $1+=\$2
33458  }'
33459else
33460  as_fn_append ()
33461  {
33462    eval $1=\$$1\$2
33463  }
33464fi # as_fn_append
33465
33466# as_fn_arith ARG...
33467# ------------------
33468# Perform arithmetic evaluation on the ARGs, and store the result in the
33469# global $as_val. Take advantage of shells that can avoid forks. The arguments
33470# must be portable across $(()) and expr.
33471if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33472  eval 'as_fn_arith ()
33473  {
33474    as_val=$(( $* ))
33475  }'
33476else
33477  as_fn_arith ()
33478  {
33479    as_val=`expr "$@" || test $? -eq 1`
33480  }
33481fi # as_fn_arith
33482
33483
33484if expr a : '\(a\)' >/dev/null 2>&1 &&
33485   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33486  as_expr=expr
33487else
33488  as_expr=false
33489fi
33490
33491if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33492  as_basename=basename
33493else
33494  as_basename=false
33495fi
33496
33497if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33498  as_dirname=dirname
33499else
33500  as_dirname=false
33501fi
33502
33503as_me=`$as_basename -- "$0" ||
33504$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33505	 X"$0" : 'X\(//\)$' \| \
33506	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33507$as_echo X/"$0" |
33508    sed '/^.*\/\([^/][^/]*\)\/*$/{
33509	    s//\1/
33510	    q
33511	  }
33512	  /^X\/\(\/\/\)$/{
33513	    s//\1/
33514	    q
33515	  }
33516	  /^X\/\(\/\).*/{
33517	    s//\1/
33518	    q
33519	  }
33520	  s/.*/./; q'`
33521
33522# Avoid depending upon Character Ranges.
33523as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33524as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33525as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33526as_cr_digits='0123456789'
33527as_cr_alnum=$as_cr_Letters$as_cr_digits
33528
33529ECHO_C= ECHO_N= ECHO_T=
33530case `echo -n x` in #(((((
33531-n*)
33532  case `echo 'xy\c'` in
33533  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33534  xy)  ECHO_C='\c';;
33535  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33536       ECHO_T='	';;
33537  esac;;
33538*)
33539  ECHO_N='-n';;
33540esac
33541
33542rm -f conf$$ conf$$.exe conf$$.file
33543if test -d conf$$.dir; then
33544  rm -f conf$$.dir/conf$$.file
33545else
33546  rm -f conf$$.dir
33547  mkdir conf$$.dir 2>/dev/null
33548fi
33549if (echo >conf$$.file) 2>/dev/null; then
33550  if ln -s conf$$.file conf$$ 2>/dev/null; then
33551    as_ln_s='ln -s'
33552    # ... but there are two gotchas:
33553    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33554    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33555    # In both cases, we have to default to `cp -p'.
33556    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33557      as_ln_s='cp -p'
33558  elif ln conf$$.file conf$$ 2>/dev/null; then
33559    as_ln_s=ln
33560  else
33561    as_ln_s='cp -p'
33562  fi
33563else
33564  as_ln_s='cp -p'
33565fi
33566rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33567rmdir conf$$.dir 2>/dev/null
33568
33569
33570# as_fn_mkdir_p
33571# -------------
33572# Create "$as_dir" as a directory, including parents if necessary.
33573as_fn_mkdir_p ()
33574{
33575
33576  case $as_dir in #(
33577  -*) as_dir=./$as_dir;;
33578  esac
33579  test -d "$as_dir" || eval $as_mkdir_p || {
33580    as_dirs=
33581    while :; do
33582      case $as_dir in #(
33583      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33584      *) as_qdir=$as_dir;;
33585      esac
33586      as_dirs="'$as_qdir' $as_dirs"
33587      as_dir=`$as_dirname -- "$as_dir" ||
33588$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33589	 X"$as_dir" : 'X\(//\)[^/]' \| \
33590	 X"$as_dir" : 'X\(//\)$' \| \
33591	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33592$as_echo X"$as_dir" |
33593    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33594	    s//\1/
33595	    q
33596	  }
33597	  /^X\(\/\/\)[^/].*/{
33598	    s//\1/
33599	    q
33600	  }
33601	  /^X\(\/\/\)$/{
33602	    s//\1/
33603	    q
33604	  }
33605	  /^X\(\/\).*/{
33606	    s//\1/
33607	    q
33608	  }
33609	  s/.*/./; q'`
33610      test -d "$as_dir" && break
33611    done
33612    test -z "$as_dirs" || eval "mkdir $as_dirs"
33613  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33614
33615
33616} # as_fn_mkdir_p
33617if mkdir -p . 2>/dev/null; then
33618  as_mkdir_p='mkdir -p "$as_dir"'
33619else
33620  test -d ./-p && rmdir ./-p
33621  as_mkdir_p=false
33622fi
33623
33624if test -x / >/dev/null 2>&1; then
33625  as_test_x='test -x'
33626else
33627  if ls -dL / >/dev/null 2>&1; then
33628    as_ls_L_option=L
33629  else
33630    as_ls_L_option=
33631  fi
33632  as_test_x='
33633    eval sh -c '\''
33634      if test -d "$1"; then
33635	test -d "$1/.";
33636      else
33637	case $1 in #(
33638	-*)set "./$1";;
33639	esac;
33640	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
33641	???[sx]*):;;*)false;;esac;fi
33642    '\'' sh
33643  '
33644fi
33645as_executable_p=$as_test_x
33646
33647# Sed expression to map a string onto a valid CPP name.
33648as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33649
33650# Sed expression to map a string onto a valid variable name.
33651as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33652
33653
33654exec 6>&1
33655## ----------------------------------- ##
33656## Main body of $CONFIG_STATUS script. ##
33657## ----------------------------------- ##
33658_ASEOF
33659test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33660
33661cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33662# Save the log message, to keep $0 and so on meaningful, and to
33663# report actual input values of CONFIG_FILES etc. instead of their
33664# values after options handling.
33665ac_log="
33666This file was extended by OpenJDK $as_me jdk8, which was
33667generated by GNU Autoconf 2.67.  Invocation command line was
33668
33669  CONFIG_FILES    = $CONFIG_FILES
33670  CONFIG_HEADERS  = $CONFIG_HEADERS
33671  CONFIG_LINKS    = $CONFIG_LINKS
33672  CONFIG_COMMANDS = $CONFIG_COMMANDS
33673  $ $0 $@
33674
33675on `(hostname || uname -n) 2>/dev/null | sed 1q`
33676"
33677
33678_ACEOF
33679
33680case $ac_config_files in *"
33681"*) set x $ac_config_files; shift; ac_config_files=$*;;
33682esac
33683
33684case $ac_config_headers in *"
33685"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33686esac
33687
33688
33689cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33690# Files that config.status was made for.
33691config_files="$ac_config_files"
33692config_headers="$ac_config_headers"
33693
33694_ACEOF
33695
33696cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33697ac_cs_usage="\
33698\`$as_me' instantiates files and other configuration actions
33699from templates according to the current configuration.  Unless the files
33700and actions are specified as TAGs, all are instantiated by default.
33701
33702Usage: $0 [OPTION]... [TAG]...
33703
33704  -h, --help       print this help, then exit
33705  -V, --version    print version number and configuration settings, then exit
33706      --config     print configuration, then exit
33707  -q, --quiet, --silent
33708                   do not print progress messages
33709  -d, --debug      don't remove temporary files
33710      --recheck    update $as_me by reconfiguring in the same conditions
33711      --file=FILE[:TEMPLATE]
33712                   instantiate the configuration file FILE
33713      --header=FILE[:TEMPLATE]
33714                   instantiate the configuration header FILE
33715
33716Configuration files:
33717$config_files
33718
33719Configuration headers:
33720$config_headers
33721
33722Report bugs to <build-dev@openjdk.java.net>.
33723OpenJDK home page: <http://openjdk.java.net>."
33724
33725_ACEOF
33726cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33727ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33728ac_cs_version="\\
33729OpenJDK config.status jdk8
33730configured by $0, generated by GNU Autoconf 2.67,
33731  with options \\"\$ac_cs_config\\"
33732
33733Copyright (C) 2010 Free Software Foundation, Inc.
33734This config.status script is free software; the Free Software Foundation
33735gives unlimited permission to copy, distribute and modify it."
33736
33737ac_pwd='$ac_pwd'
33738srcdir='$srcdir'
33739AWK='$AWK'
33740test -n "\$AWK" || AWK=awk
33741_ACEOF
33742
33743cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33744# The default lists apply if the user does not specify any file.
33745ac_need_defaults=:
33746while test $# != 0
33747do
33748  case $1 in
33749  --*=?*)
33750    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33751    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33752    ac_shift=:
33753    ;;
33754  --*=)
33755    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33756    ac_optarg=
33757    ac_shift=:
33758    ;;
33759  *)
33760    ac_option=$1
33761    ac_optarg=$2
33762    ac_shift=shift
33763    ;;
33764  esac
33765
33766  case $ac_option in
33767  # Handling of the options.
33768  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33769    ac_cs_recheck=: ;;
33770  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33771    $as_echo "$ac_cs_version"; exit ;;
33772  --config | --confi | --conf | --con | --co | --c )
33773    $as_echo "$ac_cs_config"; exit ;;
33774  --debug | --debu | --deb | --de | --d | -d )
33775    debug=: ;;
33776  --file | --fil | --fi | --f )
33777    $ac_shift
33778    case $ac_optarg in
33779    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33780    '') as_fn_error $? "missing file argument" ;;
33781    esac
33782    as_fn_append CONFIG_FILES " '$ac_optarg'"
33783    ac_need_defaults=false;;
33784  --header | --heade | --head | --hea )
33785    $ac_shift
33786    case $ac_optarg in
33787    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33788    esac
33789    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33790    ac_need_defaults=false;;
33791  --he | --h)
33792    # Conflict between --help and --header
33793    as_fn_error $? "ambiguous option: \`$1'
33794Try \`$0 --help' for more information.";;
33795  --help | --hel | -h )
33796    $as_echo "$ac_cs_usage"; exit ;;
33797  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33798  | -silent | --silent | --silen | --sile | --sil | --si | --s)
33799    ac_cs_silent=: ;;
33800
33801  # This is an error.
33802  -*) as_fn_error $? "unrecognized option: \`$1'
33803Try \`$0 --help' for more information." ;;
33804
33805  *) as_fn_append ac_config_targets " $1"
33806     ac_need_defaults=false ;;
33807
33808  esac
33809  shift
33810done
33811
33812ac_configure_extra_args=
33813
33814if $ac_cs_silent; then
33815  exec 6>/dev/null
33816  ac_configure_extra_args="$ac_configure_extra_args --silent"
33817fi
33818
33819_ACEOF
33820cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33821if \$ac_cs_recheck; then
33822  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33823  shift
33824  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33825  CONFIG_SHELL='$SHELL'
33826  export CONFIG_SHELL
33827  exec "\$@"
33828fi
33829
33830_ACEOF
33831cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33832exec 5>>config.log
33833{
33834  echo
33835  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33836## Running $as_me. ##
33837_ASBOX
33838  $as_echo "$ac_log"
33839} >&5
33840
33841_ACEOF
33842cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33843_ACEOF
33844
33845cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33846
33847# Handling of arguments.
33848for ac_config_target in $ac_config_targets
33849do
33850  case $ac_config_target in
33851    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33852    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33853    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33854    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33855    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33856    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33857    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33858
33859  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
33860  esac
33861done
33862
33863
33864# If the user did not use the arguments to specify the items to instantiate,
33865# then the envvar interface is used.  Set only those that are not.
33866# We use the long form for the default assignment because of an extremely
33867# bizarre bug on SunOS 4.1.3.
33868if $ac_need_defaults; then
33869  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33870  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33871fi
33872
33873# Have a temporary directory for convenience.  Make it in the build tree
33874# simply because there is no reason against having it here, and in addition,
33875# creating and moving files from /tmp can sometimes cause problems.
33876# Hook for its removal unless debugging.
33877# Note that there is a small window in which the directory will not be cleaned:
33878# after its creation but before its name has been assigned to `$tmp'.
33879$debug ||
33880{
33881  tmp=
33882  trap 'exit_status=$?
33883  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
33884' 0
33885  trap 'as_fn_exit 1' 1 2 13 15
33886}
33887# Create a (secure) tmp directory for tmp files.
33888
33889{
33890  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33891  test -n "$tmp" && test -d "$tmp"
33892}  ||
33893{
33894  tmp=./conf$$-$RANDOM
33895  (umask 077 && mkdir "$tmp")
33896} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33897
33898# Set up the scripts for CONFIG_FILES section.
33899# No need to generate them if there are no CONFIG_FILES.
33900# This happens for instance with `./config.status config.h'.
33901if test -n "$CONFIG_FILES"; then
33902
33903
33904ac_cr=`echo X | tr X '\015'`
33905# On cygwin, bash can eat \r inside `` if the user requested igncr.
33906# But we know of no other shell where ac_cr would be empty at this
33907# point, so we can use a bashism as a fallback.
33908if test "x$ac_cr" = x; then
33909  eval ac_cr=\$\'\\r\'
33910fi
33911ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33912if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33913  ac_cs_awk_cr='\\r'
33914else
33915  ac_cs_awk_cr=$ac_cr
33916fi
33917
33918echo 'BEGIN {' >"$tmp/subs1.awk" &&
33919_ACEOF
33920
33921
33922{
33923  echo "cat >conf$$subs.awk <<_ACEOF" &&
33924  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33925  echo "_ACEOF"
33926} >conf$$subs.sh ||
33927  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33928ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33929ac_delim='%!_!# '
33930for ac_last_try in false false false false false :; do
33931  . ./conf$$subs.sh ||
33932    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33933
33934  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33935  if test $ac_delim_n = $ac_delim_num; then
33936    break
33937  elif $ac_last_try; then
33938    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33939  else
33940    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33941  fi
33942done
33943rm -f conf$$subs.sh
33944
33945cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33946cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
33947_ACEOF
33948sed -n '
33949h
33950s/^/S["/; s/!.*/"]=/
33951p
33952g
33953s/^[^!]*!//
33954:repl
33955t repl
33956s/'"$ac_delim"'$//
33957t delim
33958:nl
33959h
33960s/\(.\{148\}\)..*/\1/
33961t more1
33962s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33963p
33964n
33965b repl
33966:more1
33967s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33968p
33969g
33970s/.\{148\}//
33971t nl
33972:delim
33973h
33974s/\(.\{148\}\)..*/\1/
33975t more2
33976s/["\\]/\\&/g; s/^/"/; s/$/"/
33977p
33978b
33979:more2
33980s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33981p
33982g
33983s/.\{148\}//
33984t delim
33985' <conf$$subs.awk | sed '
33986/^[^""]/{
33987  N
33988  s/\n//
33989}
33990' >>$CONFIG_STATUS || ac_write_fail=1
33991rm -f conf$$subs.awk
33992cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33993_ACAWK
33994cat >>"\$tmp/subs1.awk" <<_ACAWK &&
33995  for (key in S) S_is_set[key] = 1
33996  FS = ""
33997
33998}
33999{
34000  line = $ 0
34001  nfields = split(line, field, "@")
34002  substed = 0
34003  len = length(field[1])
34004  for (i = 2; i < nfields; i++) {
34005    key = field[i]
34006    keylen = length(key)
34007    if (S_is_set[key]) {
34008      value = S[key]
34009      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34010      len += length(value) + length(field[++i])
34011      substed = 1
34012    } else
34013      len += 1 + keylen
34014  }
34015
34016  print line
34017}
34018
34019_ACAWK
34020_ACEOF
34021cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34022if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34023  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34024else
34025  cat
34026fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34027  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34028_ACEOF
34029
34030# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34031# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34032# trailing colons and then remove the whole line if VPATH becomes empty
34033# (actually we leave an empty line to preserve line numbers).
34034if test "x$srcdir" = x.; then
34035  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34036h
34037s///
34038s/^/:/
34039s/[	 ]*$/:/
34040s/:\$(srcdir):/:/g
34041s/:\${srcdir}:/:/g
34042s/:@srcdir@:/:/g
34043s/^:*//
34044s/:*$//
34045x
34046s/\(=[	 ]*\).*/\1/
34047G
34048s/\n//
34049s/^[^=]*=[	 ]*$//
34050}'
34051fi
34052
34053cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34054fi # test -n "$CONFIG_FILES"
34055
34056# Set up the scripts for CONFIG_HEADERS section.
34057# No need to generate them if there are no CONFIG_HEADERS.
34058# This happens for instance with `./config.status Makefile'.
34059if test -n "$CONFIG_HEADERS"; then
34060cat >"$tmp/defines.awk" <<\_ACAWK ||
34061BEGIN {
34062_ACEOF
34063
34064# Transform confdefs.h into an awk script `defines.awk', embedded as
34065# here-document in config.status, that substitutes the proper values into
34066# config.h.in to produce config.h.
34067
34068# Create a delimiter string that does not exist in confdefs.h, to ease
34069# handling of long lines.
34070ac_delim='%!_!# '
34071for ac_last_try in false false :; do
34072  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34073  if test -z "$ac_t"; then
34074    break
34075  elif $ac_last_try; then
34076    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34077  else
34078    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34079  fi
34080done
34081
34082# For the awk script, D is an array of macro values keyed by name,
34083# likewise P contains macro parameters if any.  Preserve backslash
34084# newline sequences.
34085
34086ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34087sed -n '
34088s/.\{148\}/&'"$ac_delim"'/g
34089t rset
34090:rset
34091s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34092t def
34093d
34094:def
34095s/\\$//
34096t bsnl
34097s/["\\]/\\&/g
34098s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34099D["\1"]=" \3"/p
34100s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34101d
34102:bsnl
34103s/["\\]/\\&/g
34104s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34105D["\1"]=" \3\\\\\\n"\\/p
34106t cont
34107s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34108t cont
34109d
34110:cont
34111n
34112s/.\{148\}/&'"$ac_delim"'/g
34113t clear
34114:clear
34115s/\\$//
34116t bsnlc
34117s/["\\]/\\&/g; s/^/"/; s/$/"/p
34118d
34119:bsnlc
34120s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34121b cont
34122' <confdefs.h | sed '
34123s/'"$ac_delim"'/"\\\
34124"/g' >>$CONFIG_STATUS || ac_write_fail=1
34125
34126cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34127  for (key in D) D_is_set[key] = 1
34128  FS = ""
34129}
34130/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34131  line = \$ 0
34132  split(line, arg, " ")
34133  if (arg[1] == "#") {
34134    defundef = arg[2]
34135    mac1 = arg[3]
34136  } else {
34137    defundef = substr(arg[1], 2)
34138    mac1 = arg[2]
34139  }
34140  split(mac1, mac2, "(") #)
34141  macro = mac2[1]
34142  prefix = substr(line, 1, index(line, defundef) - 1)
34143  if (D_is_set[macro]) {
34144    # Preserve the white space surrounding the "#".
34145    print prefix "define", macro P[macro] D[macro]
34146    next
34147  } else {
34148    # Replace #undef with comments.  This is necessary, for example,
34149    # in the case of _POSIX_SOURCE, which is predefined and required
34150    # on some systems where configure will not decide to define it.
34151    if (defundef == "undef") {
34152      print "/*", prefix defundef, macro, "*/"
34153      next
34154    }
34155  }
34156}
34157{ print }
34158_ACAWK
34159_ACEOF
34160cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34161  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34162fi # test -n "$CONFIG_HEADERS"
34163
34164
34165eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34166shift
34167for ac_tag
34168do
34169  case $ac_tag in
34170  :[FHLC]) ac_mode=$ac_tag; continue;;
34171  esac
34172  case $ac_mode$ac_tag in
34173  :[FHL]*:*);;
34174  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
34175  :[FH]-) ac_tag=-:-;;
34176  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34177  esac
34178  ac_save_IFS=$IFS
34179  IFS=:
34180  set x $ac_tag
34181  IFS=$ac_save_IFS
34182  shift
34183  ac_file=$1
34184  shift
34185
34186  case $ac_mode in
34187  :L) ac_source=$1;;
34188  :[FH])
34189    ac_file_inputs=
34190    for ac_f
34191    do
34192      case $ac_f in
34193      -) ac_f="$tmp/stdin";;
34194      *) # Look for the file first in the build tree, then in the source tree
34195	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34196	 # because $ac_f cannot contain `:'.
34197	 test -f "$ac_f" ||
34198	   case $ac_f in
34199	   [\\/$]*) false;;
34200	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34201	   esac ||
34202	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
34203      esac
34204      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34205      as_fn_append ac_file_inputs " '$ac_f'"
34206    done
34207
34208    # Let's still pretend it is `configure' which instantiates (i.e., don't
34209    # use $as_me), people would be surprised to read:
34210    #    /* config.h.  Generated by config.status.  */
34211    configure_input='Generated from '`
34212	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34213	`' by configure.'
34214    if test x"$ac_file" != x-; then
34215      configure_input="$ac_file.  $configure_input"
34216      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34217$as_echo "$as_me: creating $ac_file" >&6;}
34218    fi
34219    # Neutralize special characters interpreted by sed in replacement strings.
34220    case $configure_input in #(
34221    *\&* | *\|* | *\\* )
34222       ac_sed_conf_input=`$as_echo "$configure_input" |
34223       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34224    *) ac_sed_conf_input=$configure_input;;
34225    esac
34226
34227    case $ac_tag in
34228    *:-:* | *:-) cat >"$tmp/stdin" \
34229      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
34230    esac
34231    ;;
34232  esac
34233
34234  ac_dir=`$as_dirname -- "$ac_file" ||
34235$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34236	 X"$ac_file" : 'X\(//\)[^/]' \| \
34237	 X"$ac_file" : 'X\(//\)$' \| \
34238	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34239$as_echo X"$ac_file" |
34240    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34241	    s//\1/
34242	    q
34243	  }
34244	  /^X\(\/\/\)[^/].*/{
34245	    s//\1/
34246	    q
34247	  }
34248	  /^X\(\/\/\)$/{
34249	    s//\1/
34250	    q
34251	  }
34252	  /^X\(\/\).*/{
34253	    s//\1/
34254	    q
34255	  }
34256	  s/.*/./; q'`
34257  as_dir="$ac_dir"; as_fn_mkdir_p
34258  ac_builddir=.
34259
34260case "$ac_dir" in
34261.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34262*)
34263  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34264  # A ".." for each directory in $ac_dir_suffix.
34265  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34266  case $ac_top_builddir_sub in
34267  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34268  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34269  esac ;;
34270esac
34271ac_abs_top_builddir=$ac_pwd
34272ac_abs_builddir=$ac_pwd$ac_dir_suffix
34273# for backward compatibility:
34274ac_top_builddir=$ac_top_build_prefix
34275
34276case $srcdir in
34277  .)  # We are building in place.
34278    ac_srcdir=.
34279    ac_top_srcdir=$ac_top_builddir_sub
34280    ac_abs_top_srcdir=$ac_pwd ;;
34281  [\\/]* | ?:[\\/]* )  # Absolute name.
34282    ac_srcdir=$srcdir$ac_dir_suffix;
34283    ac_top_srcdir=$srcdir
34284    ac_abs_top_srcdir=$srcdir ;;
34285  *) # Relative name.
34286    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34287    ac_top_srcdir=$ac_top_build_prefix$srcdir
34288    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34289esac
34290ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34291
34292
34293  case $ac_mode in
34294  :F)
34295  #
34296  # CONFIG_FILE
34297  #
34298
34299_ACEOF
34300
34301cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34302# If the template does not know about datarootdir, expand it.
34303# FIXME: This hack should be removed a few years after 2.60.
34304ac_datarootdir_hack=; ac_datarootdir_seen=
34305ac_sed_dataroot='
34306/datarootdir/ {
34307  p
34308  q
34309}
34310/@datadir@/p
34311/@docdir@/p
34312/@infodir@/p
34313/@localedir@/p
34314/@mandir@/p'
34315case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34316*datarootdir*) ac_datarootdir_seen=yes;;
34317*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34318  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34319$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34320_ACEOF
34321cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34322  ac_datarootdir_hack='
34323  s&@datadir@&$datadir&g
34324  s&@docdir@&$docdir&g
34325  s&@infodir@&$infodir&g
34326  s&@localedir@&$localedir&g
34327  s&@mandir@&$mandir&g
34328  s&\\\${datarootdir}&$datarootdir&g' ;;
34329esac
34330_ACEOF
34331
34332# Neutralize VPATH when `$srcdir' = `.'.
34333# Shell code in configure.ac might set extrasub.
34334# FIXME: do we really want to maintain this feature?
34335cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34336ac_sed_extra="$ac_vpsub
34337$extrasub
34338_ACEOF
34339cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34340:t
34341/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34342s|@configure_input@|$ac_sed_conf_input|;t t
34343s&@top_builddir@&$ac_top_builddir_sub&;t t
34344s&@top_build_prefix@&$ac_top_build_prefix&;t t
34345s&@srcdir@&$ac_srcdir&;t t
34346s&@abs_srcdir@&$ac_abs_srcdir&;t t
34347s&@top_srcdir@&$ac_top_srcdir&;t t
34348s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34349s&@builddir@&$ac_builddir&;t t
34350s&@abs_builddir@&$ac_abs_builddir&;t t
34351s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34352$ac_datarootdir_hack
34353"
34354eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
34355  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34356
34357test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34358  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
34359  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
34360  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34361which seems to be undefined.  Please make sure it is defined" >&5
34362$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34363which seems to be undefined.  Please make sure it is defined" >&2;}
34364
34365  rm -f "$tmp/stdin"
34366  case $ac_file in
34367  -) cat "$tmp/out" && rm -f "$tmp/out";;
34368  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
34369  esac \
34370  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34371 ;;
34372  :H)
34373  #
34374  # CONFIG_HEADER
34375  #
34376  if test x"$ac_file" != x-; then
34377    {
34378      $as_echo "/* $configure_input  */" \
34379      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
34380    } >"$tmp/config.h" \
34381      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34382    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
34383      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34384$as_echo "$as_me: $ac_file is unchanged" >&6;}
34385    else
34386      rm -f "$ac_file"
34387      mv "$tmp/config.h" "$ac_file" \
34388	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34389    fi
34390  else
34391    $as_echo "/* $configure_input  */" \
34392      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
34393      || as_fn_error $? "could not create -" "$LINENO" 5
34394  fi
34395 ;;
34396
34397
34398  esac
34399
34400done # for ac_tag
34401
34402
34403as_fn_exit 0
34404_ACEOF
34405ac_clean_files=$ac_clean_files_save
34406
34407test $ac_write_fail = 0 ||
34408  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34409
34410
34411# configure is writing to config.log, and then calls config.status.
34412# config.status does its own redirection, appending to config.log.
34413# Unfortunately, on DOS this fails, as config.log is still kept open
34414# by configure, so config.status won't be able to write to it; its
34415# output is simply discarded.  So we exec the FD to /dev/null,
34416# effectively closing config.log, so it can be properly (re)opened and
34417# appended to by config.status.  When coming back to configure, we
34418# need to make the FD available again.
34419if test "$no_create" != yes; then
34420  ac_cs_success=:
34421  ac_config_status_args=
34422  test "$silent" = yes &&
34423    ac_config_status_args="$ac_config_status_args --quiet"
34424  exec 5>/dev/null
34425  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34426  exec 5>>config.log
34427  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34428  # would make configure fail if this is the last instruction.
34429  $ac_cs_success || as_fn_exit 1
34430fi
34431if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34432  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34433$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34434fi
34435
34436
34437# Make the compare script executable
34438$CHMOD +x $OUTPUT_ROOT/compare.sh
34439
34440# Finally output some useful information to the user
34441
34442# Finally output some useful information to the user
34443
34444if test "x$CCACHE_FOUND" != x; then
34445	if  test "x$HAS_GOOD_CCACHE" = x; then
34446		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34447		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34448	else
34449		CCACHE_STATUS="installed and in use"
34450	fi
34451else
34452	if test "x$GCC" = xyes; then
34453		CCACHE_STATUS="not installed (consider installing)"
34454		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34455	else
34456		CCACHE_STATUS="not available for your system"
34457	fi
34458fi
34459
34460printf "\n"
34461printf "====================================================\n"
34462printf "A new configuration has been successfully created in\n"
34463printf "$OUTPUT_ROOT\n"
34464if test "x$CONFIGURE_COMMAND_LINE" != x; then
34465	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34466else
34467	printf "using default settings.\n"
34468fi
34469
34470printf "\n"
34471printf "Configuration summary:\n"
34472printf "* Debug level:    $DEBUG_LEVEL\n"
34473printf "* JDK variant:    $JDK_VARIANT\n"
34474printf "* JVM variants:   $with_jvm_variants\n"
34475printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34476
34477printf "\n"
34478printf "Tools summary:\n"
34479if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34480  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34481fi
34482printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34483printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34484printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34485
34486printf "\n"
34487printf "Build performance summary:\n"
34488printf "* Cores to use:   $JOBS\n"
34489printf "* Memory limit:   $MEMORY_SIZE MB\n"
34490printf "* ccache status:  $CCACHE_STATUS\n"
34491printf "\n"
34492
34493if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34494	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34495	printf "$CCACHE_HELP_MSG\n"
34496
34497    # Print a helpful message on how to acquire the necessary build dependency.
34498    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34499    MISSING_DEPENDENCY=ccache
34500    PKGHANDLER_COMMAND=
34501
34502    case $PKGHANDLER in
34503	apt-get)
34504                apt_help     $MISSING_DEPENDENCY ;;
34505    yum)
34506                yum_help     $MISSING_DEPENDENCY ;;
34507	port)
34508                port_help    $MISSING_DEPENDENCY ;;
34509	pkgutil)
34510                pkgutil_help $MISSING_DEPENDENCY ;;
34511	pkgadd)
34512                pkgadd_help  $MISSING_DEPENDENCY ;;
34513    * )
34514      break ;;
34515    esac
34516
34517    if test "x$PKGHANDLER_COMMAND" != x; then
34518        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34519    fi
34520
34521	printf "$HELP_MSG\n"
34522	printf "\n"
34523fi
34524
34525if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34526	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34527	printf "will result in longer build times.\n"
34528	printf "\n"
34529fi
34530
34531if test "x$FOUND_ALT_VARIABLES" != "x"; then
34532	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34533	printf "These are not respected, and will be ignored. It is recommended\n"
34534	printf "that you clean your environment. The following variables are set:\n"
34535	printf "$FOUND_ALT_VARIABLES\n"
34536	printf "\n"
34537fi
34538
34539if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34540	printf "WARNING: Your build output directory is not on a local disk.\n"
34541	printf "This will severely degrade build performance!\n"
34542	printf "It is recommended that you create an output directory on a local disk,\n"
34543	printf "and run the configure script again from that directory.\n"
34544	printf "\n"
34545fi
34546
34547if test "x$IS_RECONFIGURE" = "xyes"; then
34548	printf "WARNING: The result of this configuration has overridden an older\n"
34549	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34550	printf "proper build. Failure to do so might result in strange build problems.\n"
34551	printf "\n"
34552fi
34553
34554