generated-configure.sh revision 724:c31e9dc1fe3d
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
684JTREGEXE
685JT_HOME
686LIPO
687ac_ct_OBJDUMP
688OBJDUMP
689ac_ct_OBJCOPY
690OBJCOPY
691MCS
692STRIP
693GNM
694NM
695AS
696CXXCPP
697CPP
698COMPILER_TYPE
699RC_FLAGS
700DUMPBIN
701WINAR
702HOTSPOT_RC
703HOTSPOT_MT
704RC
705MT
706WINLD
707HOTSPOT_LD
708HOTSPOT_CXX
709ARFLAGS
710AR
711LDEXECXX
712LDCXX
713LDEXE
714LD
715ac_ct_OBJC
716OBJCFLAGS
717OBJC
718ac_ct_CXX
719CXXFLAGS
720CXX
721ac_ct_PROPER_COMPILER_CXX
722PROPER_COMPILER_CXX
723POTENTIAL_CXX
724TOOLS_DIR_CXX
725OBJEXT
726EXEEXT
727ac_ct_CC
728CPPFLAGS
729LDFLAGS
730CFLAGS
731CC
732ac_ct_PROPER_COMPILER_CC
733PROPER_COMPILER_CC
734POTENTIAL_CC
735TOOLS_DIR_CC
736BUILD_LD
737BUILD_CXX
738BUILD_CC
739MSVCR_DLL
740DXSDK_INCLUDE_PATH
741DXSDK_LIB_PATH
742VS_PATH
743VS_LIB
744VS_INCLUDE
745CYGWIN_LINK
746AR_OUT_OPTION
747LD_OUT_OPTION
748EXE_OUT_OPTION
749CC_OUT_OPTION
750BUILD_HOTSPOT
751HOTSPOT_DIST
752BUILD_OUTPUT
753OVERRIDE_SRC_ROOT
754ADD_SRC_ROOT
755JDK_TOPDIR
756NASHORN_TOPDIR
757HOTSPOT_TOPDIR
758JAXWS_TOPDIR
759JAXP_TOPDIR
760CORBA_TOPDIR
761LANGTOOLS_TOPDIR
762BOOT_JDK_JVMARGS
763JAVAC_FLAGS
764BOOT_JDK_SOURCETARGET
765BOOT_JDK
766BOOT_TOOLSJAR
767BOOT_RTJAR
768JAVA_CHECK
769JAVAC_CHECK
770COOKED_BUILD_NUMBER
771JDK_VERSION
772COPYRIGHT_YEAR
773MACOSX_BUNDLE_ID_BASE
774MACOSX_BUNDLE_NAME_BASE
775COMPANY_NAME
776JDK_RC_PLATFORM_NAME
777PRODUCT_SUFFIX
778PRODUCT_NAME
779LAUNCHER_NAME
780MILESTONE
781JDK_BUILD_NUMBER
782JDK_UPDATE_VERSION
783JDK_MICRO_VERSION
784JDK_MINOR_VERSION
785JDK_MAJOR_VERSION
786USER_RELEASE_SUFFIX
787COMPRESS_JARS
788UNLIMITED_CRYPTO
789CACERTS_FILE
790TEST_IN_BUILD
791BUILD_HEADLESS
792SUPPORT_HEADFUL
793SUPPORT_HEADLESS
794BDEPS_FTP
795BDEPS_UNZIP
796OS_VERSION_MICRO
797OS_VERSION_MINOR
798OS_VERSION_MAJOR
799PKG_CONFIG
800CODESIGN
801XATTR
802TIME
803STAT
804HG
805READELF
806OTOOL
807LDD
808ZIP
809UNZIP
810FIND_DELETE
811MAKE
812CHECK_TOOLSDIR_MAKE
813CHECK_TOOLSDIR_GMAKE
814CHECK_MAKE
815CHECK_GMAKE
816PKGHANDLER
817OUTPUT_ROOT
818CONF_NAME
819SPEC
820BUILD_VARIANT_RELEASE
821DEBUG_CLASSFILES
822FASTDEBUG
823VARIANT
824DEBUG_LEVEL
825MACOSX_UNIVERSAL
826INCLUDE_SA
827JVM_VARIANT_ZEROSHARK
828JVM_VARIANT_ZERO
829JVM_VARIANT_KERNEL
830JVM_VARIANT_MINIMAL1
831JVM_VARIANT_CLIENT
832JVM_VARIANT_SERVER
833JVM_VARIANTS
834JDK_VARIANT
835SET_OPENJDK
836BUILD_LOG_WRAPPER
837BUILD_LOG_PREVIOUS
838BUILD_LOG
839SYS_ROOT
840PATH_SEP
841SRC_ROOT
842ZERO_ARCHDEF
843DEFINE_CROSS_COMPILE_ARCH
844LP64
845OPENJDK_TARGET_OS_API_DIR
846OPENJDK_TARGET_CPU_JLI_CFLAGS
847OPENJDK_TARGET_CPU_OSARCH
848OPENJDK_TARGET_CPU_ISADIR
849OPENJDK_TARGET_CPU_LIBDIR
850OPENJDK_TARGET_CPU_LEGACY_LIB
851OPENJDK_TARGET_CPU_LEGACY
852REQUIRED_OS_VERSION
853REQUIRED_OS_NAME
854COMPILE_TYPE
855OPENJDK_TARGET_CPU_ENDIAN
856OPENJDK_TARGET_CPU_BITS
857OPENJDK_TARGET_CPU_ARCH
858OPENJDK_TARGET_CPU
859OPENJDK_TARGET_OS_API
860OPENJDK_TARGET_OS
861OPENJDK_BUILD_CPU_ENDIAN
862OPENJDK_BUILD_CPU_BITS
863OPENJDK_BUILD_CPU_ARCH
864OPENJDK_BUILD_CPU
865OPENJDK_BUILD_OS_API
866OPENJDK_BUILD_OS
867OPENJDK_BUILD_AUTOCONF_NAME
868OPENJDK_TARGET_AUTOCONF_NAME
869target_os
870target_vendor
871target_cpu
872target
873host_os
874host_vendor
875host_cpu
876host
877build_os
878build_vendor
879build_cpu
880build
881SETFILE
882DF
883READLINK
884CYGPATH
885NAWK
886SED
887FGREP
888EGREP
889GREP
890AWK
891XARGS
892WHICH
893WC
894UNIQ
895UNAME
896TR
897TOUCH
898TEE
899TAR
900TAIL
901SORT
902SH
903RM
904PRINTF
905MV
906MKTEMP
907MKDIR
908LS
909LN
910HEAD
911FIND
912FILE
913EXPR
914ECHO
915DIRNAME
916DIFF
917DATE
918CUT
919CPIO
920CP
921COMM
922CMP
923CHMOD
924CAT
925BASH
926BASENAME
927DATE_WHEN_CONFIGURED
928CONFIGURE_COMMAND_LINE
929CUSTOM_MAKE_DIR
930target_alias
931host_alias
932build_alias
933LIBS
934ECHO_T
935ECHO_N
936ECHO_C
937DEFS
938mandir
939localedir
940libdir
941psdir
942pdfdir
943dvidir
944htmldir
945infodir
946docdir
947oldincludedir
948includedir
949localstatedir
950sharedstatedir
951sysconfdir
952datadir
953datarootdir
954libexecdir
955sbindir
956bindir
957program_transform_name
958prefix
959exec_prefix
960PACKAGE_URL
961PACKAGE_BUGREPORT
962PACKAGE_STRING
963PACKAGE_VERSION
964PACKAGE_TARNAME
965PACKAGE_NAME
966PATH_SEPARATOR
967SHELL'
968ac_subst_files=''
969ac_user_opts='
970enable_option_checking
971with_custom_make_dir
972with_target_bits
973with_sys_root
974with_tools_dir
975with_devkit
976enable_openjdk_only
977with_jdk_variant
978with_jvm_variants
979enable_debug
980with_debug_level
981with_conf_name
982with_builddeps_conf
983with_builddeps_server
984with_builddeps_dir
985with_builddeps_group
986enable_headful
987enable_hotspot_test_in_build
988with_cacerts_file
989enable_unlimited_crypto
990with_milestone
991with_build_number
992with_user_release_suffix
993with_boot_jdk
994with_boot_jdk_jvmargs
995with_add_source_root
996with_override_source_root
997with_adds_and_overrides
998with_override_langtools
999with_override_corba
1000with_override_jaxp
1001with_override_jaxws
1002with_override_hotspot
1003with_override_jdk
1004with_import_hotspot
1005with_msvcr_dll
1006with_dxsdk
1007with_dxsdk_lib
1008with_dxsdk_include
1009with_jtreg
1010with_extra_cflags
1011with_extra_cxxflags
1012with_extra_ldflags
1013enable_debug_symbols
1014enable_zip_debug_info
1015enable_macosx_runtime_support
1016with_x
1017with_cups
1018with_cups_include
1019with_freetype
1020with_alsa
1021with_alsa_include
1022with_alsa_lib
1023with_giflib
1024with_zlib
1025with_stdc__lib
1026with_num_cores
1027with_memory_size
1028with_jobs
1029with_sjavac_server_java
1030enable_sjavac
1031enable_precompiled_headers
1032enable_ccache
1033with_ccache_dir
1034'
1035      ac_precious_vars='build_alias
1036host_alias
1037target_alias
1038PKG_CONFIG
1039CC
1040CFLAGS
1041LDFLAGS
1042LIBS
1043CPPFLAGS
1044CXX
1045CXXFLAGS
1046CCC
1047OBJC
1048OBJCFLAGS
1049CPP
1050CXXCPP
1051XMKMF
1052FREETYPE2_CFLAGS
1053FREETYPE2_LIBS
1054ALSA_CFLAGS
1055ALSA_LIBS
1056LIBFFI_CFLAGS
1057LIBFFI_LIBS'
1058
1059
1060# Initialize some variables set by options.
1061ac_init_help=
1062ac_init_version=false
1063ac_unrecognized_opts=
1064ac_unrecognized_sep=
1065# The variables have the same names as the options, with
1066# dashes changed to underlines.
1067cache_file=/dev/null
1068exec_prefix=NONE
1069no_create=
1070no_recursion=
1071prefix=NONE
1072program_prefix=NONE
1073program_suffix=NONE
1074program_transform_name=s,x,x,
1075silent=
1076site=
1077srcdir=
1078verbose=
1079x_includes=NONE
1080x_libraries=NONE
1081
1082# Installation directory options.
1083# These are left unexpanded so users can "make install exec_prefix=/foo"
1084# and all the variables that are supposed to be based on exec_prefix
1085# by default will actually change.
1086# Use braces instead of parens because sh, perl, etc. also accept them.
1087# (The list follows the same order as the GNU Coding Standards.)
1088bindir='${exec_prefix}/bin'
1089sbindir='${exec_prefix}/sbin'
1090libexecdir='${exec_prefix}/libexec'
1091datarootdir='${prefix}/share'
1092datadir='${datarootdir}'
1093sysconfdir='${prefix}/etc'
1094sharedstatedir='${prefix}/com'
1095localstatedir='${prefix}/var'
1096includedir='${prefix}/include'
1097oldincludedir='/usr/include'
1098docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1099infodir='${datarootdir}/info'
1100htmldir='${docdir}'
1101dvidir='${docdir}'
1102pdfdir='${docdir}'
1103psdir='${docdir}'
1104libdir='${exec_prefix}/lib'
1105localedir='${datarootdir}/locale'
1106mandir='${datarootdir}/man'
1107
1108ac_prev=
1109ac_dashdash=
1110for ac_option
1111do
1112  # If the previous option needs an argument, assign it.
1113  if test -n "$ac_prev"; then
1114    eval $ac_prev=\$ac_option
1115    ac_prev=
1116    continue
1117  fi
1118
1119  case $ac_option in
1120  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1121  *=)   ac_optarg= ;;
1122  *)    ac_optarg=yes ;;
1123  esac
1124
1125  # Accept the important Cygnus configure options, so we can diagnose typos.
1126
1127  case $ac_dashdash$ac_option in
1128  --)
1129    ac_dashdash=yes ;;
1130
1131  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1132    ac_prev=bindir ;;
1133  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1134    bindir=$ac_optarg ;;
1135
1136  -build | --build | --buil | --bui | --bu)
1137    ac_prev=build_alias ;;
1138  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1139    build_alias=$ac_optarg ;;
1140
1141  -cache-file | --cache-file | --cache-fil | --cache-fi \
1142  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1143    ac_prev=cache_file ;;
1144  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1145  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1146    cache_file=$ac_optarg ;;
1147
1148  --config-cache | -C)
1149    cache_file=config.cache ;;
1150
1151  -datadir | --datadir | --datadi | --datad)
1152    ac_prev=datadir ;;
1153  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1154    datadir=$ac_optarg ;;
1155
1156  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1157  | --dataroo | --dataro | --datar)
1158    ac_prev=datarootdir ;;
1159  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1160  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1161    datarootdir=$ac_optarg ;;
1162
1163  -disable-* | --disable-*)
1164    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1165    # Reject names that are not valid shell variable names.
1166    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1167      as_fn_error $? "invalid feature name: $ac_useropt"
1168    ac_useropt_orig=$ac_useropt
1169    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1170    case $ac_user_opts in
1171      *"
1172"enable_$ac_useropt"
1173"*) ;;
1174      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1175	 ac_unrecognized_sep=', ';;
1176    esac
1177    eval enable_$ac_useropt=no ;;
1178
1179  -docdir | --docdir | --docdi | --doc | --do)
1180    ac_prev=docdir ;;
1181  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1182    docdir=$ac_optarg ;;
1183
1184  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1185    ac_prev=dvidir ;;
1186  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1187    dvidir=$ac_optarg ;;
1188
1189  -enable-* | --enable-*)
1190    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1191    # Reject names that are not valid shell variable names.
1192    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1193      as_fn_error $? "invalid feature name: $ac_useropt"
1194    ac_useropt_orig=$ac_useropt
1195    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1196    case $ac_user_opts in
1197      *"
1198"enable_$ac_useropt"
1199"*) ;;
1200      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1201	 ac_unrecognized_sep=', ';;
1202    esac
1203    eval enable_$ac_useropt=\$ac_optarg ;;
1204
1205  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1206  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1207  | --exec | --exe | --ex)
1208    ac_prev=exec_prefix ;;
1209  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1210  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1211  | --exec=* | --exe=* | --ex=*)
1212    exec_prefix=$ac_optarg ;;
1213
1214  -gas | --gas | --ga | --g)
1215    # Obsolete; use --with-gas.
1216    with_gas=yes ;;
1217
1218  -help | --help | --hel | --he | -h)
1219    ac_init_help=long ;;
1220  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1221    ac_init_help=recursive ;;
1222  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1223    ac_init_help=short ;;
1224
1225  -host | --host | --hos | --ho)
1226    ac_prev=host_alias ;;
1227  -host=* | --host=* | --hos=* | --ho=*)
1228    host_alias=$ac_optarg ;;
1229
1230  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1231    ac_prev=htmldir ;;
1232  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1233  | --ht=*)
1234    htmldir=$ac_optarg ;;
1235
1236  -includedir | --includedir | --includedi | --included | --include \
1237  | --includ | --inclu | --incl | --inc)
1238    ac_prev=includedir ;;
1239  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1240  | --includ=* | --inclu=* | --incl=* | --inc=*)
1241    includedir=$ac_optarg ;;
1242
1243  -infodir | --infodir | --infodi | --infod | --info | --inf)
1244    ac_prev=infodir ;;
1245  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1246    infodir=$ac_optarg ;;
1247
1248  -libdir | --libdir | --libdi | --libd)
1249    ac_prev=libdir ;;
1250  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1251    libdir=$ac_optarg ;;
1252
1253  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1254  | --libexe | --libex | --libe)
1255    ac_prev=libexecdir ;;
1256  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1257  | --libexe=* | --libex=* | --libe=*)
1258    libexecdir=$ac_optarg ;;
1259
1260  -localedir | --localedir | --localedi | --localed | --locale)
1261    ac_prev=localedir ;;
1262  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1263    localedir=$ac_optarg ;;
1264
1265  -localstatedir | --localstatedir | --localstatedi | --localstated \
1266  | --localstate | --localstat | --localsta | --localst | --locals)
1267    ac_prev=localstatedir ;;
1268  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1269  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1270    localstatedir=$ac_optarg ;;
1271
1272  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1273    ac_prev=mandir ;;
1274  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1275    mandir=$ac_optarg ;;
1276
1277  -nfp | --nfp | --nf)
1278    # Obsolete; use --without-fp.
1279    with_fp=no ;;
1280
1281  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1282  | --no-cr | --no-c | -n)
1283    no_create=yes ;;
1284
1285  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1286  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1287    no_recursion=yes ;;
1288
1289  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1290  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1291  | --oldin | --oldi | --old | --ol | --o)
1292    ac_prev=oldincludedir ;;
1293  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1294  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1295  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1296    oldincludedir=$ac_optarg ;;
1297
1298  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1299    ac_prev=prefix ;;
1300  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1301    prefix=$ac_optarg ;;
1302
1303  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1304  | --program-pre | --program-pr | --program-p)
1305    ac_prev=program_prefix ;;
1306  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1307  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1308    program_prefix=$ac_optarg ;;
1309
1310  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1311  | --program-suf | --program-su | --program-s)
1312    ac_prev=program_suffix ;;
1313  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1314  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1315    program_suffix=$ac_optarg ;;
1316
1317  -program-transform-name | --program-transform-name \
1318  | --program-transform-nam | --program-transform-na \
1319  | --program-transform-n | --program-transform- \
1320  | --program-transform | --program-transfor \
1321  | --program-transfo | --program-transf \
1322  | --program-trans | --program-tran \
1323  | --progr-tra | --program-tr | --program-t)
1324    ac_prev=program_transform_name ;;
1325  -program-transform-name=* | --program-transform-name=* \
1326  | --program-transform-nam=* | --program-transform-na=* \
1327  | --program-transform-n=* | --program-transform-=* \
1328  | --program-transform=* | --program-transfor=* \
1329  | --program-transfo=* | --program-transf=* \
1330  | --program-trans=* | --program-tran=* \
1331  | --progr-tra=* | --program-tr=* | --program-t=*)
1332    program_transform_name=$ac_optarg ;;
1333
1334  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1335    ac_prev=pdfdir ;;
1336  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1337    pdfdir=$ac_optarg ;;
1338
1339  -psdir | --psdir | --psdi | --psd | --ps)
1340    ac_prev=psdir ;;
1341  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1342    psdir=$ac_optarg ;;
1343
1344  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1345  | -silent | --silent | --silen | --sile | --sil)
1346    silent=yes ;;
1347
1348  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1349    ac_prev=sbindir ;;
1350  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1351  | --sbi=* | --sb=*)
1352    sbindir=$ac_optarg ;;
1353
1354  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1355  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1356  | --sharedst | --shareds | --shared | --share | --shar \
1357  | --sha | --sh)
1358    ac_prev=sharedstatedir ;;
1359  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1360  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1361  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1362  | --sha=* | --sh=*)
1363    sharedstatedir=$ac_optarg ;;
1364
1365  -site | --site | --sit)
1366    ac_prev=site ;;
1367  -site=* | --site=* | --sit=*)
1368    site=$ac_optarg ;;
1369
1370  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1371    ac_prev=srcdir ;;
1372  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1373    srcdir=$ac_optarg ;;
1374
1375  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1376  | --syscon | --sysco | --sysc | --sys | --sy)
1377    ac_prev=sysconfdir ;;
1378  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1379  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1380    sysconfdir=$ac_optarg ;;
1381
1382  -target | --target | --targe | --targ | --tar | --ta | --t)
1383    ac_prev=target_alias ;;
1384  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1385    target_alias=$ac_optarg ;;
1386
1387  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1388    verbose=yes ;;
1389
1390  -version | --version | --versio | --versi | --vers | -V)
1391    ac_init_version=: ;;
1392
1393  -with-* | --with-*)
1394    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1395    # Reject names that are not valid shell variable names.
1396    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1397      as_fn_error $? "invalid package name: $ac_useropt"
1398    ac_useropt_orig=$ac_useropt
1399    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1400    case $ac_user_opts in
1401      *"
1402"with_$ac_useropt"
1403"*) ;;
1404      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1405	 ac_unrecognized_sep=', ';;
1406    esac
1407    eval with_$ac_useropt=\$ac_optarg ;;
1408
1409  -without-* | --without-*)
1410    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1411    # Reject names that are not valid shell variable names.
1412    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1413      as_fn_error $? "invalid package name: $ac_useropt"
1414    ac_useropt_orig=$ac_useropt
1415    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1416    case $ac_user_opts in
1417      *"
1418"with_$ac_useropt"
1419"*) ;;
1420      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1421	 ac_unrecognized_sep=', ';;
1422    esac
1423    eval with_$ac_useropt=no ;;
1424
1425  --x)
1426    # Obsolete; use --with-x.
1427    with_x=yes ;;
1428
1429  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1430  | --x-incl | --x-inc | --x-in | --x-i)
1431    ac_prev=x_includes ;;
1432  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1433  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1434    x_includes=$ac_optarg ;;
1435
1436  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1437  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1438    ac_prev=x_libraries ;;
1439  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1440  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1441    x_libraries=$ac_optarg ;;
1442
1443  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1444Try \`$0 --help' for more information"
1445    ;;
1446
1447  *=*)
1448    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1449    # Reject names that are not valid shell variable names.
1450    case $ac_envvar in #(
1451      '' | [0-9]* | *[!_$as_cr_alnum]* )
1452      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1453    esac
1454    eval $ac_envvar=\$ac_optarg
1455    export $ac_envvar ;;
1456
1457  *)
1458    # FIXME: should be removed in autoconf 3.0.
1459    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1460    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1461      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1462    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1463    ;;
1464
1465  esac
1466done
1467
1468if test -n "$ac_prev"; then
1469  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1470  as_fn_error $? "missing argument to $ac_option"
1471fi
1472
1473if test -n "$ac_unrecognized_opts"; then
1474  case $enable_option_checking in
1475    no) ;;
1476    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1477    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1478  esac
1479fi
1480
1481# Check all directory arguments for consistency.
1482for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1483		datadir sysconfdir sharedstatedir localstatedir includedir \
1484		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1485		libdir localedir mandir
1486do
1487  eval ac_val=\$$ac_var
1488  # Remove trailing slashes.
1489  case $ac_val in
1490    */ )
1491      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1492      eval $ac_var=\$ac_val;;
1493  esac
1494  # Be sure to have absolute directory names.
1495  case $ac_val in
1496    [\\/$]* | ?:[\\/]* )  continue;;
1497    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1498  esac
1499  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1500done
1501
1502# There might be people who depend on the old broken behavior: `$host'
1503# used to hold the argument of --host etc.
1504# FIXME: To remove some day.
1505build=$build_alias
1506host=$host_alias
1507target=$target_alias
1508
1509# FIXME: To remove some day.
1510if test "x$host_alias" != x; then
1511  if test "x$build_alias" = x; then
1512    cross_compiling=maybe
1513    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1514    If a cross compiler is detected then cross compile mode will be used" >&2
1515  elif test "x$build_alias" != "x$host_alias"; then
1516    cross_compiling=yes
1517  fi
1518fi
1519
1520ac_tool_prefix=
1521test -n "$host_alias" && ac_tool_prefix=$host_alias-
1522
1523test "$silent" = yes && exec 6>/dev/null
1524
1525
1526ac_pwd=`pwd` && test -n "$ac_pwd" &&
1527ac_ls_di=`ls -di .` &&
1528ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1529  as_fn_error $? "working directory cannot be determined"
1530test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1531  as_fn_error $? "pwd does not report name of working directory"
1532
1533
1534# Find the source files, if location was not specified.
1535if test -z "$srcdir"; then
1536  ac_srcdir_defaulted=yes
1537  # Try the directory containing this script, then the parent directory.
1538  ac_confdir=`$as_dirname -- "$as_myself" ||
1539$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1540	 X"$as_myself" : 'X\(//\)[^/]' \| \
1541	 X"$as_myself" : 'X\(//\)$' \| \
1542	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1543$as_echo X"$as_myself" |
1544    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1545	    s//\1/
1546	    q
1547	  }
1548	  /^X\(\/\/\)[^/].*/{
1549	    s//\1/
1550	    q
1551	  }
1552	  /^X\(\/\/\)$/{
1553	    s//\1/
1554	    q
1555	  }
1556	  /^X\(\/\).*/{
1557	    s//\1/
1558	    q
1559	  }
1560	  s/.*/./; q'`
1561  srcdir=$ac_confdir
1562  if test ! -r "$srcdir/$ac_unique_file"; then
1563    srcdir=..
1564  fi
1565else
1566  ac_srcdir_defaulted=no
1567fi
1568if test ! -r "$srcdir/$ac_unique_file"; then
1569  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1570  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1571fi
1572ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1573ac_abs_confdir=`(
1574	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1575	pwd)`
1576# When building in place, set srcdir=.
1577if test "$ac_abs_confdir" = "$ac_pwd"; then
1578  srcdir=.
1579fi
1580# Remove unnecessary trailing slashes from srcdir.
1581# Double slashes in file names in object file debugging info
1582# mess up M-x gdb in Emacs.
1583case $srcdir in
1584*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1585esac
1586for ac_var in $ac_precious_vars; do
1587  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1588  eval ac_env_${ac_var}_value=\$${ac_var}
1589  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1590  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1591done
1592
1593#
1594# Report the --help message.
1595#
1596if test "$ac_init_help" = "long"; then
1597  # Omit some internal or obsolete options to make the list less imposing.
1598  # This message is too long to be a string in the A/UX 3.1 sh.
1599  cat <<_ACEOF
1600\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1601
1602Usage: $0 [OPTION]... [VAR=VALUE]...
1603
1604To assign environment variables (e.g., CC, CFLAGS...), specify them as
1605VAR=VALUE.  See below for descriptions of some of the useful variables.
1606
1607Defaults for the options are specified in brackets.
1608
1609Configuration:
1610  -h, --help              display this help and exit
1611      --help=short        display options specific to this package
1612      --help=recursive    display the short help of all the included packages
1613  -V, --version           display version information and exit
1614  -q, --quiet, --silent   do not print \`checking ...' messages
1615      --cache-file=FILE   cache test results in FILE [disabled]
1616  -C, --config-cache      alias for \`--cache-file=config.cache'
1617  -n, --no-create         do not create output files
1618      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1619
1620Installation directories:
1621  --prefix=PREFIX         install architecture-independent files in PREFIX
1622                          [$ac_default_prefix]
1623  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1624                          [PREFIX]
1625
1626By default, \`make install' will install all the files in
1627\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1628an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1629for instance \`--prefix=\$HOME'.
1630
1631For better control, use the options below.
1632
1633Fine tuning of the installation directories:
1634  --bindir=DIR            user executables [EPREFIX/bin]
1635  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1636  --libexecdir=DIR        program executables [EPREFIX/libexec]
1637  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1638  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1639  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1640  --libdir=DIR            object code libraries [EPREFIX/lib]
1641  --includedir=DIR        C header files [PREFIX/include]
1642  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1643  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1644  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1645  --infodir=DIR           info documentation [DATAROOTDIR/info]
1646  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1647  --mandir=DIR            man documentation [DATAROOTDIR/man]
1648  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1649  --htmldir=DIR           html documentation [DOCDIR]
1650  --dvidir=DIR            dvi documentation [DOCDIR]
1651  --pdfdir=DIR            pdf documentation [DOCDIR]
1652  --psdir=DIR             ps documentation [DOCDIR]
1653_ACEOF
1654
1655  cat <<\_ACEOF
1656
1657X features:
1658  --x-includes=DIR    X include files are in DIR
1659  --x-libraries=DIR   X library files are in DIR
1660
1661System types:
1662  --build=BUILD     configure for building on BUILD [guessed]
1663  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1664  --target=TARGET   configure for building compilers for TARGET [HOST]
1665_ACEOF
1666fi
1667
1668if test -n "$ac_init_help"; then
1669  case $ac_init_help in
1670     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1671   esac
1672  cat <<\_ACEOF
1673
1674Optional Features:
1675  --disable-option-checking  ignore unrecognized --enable/--with options
1676  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1677  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1678  --enable-openjdk-only   suppress building custom source even if present
1679                          [disabled]
1680  --enable-debug          set the debug level to fastdebug (shorthand for
1681                          --with-debug-level=fastdebug) [disabled]
1682  --disable-headful       disable building headful support (graphical UI
1683                          support) [enabled]
1684  --enable-hotspot-test-in-build
1685                          run the Queens test after Hotspot build [disabled]
1686  --enable-unlimited-crypto
1687                          Enable unlimited crypto policy [disabled]
1688  --disable-debug-symbols disable generation of debug symbols [enabled]
1689  --disable-zip-debug-info
1690                          disable zipping of debug-info files [enabled]
1691  --disable-macosx-runtime-support
1692                          disable the use of MacOSX Java runtime support
1693                          framework [enabled]
1694  --enable-sjavac         use sjavac to do fast incremental compiles
1695                          [disabled]
1696  --disable-precompiled-headers
1697                          disable using precompiled headers when compiling C++
1698                          [enabled]
1699  --disable-ccache        disable using ccache to speed up recompilations
1700                          [enabled]
1701
1702Optional Packages:
1703  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1704  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1705  --with-custom-make-dir  use this directory for custom build/make files
1706  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1707                          support it), e.g. --with-target-bits=32 [guessed]
1708  --with-sys-root         pass this sys-root to the compilers and tools (for
1709                          cross-compiling)
1710  --with-tools-dir        search this directory for compilers and tools (for
1711                          cross-compiling)
1712  --with-devkit           use this directory as base for tools-dir and
1713                          sys-root (for cross-compiling)
1714  --with-jdk-variant      JDK variant to build (normal) [normal]
1715  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1716                          client, minimal1, kernel, zero, zeroshark) [server]
1717  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1718                          [release]
1719  --with-conf-name        use this as the name of the configuration [generated
1720                          from important configuration options]
1721  --with-builddeps-conf   use this configuration file for the builddeps
1722  --with-builddeps-server download and use build dependencies from this server
1723                          url
1724  --with-builddeps-dir    store downloaded build dependencies here
1725                          [/localhome/builddeps]
1726  --with-builddeps-group  chgrp the downloaded build dependencies to this
1727                          group
1728  --with-cacerts-file     specify alternative cacerts file
1729  --with-milestone        Set milestone value for build [internal]
1730  --with-build-number     Set build number value for build [b00]
1731  --with-user-release-suffix
1732                          Add a custom string to the version string if build
1733                          number isn't set.[username_builddateb00]
1734  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1735  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1736                          invocations of the Boot JDK, overriding the default
1737                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1738                          -enableassertions"
1739  --with-add-source-root  for each and every source directory, look in this
1740                          additional source root for the same directory; if it
1741                          exists and have files in it, include it in the build
1742  --with-override-source-root
1743                          for each and every source directory, look in this
1744                          override source root for the same directory; if it
1745                          exists, use that directory instead and ignore the
1746                          directory in the original source root
1747  --with-adds-and-overrides
1748                          use the subdirs 'adds' and 'overrides' in the
1749                          specified directory as add-source-root and
1750                          override-source-root
1751  --with-override-langtools
1752                          use this langtools dir for the build
1753  --with-override-corba   use this corba dir for the build
1754  --with-override-jaxp    use this jaxp dir for the build
1755  --with-override-jaxws   use this jaxws dir for the build
1756  --with-override-hotspot use this hotspot dir for the build
1757  --with-override-jdk     use this jdk dir for the build
1758  --with-import-hotspot   import hotspot binaries from this jdk image or
1759                          hotspot build dist dir instead of building from
1760                          source
1761  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1762                          only) [probed]
1763  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1764  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1765                          [probed]
1766  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1767                          [probed]
1768  --with-jtreg            Regression Test Harness [probed]
1769  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1770  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1771  --with-extra-ldflags    extra flags to be used when linking jdk
1772  --with-x                use the X Window System
1773  --with-cups             specify prefix directory for the cups package
1774                          (expecting the headers under PATH/include)
1775  --with-cups-include     specify directory for the cups include files
1776  --with-freetype         specify prefix directory for the freetype2 package
1777                          (expecting the libraries under PATH/lib and the
1778                          headers under PATH/include)
1779  --with-alsa             specify prefix directory for the alsa package
1780                          (expecting the libraries under PATH/lib and the
1781                          headers under PATH/include)
1782  --with-alsa-include     specify directory for the alsa include files
1783  --with-alsa-lib         specify directory for the alsa library
1784  --with-giflib           use giflib from build system or OpenJDK source
1785                          (system, bundled) [bundled]
1786  --with-zlib             use zlib from build system or OpenJDK source
1787                          (system, bundled) [bundled]
1788  --with-stdc++lib=<static>,<dynamic>,<default>
1789                          force linking of the C++ runtime on Linux to either
1790                          static or dynamic, default is static with dynamic as
1791                          fallback
1792  --with-num-cores        number of cores in the build system, e.g.
1793                          --with-num-cores=8 [probed]
1794  --with-memory-size      memory (in MB) available in the build system, e.g.
1795                          --with-memory-size=1024 [probed]
1796  --with-jobs             number of parallel jobs to let make run [calculated
1797                          based on cores and memory]
1798  --with-sjavac-server-java
1799                          use this java binary for running the sjavac
1800                          background server [Boot JDK java]
1801  --with-ccache-dir       where to store ccache files [~/.ccache]
1802
1803Some influential environment variables:
1804  PKG_CONFIG  path to pkg-config utility
1805  CC          C compiler command
1806  CFLAGS      C compiler flags
1807  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1808              nonstandard directory <lib dir>
1809  LIBS        libraries to pass to the linker, e.g. -l<library>
1810  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1811              you have headers in a nonstandard directory <include dir>
1812  CXX         C++ compiler command
1813  CXXFLAGS    C++ compiler flags
1814  OBJC        Objective C compiler command
1815  OBJCFLAGS   Objective C compiler flags
1816  CPP         C preprocessor
1817  CXXCPP      C++ preprocessor
1818  XMKMF       Path to xmkmf, Makefile generator for X Window System
1819  FREETYPE2_CFLAGS
1820              C compiler flags for FREETYPE2, overriding pkg-config
1821  FREETYPE2_LIBS
1822              linker flags for FREETYPE2, overriding pkg-config
1823  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1824  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1825  LIBFFI_CFLAGS
1826              C compiler flags for LIBFFI, overriding pkg-config
1827  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1828
1829Use these variables to override the choices made by `configure' or to help
1830it to find libraries and programs with nonstandard names/locations.
1831
1832Report bugs to <build-dev@openjdk.java.net>.
1833OpenJDK home page: <http://openjdk.java.net>.
1834_ACEOF
1835ac_status=$?
1836fi
1837
1838if test "$ac_init_help" = "recursive"; then
1839  # If there are subdirs, report their specific --help.
1840  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1841    test -d "$ac_dir" ||
1842      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1843      continue
1844    ac_builddir=.
1845
1846case "$ac_dir" in
1847.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1848*)
1849  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1850  # A ".." for each directory in $ac_dir_suffix.
1851  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1852  case $ac_top_builddir_sub in
1853  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1854  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1855  esac ;;
1856esac
1857ac_abs_top_builddir=$ac_pwd
1858ac_abs_builddir=$ac_pwd$ac_dir_suffix
1859# for backward compatibility:
1860ac_top_builddir=$ac_top_build_prefix
1861
1862case $srcdir in
1863  .)  # We are building in place.
1864    ac_srcdir=.
1865    ac_top_srcdir=$ac_top_builddir_sub
1866    ac_abs_top_srcdir=$ac_pwd ;;
1867  [\\/]* | ?:[\\/]* )  # Absolute name.
1868    ac_srcdir=$srcdir$ac_dir_suffix;
1869    ac_top_srcdir=$srcdir
1870    ac_abs_top_srcdir=$srcdir ;;
1871  *) # Relative name.
1872    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1873    ac_top_srcdir=$ac_top_build_prefix$srcdir
1874    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1875esac
1876ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1877
1878    cd "$ac_dir" || { ac_status=$?; continue; }
1879    # Check for guested configure.
1880    if test -f "$ac_srcdir/configure.gnu"; then
1881      echo &&
1882      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1883    elif test -f "$ac_srcdir/configure"; then
1884      echo &&
1885      $SHELL "$ac_srcdir/configure" --help=recursive
1886    else
1887      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1888    fi || ac_status=$?
1889    cd "$ac_pwd" || { ac_status=$?; break; }
1890  done
1891fi
1892
1893test -n "$ac_init_help" && exit $ac_status
1894if $ac_init_version; then
1895  cat <<\_ACEOF
1896OpenJDK configure jdk8
1897generated by GNU Autoconf 2.67
1898
1899Copyright (C) 2010 Free Software Foundation, Inc.
1900This configure script is free software; the Free Software Foundation
1901gives unlimited permission to copy, distribute and modify it.
1902_ACEOF
1903  exit
1904fi
1905
1906## ------------------------ ##
1907## Autoconf initialization. ##
1908## ------------------------ ##
1909
1910# ac_fn_c_try_compile LINENO
1911# --------------------------
1912# Try to compile conftest.$ac_ext, and return whether this succeeded.
1913ac_fn_c_try_compile ()
1914{
1915  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1916  rm -f conftest.$ac_objext
1917  if { { ac_try="$ac_compile"
1918case "(($ac_try" in
1919  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1920  *) ac_try_echo=$ac_try;;
1921esac
1922eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1923$as_echo "$ac_try_echo"; } >&5
1924  (eval "$ac_compile") 2>conftest.err
1925  ac_status=$?
1926  if test -s conftest.err; then
1927    grep -v '^ *+' conftest.err >conftest.er1
1928    cat conftest.er1 >&5
1929    mv -f conftest.er1 conftest.err
1930  fi
1931  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1932  test $ac_status = 0; } && {
1933	 test -z "$ac_c_werror_flag" ||
1934	 test ! -s conftest.err
1935       } && test -s conftest.$ac_objext; then :
1936  ac_retval=0
1937else
1938  $as_echo "$as_me: failed program was:" >&5
1939sed 's/^/| /' conftest.$ac_ext >&5
1940
1941	ac_retval=1
1942fi
1943  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1944  as_fn_set_status $ac_retval
1945
1946} # ac_fn_c_try_compile
1947
1948# ac_fn_cxx_try_compile LINENO
1949# ----------------------------
1950# Try to compile conftest.$ac_ext, and return whether this succeeded.
1951ac_fn_cxx_try_compile ()
1952{
1953  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1954  rm -f conftest.$ac_objext
1955  if { { ac_try="$ac_compile"
1956case "(($ac_try" in
1957  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1958  *) ac_try_echo=$ac_try;;
1959esac
1960eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1961$as_echo "$ac_try_echo"; } >&5
1962  (eval "$ac_compile") 2>conftest.err
1963  ac_status=$?
1964  if test -s conftest.err; then
1965    grep -v '^ *+' conftest.err >conftest.er1
1966    cat conftest.er1 >&5
1967    mv -f conftest.er1 conftest.err
1968  fi
1969  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1970  test $ac_status = 0; } && {
1971	 test -z "$ac_cxx_werror_flag" ||
1972	 test ! -s conftest.err
1973       } && test -s conftest.$ac_objext; then :
1974  ac_retval=0
1975else
1976  $as_echo "$as_me: failed program was:" >&5
1977sed 's/^/| /' conftest.$ac_ext >&5
1978
1979	ac_retval=1
1980fi
1981  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1982  as_fn_set_status $ac_retval
1983
1984} # ac_fn_cxx_try_compile
1985
1986# ac_fn_objc_try_compile LINENO
1987# -----------------------------
1988# Try to compile conftest.$ac_ext, and return whether this succeeded.
1989ac_fn_objc_try_compile ()
1990{
1991  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1992  rm -f conftest.$ac_objext
1993  if { { ac_try="$ac_compile"
1994case "(($ac_try" in
1995  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1996  *) ac_try_echo=$ac_try;;
1997esac
1998eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1999$as_echo "$ac_try_echo"; } >&5
2000  (eval "$ac_compile") 2>conftest.err
2001  ac_status=$?
2002  if test -s conftest.err; then
2003    grep -v '^ *+' conftest.err >conftest.er1
2004    cat conftest.er1 >&5
2005    mv -f conftest.er1 conftest.err
2006  fi
2007  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2008  test $ac_status = 0; } && {
2009	 test -z "$ac_objc_werror_flag" ||
2010	 test ! -s conftest.err
2011       } && test -s conftest.$ac_objext; then :
2012  ac_retval=0
2013else
2014  $as_echo "$as_me: failed program was:" >&5
2015sed 's/^/| /' conftest.$ac_ext >&5
2016
2017	ac_retval=1
2018fi
2019  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2020  as_fn_set_status $ac_retval
2021
2022} # ac_fn_objc_try_compile
2023
2024# ac_fn_c_try_cpp LINENO
2025# ----------------------
2026# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2027ac_fn_c_try_cpp ()
2028{
2029  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2030  if { { ac_try="$ac_cpp conftest.$ac_ext"
2031case "(($ac_try" in
2032  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2033  *) ac_try_echo=$ac_try;;
2034esac
2035eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2036$as_echo "$ac_try_echo"; } >&5
2037  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2038  ac_status=$?
2039  if test -s conftest.err; then
2040    grep -v '^ *+' conftest.err >conftest.er1
2041    cat conftest.er1 >&5
2042    mv -f conftest.er1 conftest.err
2043  fi
2044  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2045  test $ac_status = 0; } > conftest.i && {
2046	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2047	 test ! -s conftest.err
2048       }; then :
2049  ac_retval=0
2050else
2051  $as_echo "$as_me: failed program was:" >&5
2052sed 's/^/| /' conftest.$ac_ext >&5
2053
2054    ac_retval=1
2055fi
2056  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2057  as_fn_set_status $ac_retval
2058
2059} # ac_fn_c_try_cpp
2060
2061# ac_fn_cxx_try_cpp LINENO
2062# ------------------------
2063# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2064ac_fn_cxx_try_cpp ()
2065{
2066  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2067  if { { ac_try="$ac_cpp conftest.$ac_ext"
2068case "(($ac_try" in
2069  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2070  *) ac_try_echo=$ac_try;;
2071esac
2072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2073$as_echo "$ac_try_echo"; } >&5
2074  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2075  ac_status=$?
2076  if test -s conftest.err; then
2077    grep -v '^ *+' conftest.err >conftest.er1
2078    cat conftest.er1 >&5
2079    mv -f conftest.er1 conftest.err
2080  fi
2081  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2082  test $ac_status = 0; } > conftest.i && {
2083	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2084	 test ! -s conftest.err
2085       }; then :
2086  ac_retval=0
2087else
2088  $as_echo "$as_me: failed program was:" >&5
2089sed 's/^/| /' conftest.$ac_ext >&5
2090
2091    ac_retval=1
2092fi
2093  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2094  as_fn_set_status $ac_retval
2095
2096} # ac_fn_cxx_try_cpp
2097
2098# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2099# ---------------------------------------------------------
2100# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2101# the include files in INCLUDES and setting the cache variable VAR
2102# accordingly.
2103ac_fn_cxx_check_header_mongrel ()
2104{
2105  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2106  if eval "test \"\${$3+set}\"" = set; then :
2107  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2108$as_echo_n "checking for $2... " >&6; }
2109if eval "test \"\${$3+set}\"" = set; then :
2110  $as_echo_n "(cached) " >&6
2111fi
2112eval ac_res=\$$3
2113	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2114$as_echo "$ac_res" >&6; }
2115else
2116  # Is the header compilable?
2117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2118$as_echo_n "checking $2 usability... " >&6; }
2119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h.  */
2121$4
2122#include <$2>
2123_ACEOF
2124if ac_fn_cxx_try_compile "$LINENO"; then :
2125  ac_header_compiler=yes
2126else
2127  ac_header_compiler=no
2128fi
2129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2131$as_echo "$ac_header_compiler" >&6; }
2132
2133# Is the header present?
2134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2135$as_echo_n "checking $2 presence... " >&6; }
2136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2137/* end confdefs.h.  */
2138#include <$2>
2139_ACEOF
2140if ac_fn_cxx_try_cpp "$LINENO"; then :
2141  ac_header_preproc=yes
2142else
2143  ac_header_preproc=no
2144fi
2145rm -f conftest.err conftest.i conftest.$ac_ext
2146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2147$as_echo "$ac_header_preproc" >&6; }
2148
2149# So?  What about this header?
2150case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2151  yes:no: )
2152    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2153$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2154    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2155$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2156    ;;
2157  no:yes:* )
2158    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2159$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2160    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2161$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2162    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2163$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2164    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2165$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2166    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2167$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2168( $as_echo "## ----------------------------------------- ##
2169## Report this to build-dev@openjdk.java.net ##
2170## ----------------------------------------- ##"
2171     ) | sed "s/^/$as_me: WARNING:     /" >&2
2172    ;;
2173esac
2174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2175$as_echo_n "checking for $2... " >&6; }
2176if eval "test \"\${$3+set}\"" = set; then :
2177  $as_echo_n "(cached) " >&6
2178else
2179  eval "$3=\$ac_header_compiler"
2180fi
2181eval ac_res=\$$3
2182	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2183$as_echo "$ac_res" >&6; }
2184fi
2185  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2186
2187} # ac_fn_cxx_check_header_mongrel
2188
2189# ac_fn_cxx_try_run LINENO
2190# ------------------------
2191# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2192# that executables *can* be run.
2193ac_fn_cxx_try_run ()
2194{
2195  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2196  if { { ac_try="$ac_link"
2197case "(($ac_try" in
2198  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2199  *) ac_try_echo=$ac_try;;
2200esac
2201eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2202$as_echo "$ac_try_echo"; } >&5
2203  (eval "$ac_link") 2>&5
2204  ac_status=$?
2205  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2206  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2207  { { case "(($ac_try" in
2208  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2209  *) ac_try_echo=$ac_try;;
2210esac
2211eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2212$as_echo "$ac_try_echo"; } >&5
2213  (eval "$ac_try") 2>&5
2214  ac_status=$?
2215  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2216  test $ac_status = 0; }; }; then :
2217  ac_retval=0
2218else
2219  $as_echo "$as_me: program exited with status $ac_status" >&5
2220       $as_echo "$as_me: failed program was:" >&5
2221sed 's/^/| /' conftest.$ac_ext >&5
2222
2223       ac_retval=$ac_status
2224fi
2225  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2226  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2227  as_fn_set_status $ac_retval
2228
2229} # ac_fn_cxx_try_run
2230
2231# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2232# ---------------------------------------------------------
2233# Tests whether HEADER exists and can be compiled using the include files in
2234# INCLUDES, setting the cache variable VAR accordingly.
2235ac_fn_cxx_check_header_compile ()
2236{
2237  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2239$as_echo_n "checking for $2... " >&6; }
2240if eval "test \"\${$3+set}\"" = set; then :
2241  $as_echo_n "(cached) " >&6
2242else
2243  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2244/* end confdefs.h.  */
2245$4
2246#include <$2>
2247_ACEOF
2248if ac_fn_cxx_try_compile "$LINENO"; then :
2249  eval "$3=yes"
2250else
2251  eval "$3=no"
2252fi
2253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2254fi
2255eval ac_res=\$$3
2256	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2257$as_echo "$ac_res" >&6; }
2258  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2259
2260} # ac_fn_cxx_check_header_compile
2261
2262# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2263# ----------------------------------------------
2264# Tries to find the compile-time value of EXPR in a program that includes
2265# INCLUDES, setting VAR accordingly. Returns whether the value could be
2266# computed
2267ac_fn_cxx_compute_int ()
2268{
2269  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2270  if test "$cross_compiling" = yes; then
2271    # Depending upon the size, compute the lo and hi bounds.
2272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2273/* end confdefs.h.  */
2274$4
2275int
2276main ()
2277{
2278static int test_array [1 - 2 * !(($2) >= 0)];
2279test_array [0] = 0
2280
2281  ;
2282  return 0;
2283}
2284_ACEOF
2285if ac_fn_cxx_try_compile "$LINENO"; then :
2286  ac_lo=0 ac_mid=0
2287  while :; do
2288    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2289/* end confdefs.h.  */
2290$4
2291int
2292main ()
2293{
2294static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2295test_array [0] = 0
2296
2297  ;
2298  return 0;
2299}
2300_ACEOF
2301if ac_fn_cxx_try_compile "$LINENO"; then :
2302  ac_hi=$ac_mid; break
2303else
2304  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2305			if test $ac_lo -le $ac_mid; then
2306			  ac_lo= ac_hi=
2307			  break
2308			fi
2309			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2310fi
2311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2312  done
2313else
2314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315/* end confdefs.h.  */
2316$4
2317int
2318main ()
2319{
2320static int test_array [1 - 2 * !(($2) < 0)];
2321test_array [0] = 0
2322
2323  ;
2324  return 0;
2325}
2326_ACEOF
2327if ac_fn_cxx_try_compile "$LINENO"; then :
2328  ac_hi=-1 ac_mid=-1
2329  while :; do
2330    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2331/* end confdefs.h.  */
2332$4
2333int
2334main ()
2335{
2336static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2337test_array [0] = 0
2338
2339  ;
2340  return 0;
2341}
2342_ACEOF
2343if ac_fn_cxx_try_compile "$LINENO"; then :
2344  ac_lo=$ac_mid; break
2345else
2346  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2347			if test $ac_mid -le $ac_hi; then
2348			  ac_lo= ac_hi=
2349			  break
2350			fi
2351			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2352fi
2353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2354  done
2355else
2356  ac_lo= ac_hi=
2357fi
2358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361# Binary search between lo and hi bounds.
2362while test "x$ac_lo" != "x$ac_hi"; do
2363  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2364  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2365/* end confdefs.h.  */
2366$4
2367int
2368main ()
2369{
2370static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2371test_array [0] = 0
2372
2373  ;
2374  return 0;
2375}
2376_ACEOF
2377if ac_fn_cxx_try_compile "$LINENO"; then :
2378  ac_hi=$ac_mid
2379else
2380  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2381fi
2382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2383done
2384case $ac_lo in #((
2385?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2386'') ac_retval=1 ;;
2387esac
2388  else
2389    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2390/* end confdefs.h.  */
2391$4
2392static long int longval () { return $2; }
2393static unsigned long int ulongval () { return $2; }
2394#include <stdio.h>
2395#include <stdlib.h>
2396int
2397main ()
2398{
2399
2400  FILE *f = fopen ("conftest.val", "w");
2401  if (! f)
2402    return 1;
2403  if (($2) < 0)
2404    {
2405      long int i = longval ();
2406      if (i != ($2))
2407	return 1;
2408      fprintf (f, "%ld", i);
2409    }
2410  else
2411    {
2412      unsigned long int i = ulongval ();
2413      if (i != ($2))
2414	return 1;
2415      fprintf (f, "%lu", i);
2416    }
2417  /* Do not output a trailing newline, as this causes \r\n confusion
2418     on some platforms.  */
2419  return ferror (f) || fclose (f) != 0;
2420
2421  ;
2422  return 0;
2423}
2424_ACEOF
2425if ac_fn_cxx_try_run "$LINENO"; then :
2426  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2427else
2428  ac_retval=1
2429fi
2430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2431  conftest.$ac_objext conftest.beam conftest.$ac_ext
2432rm -f conftest.val
2433
2434  fi
2435  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2436  as_fn_set_status $ac_retval
2437
2438} # ac_fn_cxx_compute_int
2439
2440# ac_fn_cxx_try_link LINENO
2441# -------------------------
2442# Try to link conftest.$ac_ext, and return whether this succeeded.
2443ac_fn_cxx_try_link ()
2444{
2445  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2446  rm -f conftest.$ac_objext conftest$ac_exeext
2447  if { { ac_try="$ac_link"
2448case "(($ac_try" in
2449  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2450  *) ac_try_echo=$ac_try;;
2451esac
2452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2453$as_echo "$ac_try_echo"; } >&5
2454  (eval "$ac_link") 2>conftest.err
2455  ac_status=$?
2456  if test -s conftest.err; then
2457    grep -v '^ *+' conftest.err >conftest.er1
2458    cat conftest.er1 >&5
2459    mv -f conftest.er1 conftest.err
2460  fi
2461  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2462  test $ac_status = 0; } && {
2463	 test -z "$ac_cxx_werror_flag" ||
2464	 test ! -s conftest.err
2465       } && test -s conftest$ac_exeext && {
2466	 test "$cross_compiling" = yes ||
2467	 $as_test_x conftest$ac_exeext
2468       }; then :
2469  ac_retval=0
2470else
2471  $as_echo "$as_me: failed program was:" >&5
2472sed 's/^/| /' conftest.$ac_ext >&5
2473
2474	ac_retval=1
2475fi
2476  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2477  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2478  # interfere with the next link command; also delete a directory that is
2479  # left behind by Apple's compiler.  We do this before executing the actions.
2480  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2481  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2482  as_fn_set_status $ac_retval
2483
2484} # ac_fn_cxx_try_link
2485
2486# ac_fn_cxx_check_func LINENO FUNC VAR
2487# ------------------------------------
2488# Tests whether FUNC exists, setting the cache variable VAR accordingly
2489ac_fn_cxx_check_func ()
2490{
2491  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2493$as_echo_n "checking for $2... " >&6; }
2494if eval "test \"\${$3+set}\"" = set; then :
2495  $as_echo_n "(cached) " >&6
2496else
2497  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2498/* end confdefs.h.  */
2499/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2500   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2501#define $2 innocuous_$2
2502
2503/* System header to define __stub macros and hopefully few prototypes,
2504    which can conflict with char $2 (); below.
2505    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2506    <limits.h> exists even on freestanding compilers.  */
2507
2508#ifdef __STDC__
2509# include <limits.h>
2510#else
2511# include <assert.h>
2512#endif
2513
2514#undef $2
2515
2516/* Override any GCC internal prototype to avoid an error.
2517   Use char because int might match the return type of a GCC
2518   builtin and then its argument prototype would still apply.  */
2519#ifdef __cplusplus
2520extern "C"
2521#endif
2522char $2 ();
2523/* The GNU C library defines this for functions which it implements
2524    to always fail with ENOSYS.  Some functions are actually named
2525    something starting with __ and the normal name is an alias.  */
2526#if defined __stub_$2 || defined __stub___$2
2527choke me
2528#endif
2529
2530int
2531main ()
2532{
2533return $2 ();
2534  ;
2535  return 0;
2536}
2537_ACEOF
2538if ac_fn_cxx_try_link "$LINENO"; then :
2539  eval "$3=yes"
2540else
2541  eval "$3=no"
2542fi
2543rm -f core conftest.err conftest.$ac_objext \
2544    conftest$ac_exeext conftest.$ac_ext
2545fi
2546eval ac_res=\$$3
2547	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2548$as_echo "$ac_res" >&6; }
2549  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2550
2551} # ac_fn_cxx_check_func
2552
2553# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2554# -------------------------------------------------------
2555# Tests whether HEADER exists and can be compiled using the include files in
2556# INCLUDES, setting the cache variable VAR accordingly.
2557ac_fn_c_check_header_compile ()
2558{
2559  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2561$as_echo_n "checking for $2... " >&6; }
2562if eval "test \"\${$3+set}\"" = set; then :
2563  $as_echo_n "(cached) " >&6
2564else
2565  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2566/* end confdefs.h.  */
2567$4
2568#include <$2>
2569_ACEOF
2570if ac_fn_c_try_compile "$LINENO"; then :
2571  eval "$3=yes"
2572else
2573  eval "$3=no"
2574fi
2575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2576fi
2577eval ac_res=\$$3
2578	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2579$as_echo "$ac_res" >&6; }
2580  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2581
2582} # ac_fn_c_check_header_compile
2583cat >config.log <<_ACEOF
2584This file contains any messages produced by compilers while
2585running configure, to aid debugging if configure makes a mistake.
2586
2587It was created by OpenJDK $as_me jdk8, which was
2588generated by GNU Autoconf 2.67.  Invocation command line was
2589
2590  $ $0 $@
2591
2592_ACEOF
2593exec 5>>config.log
2594{
2595cat <<_ASUNAME
2596## --------- ##
2597## Platform. ##
2598## --------- ##
2599
2600hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2601uname -m = `(uname -m) 2>/dev/null || echo unknown`
2602uname -r = `(uname -r) 2>/dev/null || echo unknown`
2603uname -s = `(uname -s) 2>/dev/null || echo unknown`
2604uname -v = `(uname -v) 2>/dev/null || echo unknown`
2605
2606/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2607/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2608
2609/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2610/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2611/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2612/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2613/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2614/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2615/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2616
2617_ASUNAME
2618
2619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2620for as_dir in $PATH
2621do
2622  IFS=$as_save_IFS
2623  test -z "$as_dir" && as_dir=.
2624    $as_echo "PATH: $as_dir"
2625  done
2626IFS=$as_save_IFS
2627
2628} >&5
2629
2630cat >&5 <<_ACEOF
2631
2632
2633## ----------- ##
2634## Core tests. ##
2635## ----------- ##
2636
2637_ACEOF
2638
2639
2640# Keep a trace of the command line.
2641# Strip out --no-create and --no-recursion so they do not pile up.
2642# Strip out --silent because we don't want to record it for future runs.
2643# Also quote any args containing shell meta-characters.
2644# Make two passes to allow for proper duplicate-argument suppression.
2645ac_configure_args=
2646ac_configure_args0=
2647ac_configure_args1=
2648ac_must_keep_next=false
2649for ac_pass in 1 2
2650do
2651  for ac_arg
2652  do
2653    case $ac_arg in
2654    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2655    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2656    | -silent | --silent | --silen | --sile | --sil)
2657      continue ;;
2658    *\'*)
2659      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2660    esac
2661    case $ac_pass in
2662    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2663    2)
2664      as_fn_append ac_configure_args1 " '$ac_arg'"
2665      if test $ac_must_keep_next = true; then
2666	ac_must_keep_next=false # Got value, back to normal.
2667      else
2668	case $ac_arg in
2669	  *=* | --config-cache | -C | -disable-* | --disable-* \
2670	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2671	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2672	  | -with-* | --with-* | -without-* | --without-* | --x)
2673	    case "$ac_configure_args0 " in
2674	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2675	    esac
2676	    ;;
2677	  -* ) ac_must_keep_next=true ;;
2678	esac
2679      fi
2680      as_fn_append ac_configure_args " '$ac_arg'"
2681      ;;
2682    esac
2683  done
2684done
2685{ ac_configure_args0=; unset ac_configure_args0;}
2686{ ac_configure_args1=; unset ac_configure_args1;}
2687
2688# When interrupted or exit'd, cleanup temporary files, and complete
2689# config.log.  We remove comments because anyway the quotes in there
2690# would cause problems or look ugly.
2691# WARNING: Use '\'' to represent an apostrophe within the trap.
2692# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2693trap 'exit_status=$?
2694  # Save into config.log some information that might help in debugging.
2695  {
2696    echo
2697
2698    $as_echo "## ---------------- ##
2699## Cache variables. ##
2700## ---------------- ##"
2701    echo
2702    # The following way of writing the cache mishandles newlines in values,
2703(
2704  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2705    eval ac_val=\$$ac_var
2706    case $ac_val in #(
2707    *${as_nl}*)
2708      case $ac_var in #(
2709      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2710$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2711      esac
2712      case $ac_var in #(
2713      _ | IFS | as_nl) ;; #(
2714      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2715      *) { eval $ac_var=; unset $ac_var;} ;;
2716      esac ;;
2717    esac
2718  done
2719  (set) 2>&1 |
2720    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2721    *${as_nl}ac_space=\ *)
2722      sed -n \
2723	"s/'\''/'\''\\\\'\'''\''/g;
2724	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2725      ;; #(
2726    *)
2727      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2728      ;;
2729    esac |
2730    sort
2731)
2732    echo
2733
2734    $as_echo "## ----------------- ##
2735## Output variables. ##
2736## ----------------- ##"
2737    echo
2738    for ac_var in $ac_subst_vars
2739    do
2740      eval ac_val=\$$ac_var
2741      case $ac_val in
2742      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2743      esac
2744      $as_echo "$ac_var='\''$ac_val'\''"
2745    done | sort
2746    echo
2747
2748    if test -n "$ac_subst_files"; then
2749      $as_echo "## ------------------- ##
2750## File substitutions. ##
2751## ------------------- ##"
2752      echo
2753      for ac_var in $ac_subst_files
2754      do
2755	eval ac_val=\$$ac_var
2756	case $ac_val in
2757	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2758	esac
2759	$as_echo "$ac_var='\''$ac_val'\''"
2760      done | sort
2761      echo
2762    fi
2763
2764    if test -s confdefs.h; then
2765      $as_echo "## ----------- ##
2766## confdefs.h. ##
2767## ----------- ##"
2768      echo
2769      cat confdefs.h
2770      echo
2771    fi
2772    test "$ac_signal" != 0 &&
2773      $as_echo "$as_me: caught signal $ac_signal"
2774    $as_echo "$as_me: exit $exit_status"
2775  } >&5
2776  rm -f core *.core core.conftest.* &&
2777    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2778    exit $exit_status
2779' 0
2780for ac_signal in 1 2 13 15; do
2781  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2782done
2783ac_signal=0
2784
2785# confdefs.h avoids OS command line length limits that DEFS can exceed.
2786rm -f -r conftest* confdefs.h
2787
2788$as_echo "/* confdefs.h */" > confdefs.h
2789
2790# Predefined preprocessor variables.
2791
2792cat >>confdefs.h <<_ACEOF
2793#define PACKAGE_NAME "$PACKAGE_NAME"
2794_ACEOF
2795
2796cat >>confdefs.h <<_ACEOF
2797#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2798_ACEOF
2799
2800cat >>confdefs.h <<_ACEOF
2801#define PACKAGE_VERSION "$PACKAGE_VERSION"
2802_ACEOF
2803
2804cat >>confdefs.h <<_ACEOF
2805#define PACKAGE_STRING "$PACKAGE_STRING"
2806_ACEOF
2807
2808cat >>confdefs.h <<_ACEOF
2809#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2810_ACEOF
2811
2812cat >>confdefs.h <<_ACEOF
2813#define PACKAGE_URL "$PACKAGE_URL"
2814_ACEOF
2815
2816
2817# Let the site file select an alternate cache file if it wants to.
2818# Prefer an explicitly selected file to automatically selected ones.
2819ac_site_file1=NONE
2820ac_site_file2=NONE
2821if test -n "$CONFIG_SITE"; then
2822  # We do not want a PATH search for config.site.
2823  case $CONFIG_SITE in #((
2824    -*)  ac_site_file1=./$CONFIG_SITE;;
2825    */*) ac_site_file1=$CONFIG_SITE;;
2826    *)   ac_site_file1=./$CONFIG_SITE;;
2827  esac
2828elif test "x$prefix" != xNONE; then
2829  ac_site_file1=$prefix/share/config.site
2830  ac_site_file2=$prefix/etc/config.site
2831else
2832  ac_site_file1=$ac_default_prefix/share/config.site
2833  ac_site_file2=$ac_default_prefix/etc/config.site
2834fi
2835for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2836do
2837  test "x$ac_site_file" = xNONE && continue
2838  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2839    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2840$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2841    sed 's/^/| /' "$ac_site_file" >&5
2842    . "$ac_site_file" \
2843      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2844$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2845as_fn_error $? "failed to load site script $ac_site_file
2846See \`config.log' for more details" "$LINENO" 5 ; }
2847  fi
2848done
2849
2850if test -r "$cache_file"; then
2851  # Some versions of bash will fail to source /dev/null (special files
2852  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2853  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2854    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2855$as_echo "$as_me: loading cache $cache_file" >&6;}
2856    case $cache_file in
2857      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2858      *)                      . "./$cache_file";;
2859    esac
2860  fi
2861else
2862  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2863$as_echo "$as_me: creating cache $cache_file" >&6;}
2864  >$cache_file
2865fi
2866
2867# Check that the precious variables saved in the cache have kept the same
2868# value.
2869ac_cache_corrupted=false
2870for ac_var in $ac_precious_vars; do
2871  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2872  eval ac_new_set=\$ac_env_${ac_var}_set
2873  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2874  eval ac_new_val=\$ac_env_${ac_var}_value
2875  case $ac_old_set,$ac_new_set in
2876    set,)
2877      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2878$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2879      ac_cache_corrupted=: ;;
2880    ,set)
2881      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2882$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2883      ac_cache_corrupted=: ;;
2884    ,);;
2885    *)
2886      if test "x$ac_old_val" != "x$ac_new_val"; then
2887	# differences in whitespace do not lead to failure.
2888	ac_old_val_w=`echo x $ac_old_val`
2889	ac_new_val_w=`echo x $ac_new_val`
2890	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2891	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2892$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2893	  ac_cache_corrupted=:
2894	else
2895	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2896$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2897	  eval $ac_var=\$ac_old_val
2898	fi
2899	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2900$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2901	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2902$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2903      fi;;
2904  esac
2905  # Pass precious variables to config.status.
2906  if test "$ac_new_set" = set; then
2907    case $ac_new_val in
2908    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2909    *) ac_arg=$ac_var=$ac_new_val ;;
2910    esac
2911    case " $ac_configure_args " in
2912      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2913      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2914    esac
2915  fi
2916done
2917if $ac_cache_corrupted; then
2918  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2919$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2920  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2921$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2922  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2923fi
2924## -------------------- ##
2925## Main body of script. ##
2926## -------------------- ##
2927
2928ac_ext=c
2929ac_cpp='$CPP $CPPFLAGS'
2930ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2931ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2932ac_compiler_gnu=$ac_cv_c_compiler_gnu
2933
2934
2935
2936ac_aux_dir=
2937for ac_dir in build-aux "$srcdir"/build-aux; do
2938  if 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/install.sh"; then
2943    ac_aux_dir=$ac_dir
2944    ac_install_sh="$ac_aux_dir/install.sh -c"
2945    break
2946  elif test -f "$ac_dir/shtool"; then
2947    ac_aux_dir=$ac_dir
2948    ac_install_sh="$ac_aux_dir/shtool install -c"
2949    break
2950  fi
2951done
2952if test -z "$ac_aux_dir"; then
2953  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2954fi
2955
2956# These three variables are undocumented and unsupported,
2957# and are intended to be withdrawn in a future Autoconf release.
2958# They can cause serious problems if a builder's source tree is in a directory
2959# whose full name contains unusual characters.
2960ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2961ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2962ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2963
2964
2965# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2966
2967#
2968# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2969# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2970#
2971# This code is free software; you can redistribute it and/or modify it
2972# under the terms of the GNU General Public License version 2 only, as
2973# published by the Free Software Foundation.  Oracle designates this
2974# particular file as subject to the "Classpath" exception as provided
2975# by Oracle in the LICENSE file that accompanied this code.
2976#
2977# This code is distributed in the hope that it will be useful, but WITHOUT
2978# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2979# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2980# version 2 for more details (a copy is included in the LICENSE file that
2981# accompanied this code).
2982#
2983# You should have received a copy of the GNU General Public License version
2984# 2 along with this work; if not, write to the Free Software Foundation,
2985# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2986#
2987# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2988# or visit www.oracle.com if you need additional information or have any
2989# questions.
2990#
2991
2992#
2993# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2994#
2995# This program is free software; you can redistribute it and/or modify
2996# it under the terms of the GNU General Public License as published by
2997# the Free Software Foundation; either version 2 of the License, or
2998# (at your option) any later version.
2999#
3000# This program is distributed in the hope that it will be useful, but
3001# WITHOUT ANY WARRANTY; without even the implied warranty of
3002# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3003# General Public License for more details.
3004#
3005# You should have received a copy of the GNU General Public License
3006# along with this program; if not, write to the Free Software
3007# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3008#
3009# As a special exception to the GNU General Public License, if you
3010# distribute this file as part of a program that contains a
3011# configuration script generated by Autoconf, you may include it under
3012# the same distribution terms that you use for the rest of that program.
3013
3014# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3015# ----------------------------------
3016# PKG_PROG_PKG_CONFIG
3017
3018# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3019#
3020# Check to see whether a particular set of modules exists.  Similar
3021# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3022#
3023#
3024# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3025# this or PKG_CHECK_MODULES is called, or make sure to call
3026# PKG_CHECK_EXISTS manually
3027# --------------------------------------------------------------
3028
3029
3030
3031# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3032# ---------------------------------------------
3033# _PKG_CONFIG
3034
3035# _PKG_SHORT_ERRORS_SUPPORTED
3036# -----------------------------
3037# _PKG_SHORT_ERRORS_SUPPORTED
3038
3039
3040# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3041# [ACTION-IF-NOT-FOUND])
3042#
3043#
3044# Note that if there is a possibility the first call to
3045# PKG_CHECK_MODULES might not happen, you should be sure to include an
3046# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3047#
3048#
3049# --------------------------------------------------------------
3050# PKG_CHECK_MODULES
3051
3052
3053# Include these first...
3054#
3055# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3056# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3057#
3058# This code is free software; you can redistribute it and/or modify it
3059# under the terms of the GNU General Public License version 2 only, as
3060# published by the Free Software Foundation.  Oracle designates this
3061# particular file as subject to the "Classpath" exception as provided
3062# by Oracle in the LICENSE file that accompanied this code.
3063#
3064# This code is distributed in the hope that it will be useful, but WITHOUT
3065# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3066# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3067# version 2 for more details (a copy is included in the LICENSE file that
3068# accompanied this code).
3069#
3070# You should have received a copy of the GNU General Public License version
3071# 2 along with this work; if not, write to the Free Software Foundation,
3072# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3073#
3074# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3075# or visit www.oracle.com if you need additional information or have any
3076# questions.
3077#
3078
3079# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3080# If so, then append $1 to $2\
3081# Also set JVM_ARG_OK to true/false depending on outcome.
3082
3083
3084# This will make sure the given variable points to a full and proper
3085# path. This means:
3086# 1) There will be no spaces in the path. On posix platforms,
3087#    spaces in the path will result in an error. On Windows,
3088#    the path will be rewritten using short-style to be space-free.
3089# 2) The path will be absolute, and it will be in unix-style (on
3090#     cygwin).
3091# $1: The name of the variable to fix
3092
3093
3094# This will make sure the given variable points to a executable
3095# with a full and proper path. This means:
3096# 1) There will be no spaces in the path. On posix platforms,
3097#    spaces in the path will result in an error. On Windows,
3098#    the path will be rewritten using short-style to be space-free.
3099# 2) The path will be absolute, and it will be in unix-style (on
3100#     cygwin).
3101# Any arguments given to the executable is preserved.
3102# If the input variable does not have a directory specification, then
3103# it need to be in the PATH.
3104# $1: The name of the variable to fix
3105
3106
3107
3108
3109
3110
3111# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3112# $1: variable to check
3113# $2: executable name to print in warning (optional)
3114
3115
3116# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3117# Arguments as AC_PATH_PROG:
3118# $1: variable to set
3119# $2: executable name to look for
3120
3121
3122# Setup the most fundamental tools that relies on not much else to set up,
3123# but is used by much of the early bootstrap code.
3124
3125
3126# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3127
3128
3129
3130
3131
3132
3133
3134#%%% Simple tools %%%
3135
3136# Check if we have found a usable version of make
3137# $1: the path to a potential make binary (or empty)
3138# $2: the description on how we found this
3139
3140
3141# Goes looking for a usable version of GNU make.
3142
3143
3144
3145
3146
3147
3148# Check if build directory is on local disk. If not possible to determine,
3149# we prefer to claim it's local.
3150# Argument 1: directory to test
3151# Argument 2: what to do if it is on local disk
3152# Argument 3: what to do otherwise (remote disk or failure)
3153
3154
3155# Check that source files have basic read permissions set. This might
3156# not be the case in cygwin in certain conditions.
3157
3158
3159
3160
3161#
3162# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3163# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3164#
3165# This code is free software; you can redistribute it and/or modify it
3166# under the terms of the GNU General Public License version 2 only, as
3167# published by the Free Software Foundation.  Oracle designates this
3168# particular file as subject to the "Classpath" exception as provided
3169# by Oracle in the LICENSE file that accompanied this code.
3170#
3171# This code is distributed in the hope that it will be useful, but WITHOUT
3172# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3173# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3174# version 2 for more details (a copy is included in the LICENSE file that
3175# accompanied this code).
3176#
3177# You should have received a copy of the GNU General Public License version
3178# 2 along with this work; if not, write to the Free Software Foundation,
3179# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3180#
3181# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3182# or visit www.oracle.com if you need additional information or have any
3183# questions.
3184#
3185
3186
3187
3188
3189
3190# Helper function which possibly converts a path using DOS-style short mode.
3191# If so, the updated path is stored in $new_path.
3192# $1: The path to check
3193
3194
3195# Helper function which possibly converts a path using DOS-style short mode.
3196# If so, the updated path is stored in $new_path.
3197# $1: The path to check
3198
3199
3200# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3201# and could probably be heavily simplified. However, all changes in this
3202# area tend to need lot of testing in different scenarios, and in lack of
3203# proper unit testing, cleaning this up has not been deemed worth the effort
3204# at the moment.
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3215
3216
3217
3218
3219#
3220# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3221# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3222#
3223# This code is free software; you can redistribute it and/or modify it
3224# under the terms of the GNU General Public License version 2 only, as
3225# published by the Free Software Foundation.  Oracle designates this
3226# particular file as subject to the "Classpath" exception as provided
3227# by Oracle in the LICENSE file that accompanied this code.
3228#
3229# This code is distributed in the hope that it will be useful, but WITHOUT
3230# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3231# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3232# version 2 for more details (a copy is included in the LICENSE file that
3233# accompanied this code).
3234#
3235# You should have received a copy of the GNU General Public License version
3236# 2 along with this work; if not, write to the Free Software Foundation,
3237# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3238#
3239# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3240# or visit www.oracle.com if you need additional information or have any
3241# questions.
3242#
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254# ... then the rest
3255#
3256# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3257# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3258#
3259# This code is free software; you can redistribute it and/or modify it
3260# under the terms of the GNU General Public License version 2 only, as
3261# published by the Free Software Foundation.  Oracle designates this
3262# particular file as subject to the "Classpath" exception as provided
3263# by Oracle in the LICENSE file that accompanied this code.
3264#
3265# This code is distributed in the hope that it will be useful, but WITHOUT
3266# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3267# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3268# version 2 for more details (a copy is included in the LICENSE file that
3269# accompanied this code).
3270#
3271# You should have received a copy of the GNU General Public License version
3272# 2 along with this work; if not, write to the Free Software Foundation,
3273# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3274#
3275# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3276# or visit www.oracle.com if you need additional information or have any
3277# questions.
3278#
3279
3280# Execute the check given as argument, and verify the result
3281# If the Boot JDK was previously found, do nothing
3282# $1 A command line (typically autoconf macro) to execute
3283
3284
3285# Test: Is bootjdk explicitely set by command line arguments?
3286
3287
3288# Test: Is bootjdk available from builddeps?
3289
3290
3291# Test: Is $JAVA_HOME set?
3292
3293
3294# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3295
3296
3297# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3298
3299
3300# Look for a jdk in the given path. If there are multiple, try to select the newest.
3301# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3302# $1 = Path to directory containing jdk installations.
3303# $2 = String to append to the found JDK directory to get the proper JDK home
3304
3305
3306# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3307# environmental variable as base for where to look.
3308# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3309
3310
3311# Test: Is there a JDK installed in default, well-known locations?
3312
3313
3314# Check that a command-line tool in the Boot JDK is correct
3315# $1 = name of variable to assign
3316# $2 = name of binary
3317
3318
3319###############################################################################
3320#
3321# We need a Boot JDK to bootstrap the build.
3322#
3323
3324
3325
3326
3327
3328#
3329# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3330# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3331#
3332# This code is free software; you can redistribute it and/or modify it
3333# under the terms of the GNU General Public License version 2 only, as
3334# published by the Free Software Foundation.  Oracle designates this
3335# particular file as subject to the "Classpath" exception as provided
3336# by Oracle in the LICENSE file that accompanied this code.
3337#
3338# This code is distributed in the hope that it will be useful, but WITHOUT
3339# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3340# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3341# version 2 for more details (a copy is included in the LICENSE file that
3342# accompanied this code).
3343#
3344# You should have received a copy of the GNU General Public License version
3345# 2 along with this work; if not, write to the Free Software Foundation,
3346# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3347#
3348# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3349# or visit www.oracle.com if you need additional information or have any
3350# questions.
3351#
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372#
3373# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3374# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3375#
3376# This code is free software; you can redistribute it and/or modify it
3377# under the terms of the GNU General Public License version 2 only, as
3378# published by the Free Software Foundation.  Oracle designates this
3379# particular file as subject to the "Classpath" exception as provided
3380# by Oracle in the LICENSE file that accompanied this code.
3381#
3382# This code is distributed in the hope that it will be useful, but WITHOUT
3383# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3384# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3385# version 2 for more details (a copy is included in the LICENSE file that
3386# accompanied this code).
3387#
3388# You should have received a copy of the GNU General Public License version
3389# 2 along with this work; if not, write to the Free Software Foundation,
3390# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3391#
3392# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3393# or visit www.oracle.com if you need additional information or have any
3394# questions.
3395#
3396
3397
3398
3399
3400
3401cygwin_help() {
3402    case $1 in
3403    unzip)
3404        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3405    zip)
3406        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3407    make)
3408        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3409    * )
3410       break ;;
3411    esac
3412}
3413
3414apt_help() {
3415    case $1 in
3416    devkit)
3417        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3418    openjdk)
3419        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3420    alsa)
3421        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3422    cups)
3423        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3424    freetype2)
3425        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3426    pulse)
3427        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3428    x11)
3429        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3430    ccache)
3431        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3432    * )
3433       break ;;
3434    esac
3435}
3436
3437yum_help() {
3438    case $1 in
3439    devkit)
3440        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3441    openjdk)
3442        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3443    alsa)
3444        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3445    cups)
3446        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3447    freetype2)
3448        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3449    pulse)
3450        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3451    x11)
3452        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3453    ccache)
3454        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3455    * )
3456       break ;;
3457    esac
3458}
3459
3460port_help() {
3461    PKGHANDLER_COMMAND=""
3462}
3463
3464pkgutil_help() {
3465    PKGHANDLER_COMMAND=""
3466}
3467
3468pkgadd_help() {
3469    PKGHANDLER_COMMAND=""
3470}
3471
3472
3473
3474#
3475# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3476# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3477#
3478# This code is free software; you can redistribute it and/or modify it
3479# under the terms of the GNU General Public License version 2 only, as
3480# published by the Free Software Foundation.  Oracle designates this
3481# particular file as subject to the "Classpath" exception as provided
3482# by Oracle in the LICENSE file that accompanied this code.
3483#
3484# This code is distributed in the hope that it will be useful, but WITHOUT
3485# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3486# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3487# version 2 for more details (a copy is included in the LICENSE file that
3488# accompanied this code).
3489#
3490# You should have received a copy of the GNU General Public License version
3491# 2 along with this work; if not, write to the Free Software Foundation,
3492# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3493#
3494# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3495# or visit www.oracle.com if you need additional information or have any
3496# questions.
3497#
3498
3499
3500
3501
3502
3503
3504
3505
3506###############################################################################
3507#
3508# Should we build only OpenJDK even if closed sources are present?
3509#
3510
3511
3512
3513
3514###############################################################################
3515#
3516# Setup version numbers
3517#
3518
3519
3520
3521
3522
3523
3524# Support for customization of the build process. Some build files
3525# will include counterparts from this location, if they exist. This allows
3526# for a degree of customization of the build targets and the rules/recipes
3527# to create them
3528
3529# Check whether --with-custom-make-dir was given.
3530if test "${with_custom_make_dir+set}" = set; then :
3531  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3532fi
3533
3534
3535
3536#
3537# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3538# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3539#
3540# This code is free software; you can redistribute it and/or modify it
3541# under the terms of the GNU General Public License version 2 only, as
3542# published by the Free Software Foundation.  Oracle designates this
3543# particular file as subject to the "Classpath" exception as provided
3544# by Oracle in the LICENSE file that accompanied this code.
3545#
3546# This code is distributed in the hope that it will be useful, but WITHOUT
3547# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3548# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3549# version 2 for more details (a copy is included in the LICENSE file that
3550# accompanied this code).
3551#
3552# You should have received a copy of the GNU General Public License version
3553# 2 along with this work; if not, write to the Free Software Foundation,
3554# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3555#
3556# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3557# or visit www.oracle.com if you need additional information or have any
3558# questions.
3559#
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575#
3576# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3577# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3578#
3579# This code is free software; you can redistribute it and/or modify it
3580# under the terms of the GNU General Public License version 2 only, as
3581# published by the Free Software Foundation.  Oracle designates this
3582# particular file as subject to the "Classpath" exception as provided
3583# by Oracle in the LICENSE file that accompanied this code.
3584#
3585# This code is distributed in the hope that it will be useful, but WITHOUT
3586# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3587# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3588# version 2 for more details (a copy is included in the LICENSE file that
3589# accompanied this code).
3590#
3591# You should have received a copy of the GNU General Public License version
3592# 2 along with this work; if not, write to the Free Software Foundation,
3593# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3594#
3595# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3596# or visit www.oracle.com if you need additional information or have any
3597# questions.
3598#
3599
3600# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3601# Converts autoconf style CPU name to OpenJDK style, into
3602# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3603
3604
3605# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3606# Converts autoconf style OS name to OpenJDK style, into
3607# VAR_OS and VAR_OS_API.
3608
3609
3610# Expects $host_os $host_cpu $build_os and $build_cpu
3611# and $with_target_bits to have been setup!
3612#
3613# Translate the standard triplet(quadruplet) definition
3614# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3615# OPENJDK_BUILD_OS, etc.
3616
3617
3618# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3619# accordingly. Must be done after setting up build and target system, but before
3620# doing anything else with these values.
3621
3622
3623    # Setup the legacy variables, for controlling the old makefiles.
3624    #
3625
3626
3627
3628
3629#%%% Build and target systems %%%
3630
3631
3632
3633
3634# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3635# Add -mX to various FLAGS variables.
3636
3637
3638
3639
3640
3641
3642#
3643# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3644# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3645#
3646# This code is free software; you can redistribute it and/or modify it
3647# under the terms of the GNU General Public License version 2 only, as
3648# published by the Free Software Foundation.  Oracle designates this
3649# particular file as subject to the "Classpath" exception as provided
3650# by Oracle in the LICENSE file that accompanied this code.
3651#
3652# This code is distributed in the hope that it will be useful, but WITHOUT
3653# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3654# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3655# version 2 for more details (a copy is included in the LICENSE file that
3656# accompanied this code).
3657#
3658# You should have received a copy of the GNU General Public License version
3659# 2 along with this work; if not, write to the Free Software Foundation,
3660# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3661#
3662# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3663# or visit www.oracle.com if you need additional information or have any
3664# questions.
3665#
3666
3667
3668
3669
3670
3671
3672
3673
3674#
3675# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3676# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3677#
3678# This code is free software; you can redistribute it and/or modify it
3679# under the terms of the GNU General Public License version 2 only, as
3680# published by the Free Software Foundation.  Oracle designates this
3681# particular file as subject to the "Classpath" exception as provided
3682# by Oracle in the LICENSE file that accompanied this code.
3683#
3684# This code is distributed in the hope that it will be useful, but WITHOUT
3685# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3686# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3687# version 2 for more details (a copy is included in the LICENSE file that
3688# accompanied this code).
3689#
3690# You should have received a copy of the GNU General Public License version
3691# 2 along with this work; if not, write to the Free Software Foundation,
3692# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3693#
3694# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3695# or visit www.oracle.com if you need additional information or have any
3696# questions.
3697#
3698
3699# $1 = compiler to test (CC or CXX)
3700# $2 = human readable name of compiler (C or C++)
3701
3702
3703
3704
3705
3706# $1 = compiler to test (CC or CXX)
3707# $2 = human readable name of compiler (C or C++)
3708# $3 = list of compiler names to search for
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3723#                                   [RUN-IF-FALSE])
3724# ------------------------------------------------------------
3725# Check that the c and c++ compilers support an argument
3726
3727
3728
3729
3730# Setup the JTREG paths
3731
3732
3733#
3734# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3735# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3736#
3737# This code is free software; you can redistribute it and/or modify it
3738# under the terms of the GNU General Public License version 2 only, as
3739# published by the Free Software Foundation.  Oracle designates this
3740# particular file as subject to the "Classpath" exception as provided
3741# by Oracle in the LICENSE file that accompanied this code.
3742#
3743# This code is distributed in the hope that it will be useful, but WITHOUT
3744# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3745# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3746# version 2 for more details (a copy is included in the LICENSE file that
3747# accompanied this code).
3748#
3749# You should have received a copy of the GNU General Public License version
3750# 2 along with this work; if not, write to the Free Software Foundation,
3751# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3752#
3753# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3754# or visit www.oracle.com if you need additional information or have any
3755# questions.
3756#
3757
3758
3759
3760
3761
3762
3763
3764# Check if the VS env variables were setup prior to running configure.
3765# If not, then find vcvarsall.bat and run it automatically, and integrate
3766# the set env variables into the spec file.
3767
3768
3769
3770# Setup the DXSDK paths
3771
3772
3773
3774
3775
3776
3777# This line needs to be here, verbatim, after all includes and the dummy hook
3778# definitions. It is replaced with custom functionality when building
3779# custom sources.
3780#CUSTOM_AUTOCONF_INCLUDE
3781
3782# Do not change or remove the following line, it is needed for consistency checks:
3783DATE_WHEN_GENERATED=1370001995
3784
3785###############################################################################
3786#
3787# Initialization / Boot-strapping
3788#
3789# The bootstrapping process needs to solve the "chicken or the egg" problem,
3790# thus it jumps back and forth, each time gaining something needed later on.
3791#
3792###############################################################################
3793
3794# Basic initialization that must happen first of all
3795
3796# Save the original command line. This is passed to us by the wrapper configure script.
3797
3798DATE_WHEN_CONFIGURED=`LANG=C date`
3799
3800{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3801$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3802{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3803$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3804
3805
3806
3807# Start with tools that do not need have cross compilation support
3808# and can be expected to be found in the default PATH. These tools are
3809# used by configure. Nor are these tools expected to be found in the
3810# devkit from the builddeps server either, since they are
3811# needed to download the devkit.
3812
3813# First are all the simple required tools.
3814
3815    for ac_prog in basename
3816do
3817  # Extract the first word of "$ac_prog", so it can be a program name with args.
3818set dummy $ac_prog; ac_word=$2
3819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3820$as_echo_n "checking for $ac_word... " >&6; }
3821if test "${ac_cv_path_BASENAME+set}" = set; then :
3822  $as_echo_n "(cached) " >&6
3823else
3824  case $BASENAME in
3825  [\\/]* | ?:[\\/]*)
3826  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3827  ;;
3828  *)
3829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3830for as_dir in $PATH
3831do
3832  IFS=$as_save_IFS
3833  test -z "$as_dir" && as_dir=.
3834    for ac_exec_ext in '' $ac_executable_extensions; do
3835  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3836    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3838    break 2
3839  fi
3840done
3841  done
3842IFS=$as_save_IFS
3843
3844  ;;
3845esac
3846fi
3847BASENAME=$ac_cv_path_BASENAME
3848if test -n "$BASENAME"; then
3849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3850$as_echo "$BASENAME" >&6; }
3851else
3852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3853$as_echo "no" >&6; }
3854fi
3855
3856
3857  test -n "$BASENAME" && break
3858done
3859
3860
3861    if test "x$BASENAME" = x; then
3862        if test "xbasename" = x; then
3863          PROG_NAME=basename
3864        else
3865          PROG_NAME=basename
3866        fi
3867        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3868$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3869        as_fn_error $? "Cannot continue" "$LINENO" 5
3870    fi
3871
3872
3873
3874    for ac_prog in bash
3875do
3876  # Extract the first word of "$ac_prog", so it can be a program name with args.
3877set dummy $ac_prog; ac_word=$2
3878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3879$as_echo_n "checking for $ac_word... " >&6; }
3880if test "${ac_cv_path_BASH+set}" = set; then :
3881  $as_echo_n "(cached) " >&6
3882else
3883  case $BASH in
3884  [\\/]* | ?:[\\/]*)
3885  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3886  ;;
3887  *)
3888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3889for as_dir in $PATH
3890do
3891  IFS=$as_save_IFS
3892  test -z "$as_dir" && as_dir=.
3893    for ac_exec_ext in '' $ac_executable_extensions; do
3894  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3895    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3897    break 2
3898  fi
3899done
3900  done
3901IFS=$as_save_IFS
3902
3903  ;;
3904esac
3905fi
3906BASH=$ac_cv_path_BASH
3907if test -n "$BASH"; then
3908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3909$as_echo "$BASH" >&6; }
3910else
3911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3912$as_echo "no" >&6; }
3913fi
3914
3915
3916  test -n "$BASH" && break
3917done
3918
3919
3920    if test "x$BASH" = x; then
3921        if test "xbash" = x; then
3922          PROG_NAME=bash
3923        else
3924          PROG_NAME=bash
3925        fi
3926        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3927$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3928        as_fn_error $? "Cannot continue" "$LINENO" 5
3929    fi
3930
3931
3932
3933    for ac_prog in cat
3934do
3935  # Extract the first word of "$ac_prog", so it can be a program name with args.
3936set dummy $ac_prog; ac_word=$2
3937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3938$as_echo_n "checking for $ac_word... " >&6; }
3939if test "${ac_cv_path_CAT+set}" = set; then :
3940  $as_echo_n "(cached) " >&6
3941else
3942  case $CAT in
3943  [\\/]* | ?:[\\/]*)
3944  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3945  ;;
3946  *)
3947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3948for as_dir in $PATH
3949do
3950  IFS=$as_save_IFS
3951  test -z "$as_dir" && as_dir=.
3952    for ac_exec_ext in '' $ac_executable_extensions; do
3953  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3954    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3956    break 2
3957  fi
3958done
3959  done
3960IFS=$as_save_IFS
3961
3962  ;;
3963esac
3964fi
3965CAT=$ac_cv_path_CAT
3966if test -n "$CAT"; then
3967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3968$as_echo "$CAT" >&6; }
3969else
3970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3971$as_echo "no" >&6; }
3972fi
3973
3974
3975  test -n "$CAT" && break
3976done
3977
3978
3979    if test "x$CAT" = x; then
3980        if test "xcat" = x; then
3981          PROG_NAME=cat
3982        else
3983          PROG_NAME=cat
3984        fi
3985        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3986$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3987        as_fn_error $? "Cannot continue" "$LINENO" 5
3988    fi
3989
3990
3991
3992    for ac_prog in chmod
3993do
3994  # Extract the first word of "$ac_prog", so it can be a program name with args.
3995set dummy $ac_prog; ac_word=$2
3996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3997$as_echo_n "checking for $ac_word... " >&6; }
3998if test "${ac_cv_path_CHMOD+set}" = set; then :
3999  $as_echo_n "(cached) " >&6
4000else
4001  case $CHMOD in
4002  [\\/]* | ?:[\\/]*)
4003  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4004  ;;
4005  *)
4006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4007for as_dir in $PATH
4008do
4009  IFS=$as_save_IFS
4010  test -z "$as_dir" && as_dir=.
4011    for ac_exec_ext in '' $ac_executable_extensions; do
4012  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4013    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4015    break 2
4016  fi
4017done
4018  done
4019IFS=$as_save_IFS
4020
4021  ;;
4022esac
4023fi
4024CHMOD=$ac_cv_path_CHMOD
4025if test -n "$CHMOD"; then
4026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4027$as_echo "$CHMOD" >&6; }
4028else
4029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4030$as_echo "no" >&6; }
4031fi
4032
4033
4034  test -n "$CHMOD" && break
4035done
4036
4037
4038    if test "x$CHMOD" = x; then
4039        if test "xchmod" = x; then
4040          PROG_NAME=chmod
4041        else
4042          PROG_NAME=chmod
4043        fi
4044        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4045$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4046        as_fn_error $? "Cannot continue" "$LINENO" 5
4047    fi
4048
4049
4050
4051    for ac_prog in cmp
4052do
4053  # Extract the first word of "$ac_prog", so it can be a program name with args.
4054set dummy $ac_prog; ac_word=$2
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4056$as_echo_n "checking for $ac_word... " >&6; }
4057if test "${ac_cv_path_CMP+set}" = set; then :
4058  $as_echo_n "(cached) " >&6
4059else
4060  case $CMP in
4061  [\\/]* | ?:[\\/]*)
4062  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4063  ;;
4064  *)
4065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4066for as_dir in $PATH
4067do
4068  IFS=$as_save_IFS
4069  test -z "$as_dir" && as_dir=.
4070    for ac_exec_ext in '' $ac_executable_extensions; do
4071  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4072    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4074    break 2
4075  fi
4076done
4077  done
4078IFS=$as_save_IFS
4079
4080  ;;
4081esac
4082fi
4083CMP=$ac_cv_path_CMP
4084if test -n "$CMP"; then
4085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4086$as_echo "$CMP" >&6; }
4087else
4088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4089$as_echo "no" >&6; }
4090fi
4091
4092
4093  test -n "$CMP" && break
4094done
4095
4096
4097    if test "x$CMP" = x; then
4098        if test "xcmp" = x; then
4099          PROG_NAME=cmp
4100        else
4101          PROG_NAME=cmp
4102        fi
4103        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4104$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4105        as_fn_error $? "Cannot continue" "$LINENO" 5
4106    fi
4107
4108
4109
4110    for ac_prog in comm
4111do
4112  # Extract the first word of "$ac_prog", so it can be a program name with args.
4113set dummy $ac_prog; ac_word=$2
4114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4115$as_echo_n "checking for $ac_word... " >&6; }
4116if test "${ac_cv_path_COMM+set}" = set; then :
4117  $as_echo_n "(cached) " >&6
4118else
4119  case $COMM in
4120  [\\/]* | ?:[\\/]*)
4121  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4122  ;;
4123  *)
4124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4125for as_dir in $PATH
4126do
4127  IFS=$as_save_IFS
4128  test -z "$as_dir" && as_dir=.
4129    for ac_exec_ext in '' $ac_executable_extensions; do
4130  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4131    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4133    break 2
4134  fi
4135done
4136  done
4137IFS=$as_save_IFS
4138
4139  ;;
4140esac
4141fi
4142COMM=$ac_cv_path_COMM
4143if test -n "$COMM"; then
4144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4145$as_echo "$COMM" >&6; }
4146else
4147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4148$as_echo "no" >&6; }
4149fi
4150
4151
4152  test -n "$COMM" && break
4153done
4154
4155
4156    if test "x$COMM" = x; then
4157        if test "xcomm" = x; then
4158          PROG_NAME=comm
4159        else
4160          PROG_NAME=comm
4161        fi
4162        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4163$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4164        as_fn_error $? "Cannot continue" "$LINENO" 5
4165    fi
4166
4167
4168
4169    for ac_prog in cp
4170do
4171  # Extract the first word of "$ac_prog", so it can be a program name with args.
4172set dummy $ac_prog; ac_word=$2
4173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4174$as_echo_n "checking for $ac_word... " >&6; }
4175if test "${ac_cv_path_CP+set}" = set; then :
4176  $as_echo_n "(cached) " >&6
4177else
4178  case $CP in
4179  [\\/]* | ?:[\\/]*)
4180  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4181  ;;
4182  *)
4183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4184for as_dir in $PATH
4185do
4186  IFS=$as_save_IFS
4187  test -z "$as_dir" && as_dir=.
4188    for ac_exec_ext in '' $ac_executable_extensions; do
4189  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4190    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4192    break 2
4193  fi
4194done
4195  done
4196IFS=$as_save_IFS
4197
4198  ;;
4199esac
4200fi
4201CP=$ac_cv_path_CP
4202if test -n "$CP"; then
4203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4204$as_echo "$CP" >&6; }
4205else
4206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4207$as_echo "no" >&6; }
4208fi
4209
4210
4211  test -n "$CP" && break
4212done
4213
4214
4215    if test "x$CP" = x; then
4216        if test "xcp" = x; then
4217          PROG_NAME=cp
4218        else
4219          PROG_NAME=cp
4220        fi
4221        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4222$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4223        as_fn_error $? "Cannot continue" "$LINENO" 5
4224    fi
4225
4226
4227
4228    for ac_prog in cpio
4229do
4230  # Extract the first word of "$ac_prog", so it can be a program name with args.
4231set dummy $ac_prog; ac_word=$2
4232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4233$as_echo_n "checking for $ac_word... " >&6; }
4234if test "${ac_cv_path_CPIO+set}" = set; then :
4235  $as_echo_n "(cached) " >&6
4236else
4237  case $CPIO in
4238  [\\/]* | ?:[\\/]*)
4239  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4240  ;;
4241  *)
4242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4243for as_dir in $PATH
4244do
4245  IFS=$as_save_IFS
4246  test -z "$as_dir" && as_dir=.
4247    for ac_exec_ext in '' $ac_executable_extensions; do
4248  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4249    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4251    break 2
4252  fi
4253done
4254  done
4255IFS=$as_save_IFS
4256
4257  ;;
4258esac
4259fi
4260CPIO=$ac_cv_path_CPIO
4261if test -n "$CPIO"; then
4262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4263$as_echo "$CPIO" >&6; }
4264else
4265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4266$as_echo "no" >&6; }
4267fi
4268
4269
4270  test -n "$CPIO" && break
4271done
4272
4273
4274    if test "x$CPIO" = x; then
4275        if test "xcpio" = x; then
4276          PROG_NAME=cpio
4277        else
4278          PROG_NAME=cpio
4279        fi
4280        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4281$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4282        as_fn_error $? "Cannot continue" "$LINENO" 5
4283    fi
4284
4285
4286
4287    for ac_prog in cut
4288do
4289  # Extract the first word of "$ac_prog", so it can be a program name with args.
4290set dummy $ac_prog; ac_word=$2
4291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4292$as_echo_n "checking for $ac_word... " >&6; }
4293if test "${ac_cv_path_CUT+set}" = set; then :
4294  $as_echo_n "(cached) " >&6
4295else
4296  case $CUT in
4297  [\\/]* | ?:[\\/]*)
4298  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4299  ;;
4300  *)
4301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4302for as_dir in $PATH
4303do
4304  IFS=$as_save_IFS
4305  test -z "$as_dir" && as_dir=.
4306    for ac_exec_ext in '' $ac_executable_extensions; do
4307  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4308    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4310    break 2
4311  fi
4312done
4313  done
4314IFS=$as_save_IFS
4315
4316  ;;
4317esac
4318fi
4319CUT=$ac_cv_path_CUT
4320if test -n "$CUT"; then
4321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4322$as_echo "$CUT" >&6; }
4323else
4324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4325$as_echo "no" >&6; }
4326fi
4327
4328
4329  test -n "$CUT" && break
4330done
4331
4332
4333    if test "x$CUT" = x; then
4334        if test "xcut" = x; then
4335          PROG_NAME=cut
4336        else
4337          PROG_NAME=cut
4338        fi
4339        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4340$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4341        as_fn_error $? "Cannot continue" "$LINENO" 5
4342    fi
4343
4344
4345
4346    for ac_prog in date
4347do
4348  # Extract the first word of "$ac_prog", so it can be a program name with args.
4349set dummy $ac_prog; ac_word=$2
4350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4351$as_echo_n "checking for $ac_word... " >&6; }
4352if test "${ac_cv_path_DATE+set}" = set; then :
4353  $as_echo_n "(cached) " >&6
4354else
4355  case $DATE in
4356  [\\/]* | ?:[\\/]*)
4357  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4358  ;;
4359  *)
4360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4361for as_dir in $PATH
4362do
4363  IFS=$as_save_IFS
4364  test -z "$as_dir" && as_dir=.
4365    for ac_exec_ext in '' $ac_executable_extensions; do
4366  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4367    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4369    break 2
4370  fi
4371done
4372  done
4373IFS=$as_save_IFS
4374
4375  ;;
4376esac
4377fi
4378DATE=$ac_cv_path_DATE
4379if test -n "$DATE"; then
4380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4381$as_echo "$DATE" >&6; }
4382else
4383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4384$as_echo "no" >&6; }
4385fi
4386
4387
4388  test -n "$DATE" && break
4389done
4390
4391
4392    if test "x$DATE" = x; then
4393        if test "xdate" = x; then
4394          PROG_NAME=date
4395        else
4396          PROG_NAME=date
4397        fi
4398        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4399$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4400        as_fn_error $? "Cannot continue" "$LINENO" 5
4401    fi
4402
4403
4404
4405    for ac_prog in gdiff diff
4406do
4407  # Extract the first word of "$ac_prog", so it can be a program name with args.
4408set dummy $ac_prog; ac_word=$2
4409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4410$as_echo_n "checking for $ac_word... " >&6; }
4411if test "${ac_cv_path_DIFF+set}" = set; then :
4412  $as_echo_n "(cached) " >&6
4413else
4414  case $DIFF in
4415  [\\/]* | ?:[\\/]*)
4416  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4417  ;;
4418  *)
4419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4420for as_dir in $PATH
4421do
4422  IFS=$as_save_IFS
4423  test -z "$as_dir" && as_dir=.
4424    for ac_exec_ext in '' $ac_executable_extensions; do
4425  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4426    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4428    break 2
4429  fi
4430done
4431  done
4432IFS=$as_save_IFS
4433
4434  ;;
4435esac
4436fi
4437DIFF=$ac_cv_path_DIFF
4438if test -n "$DIFF"; then
4439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4440$as_echo "$DIFF" >&6; }
4441else
4442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4443$as_echo "no" >&6; }
4444fi
4445
4446
4447  test -n "$DIFF" && break
4448done
4449
4450
4451    if test "x$DIFF" = x; then
4452        if test "xgdiff diff" = x; then
4453          PROG_NAME=diff
4454        else
4455          PROG_NAME=gdiff diff
4456        fi
4457        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4458$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4459        as_fn_error $? "Cannot continue" "$LINENO" 5
4460    fi
4461
4462
4463
4464    for ac_prog in dirname
4465do
4466  # Extract the first word of "$ac_prog", so it can be a program name with args.
4467set dummy $ac_prog; ac_word=$2
4468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4469$as_echo_n "checking for $ac_word... " >&6; }
4470if test "${ac_cv_path_DIRNAME+set}" = set; then :
4471  $as_echo_n "(cached) " >&6
4472else
4473  case $DIRNAME in
4474  [\\/]* | ?:[\\/]*)
4475  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4476  ;;
4477  *)
4478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4479for as_dir in $PATH
4480do
4481  IFS=$as_save_IFS
4482  test -z "$as_dir" && as_dir=.
4483    for ac_exec_ext in '' $ac_executable_extensions; do
4484  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4485    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4487    break 2
4488  fi
4489done
4490  done
4491IFS=$as_save_IFS
4492
4493  ;;
4494esac
4495fi
4496DIRNAME=$ac_cv_path_DIRNAME
4497if test -n "$DIRNAME"; then
4498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4499$as_echo "$DIRNAME" >&6; }
4500else
4501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4502$as_echo "no" >&6; }
4503fi
4504
4505
4506  test -n "$DIRNAME" && break
4507done
4508
4509
4510    if test "x$DIRNAME" = x; then
4511        if test "xdirname" = x; then
4512          PROG_NAME=dirname
4513        else
4514          PROG_NAME=dirname
4515        fi
4516        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4517$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4518        as_fn_error $? "Cannot continue" "$LINENO" 5
4519    fi
4520
4521
4522
4523    for ac_prog in echo
4524do
4525  # Extract the first word of "$ac_prog", so it can be a program name with args.
4526set dummy $ac_prog; ac_word=$2
4527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4528$as_echo_n "checking for $ac_word... " >&6; }
4529if test "${ac_cv_path_ECHO+set}" = set; then :
4530  $as_echo_n "(cached) " >&6
4531else
4532  case $ECHO in
4533  [\\/]* | ?:[\\/]*)
4534  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4535  ;;
4536  *)
4537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4538for as_dir in $PATH
4539do
4540  IFS=$as_save_IFS
4541  test -z "$as_dir" && as_dir=.
4542    for ac_exec_ext in '' $ac_executable_extensions; do
4543  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4544    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4546    break 2
4547  fi
4548done
4549  done
4550IFS=$as_save_IFS
4551
4552  ;;
4553esac
4554fi
4555ECHO=$ac_cv_path_ECHO
4556if test -n "$ECHO"; then
4557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4558$as_echo "$ECHO" >&6; }
4559else
4560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4561$as_echo "no" >&6; }
4562fi
4563
4564
4565  test -n "$ECHO" && break
4566done
4567
4568
4569    if test "x$ECHO" = x; then
4570        if test "xecho" = x; then
4571          PROG_NAME=echo
4572        else
4573          PROG_NAME=echo
4574        fi
4575        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4576$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4577        as_fn_error $? "Cannot continue" "$LINENO" 5
4578    fi
4579
4580
4581
4582    for ac_prog in expr
4583do
4584  # Extract the first word of "$ac_prog", so it can be a program name with args.
4585set dummy $ac_prog; ac_word=$2
4586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4587$as_echo_n "checking for $ac_word... " >&6; }
4588if test "${ac_cv_path_EXPR+set}" = set; then :
4589  $as_echo_n "(cached) " >&6
4590else
4591  case $EXPR in
4592  [\\/]* | ?:[\\/]*)
4593  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4594  ;;
4595  *)
4596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4597for as_dir in $PATH
4598do
4599  IFS=$as_save_IFS
4600  test -z "$as_dir" && as_dir=.
4601    for ac_exec_ext in '' $ac_executable_extensions; do
4602  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4603    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4605    break 2
4606  fi
4607done
4608  done
4609IFS=$as_save_IFS
4610
4611  ;;
4612esac
4613fi
4614EXPR=$ac_cv_path_EXPR
4615if test -n "$EXPR"; then
4616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4617$as_echo "$EXPR" >&6; }
4618else
4619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4620$as_echo "no" >&6; }
4621fi
4622
4623
4624  test -n "$EXPR" && break
4625done
4626
4627
4628    if test "x$EXPR" = x; then
4629        if test "xexpr" = x; then
4630          PROG_NAME=expr
4631        else
4632          PROG_NAME=expr
4633        fi
4634        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4635$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4636        as_fn_error $? "Cannot continue" "$LINENO" 5
4637    fi
4638
4639
4640
4641    for ac_prog in file
4642do
4643  # Extract the first word of "$ac_prog", so it can be a program name with args.
4644set dummy $ac_prog; ac_word=$2
4645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4646$as_echo_n "checking for $ac_word... " >&6; }
4647if test "${ac_cv_path_FILE+set}" = set; then :
4648  $as_echo_n "(cached) " >&6
4649else
4650  case $FILE in
4651  [\\/]* | ?:[\\/]*)
4652  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4653  ;;
4654  *)
4655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4656for as_dir in $PATH
4657do
4658  IFS=$as_save_IFS
4659  test -z "$as_dir" && as_dir=.
4660    for ac_exec_ext in '' $ac_executable_extensions; do
4661  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4662    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4664    break 2
4665  fi
4666done
4667  done
4668IFS=$as_save_IFS
4669
4670  ;;
4671esac
4672fi
4673FILE=$ac_cv_path_FILE
4674if test -n "$FILE"; then
4675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4676$as_echo "$FILE" >&6; }
4677else
4678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4679$as_echo "no" >&6; }
4680fi
4681
4682
4683  test -n "$FILE" && break
4684done
4685
4686
4687    if test "x$FILE" = x; then
4688        if test "xfile" = x; then
4689          PROG_NAME=file
4690        else
4691          PROG_NAME=file
4692        fi
4693        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4694$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4695        as_fn_error $? "Cannot continue" "$LINENO" 5
4696    fi
4697
4698
4699
4700    for ac_prog in find
4701do
4702  # Extract the first word of "$ac_prog", so it can be a program name with args.
4703set dummy $ac_prog; ac_word=$2
4704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4705$as_echo_n "checking for $ac_word... " >&6; }
4706if test "${ac_cv_path_FIND+set}" = set; then :
4707  $as_echo_n "(cached) " >&6
4708else
4709  case $FIND in
4710  [\\/]* | ?:[\\/]*)
4711  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4712  ;;
4713  *)
4714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4715for as_dir in $PATH
4716do
4717  IFS=$as_save_IFS
4718  test -z "$as_dir" && as_dir=.
4719    for ac_exec_ext in '' $ac_executable_extensions; do
4720  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4721    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4723    break 2
4724  fi
4725done
4726  done
4727IFS=$as_save_IFS
4728
4729  ;;
4730esac
4731fi
4732FIND=$ac_cv_path_FIND
4733if test -n "$FIND"; then
4734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4735$as_echo "$FIND" >&6; }
4736else
4737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4738$as_echo "no" >&6; }
4739fi
4740
4741
4742  test -n "$FIND" && break
4743done
4744
4745
4746    if test "x$FIND" = x; then
4747        if test "xfind" = x; then
4748          PROG_NAME=find
4749        else
4750          PROG_NAME=find
4751        fi
4752        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4753$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4754        as_fn_error $? "Cannot continue" "$LINENO" 5
4755    fi
4756
4757
4758
4759    for ac_prog in head
4760do
4761  # Extract the first word of "$ac_prog", so it can be a program name with args.
4762set dummy $ac_prog; ac_word=$2
4763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4764$as_echo_n "checking for $ac_word... " >&6; }
4765if test "${ac_cv_path_HEAD+set}" = set; then :
4766  $as_echo_n "(cached) " >&6
4767else
4768  case $HEAD in
4769  [\\/]* | ?:[\\/]*)
4770  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4771  ;;
4772  *)
4773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4774for as_dir in $PATH
4775do
4776  IFS=$as_save_IFS
4777  test -z "$as_dir" && as_dir=.
4778    for ac_exec_ext in '' $ac_executable_extensions; do
4779  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4780    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4782    break 2
4783  fi
4784done
4785  done
4786IFS=$as_save_IFS
4787
4788  ;;
4789esac
4790fi
4791HEAD=$ac_cv_path_HEAD
4792if test -n "$HEAD"; then
4793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4794$as_echo "$HEAD" >&6; }
4795else
4796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4797$as_echo "no" >&6; }
4798fi
4799
4800
4801  test -n "$HEAD" && break
4802done
4803
4804
4805    if test "x$HEAD" = x; then
4806        if test "xhead" = x; then
4807          PROG_NAME=head
4808        else
4809          PROG_NAME=head
4810        fi
4811        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4812$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4813        as_fn_error $? "Cannot continue" "$LINENO" 5
4814    fi
4815
4816
4817
4818    for ac_prog in ln
4819do
4820  # Extract the first word of "$ac_prog", so it can be a program name with args.
4821set dummy $ac_prog; ac_word=$2
4822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4823$as_echo_n "checking for $ac_word... " >&6; }
4824if test "${ac_cv_path_LN+set}" = set; then :
4825  $as_echo_n "(cached) " >&6
4826else
4827  case $LN in
4828  [\\/]* | ?:[\\/]*)
4829  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4830  ;;
4831  *)
4832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4833for as_dir in $PATH
4834do
4835  IFS=$as_save_IFS
4836  test -z "$as_dir" && as_dir=.
4837    for ac_exec_ext in '' $ac_executable_extensions; do
4838  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4839    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4841    break 2
4842  fi
4843done
4844  done
4845IFS=$as_save_IFS
4846
4847  ;;
4848esac
4849fi
4850LN=$ac_cv_path_LN
4851if test -n "$LN"; then
4852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4853$as_echo "$LN" >&6; }
4854else
4855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4856$as_echo "no" >&6; }
4857fi
4858
4859
4860  test -n "$LN" && break
4861done
4862
4863
4864    if test "x$LN" = x; then
4865        if test "xln" = x; then
4866          PROG_NAME=ln
4867        else
4868          PROG_NAME=ln
4869        fi
4870        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4871$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4872        as_fn_error $? "Cannot continue" "$LINENO" 5
4873    fi
4874
4875
4876
4877    for ac_prog in ls
4878do
4879  # Extract the first word of "$ac_prog", so it can be a program name with args.
4880set dummy $ac_prog; ac_word=$2
4881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4882$as_echo_n "checking for $ac_word... " >&6; }
4883if test "${ac_cv_path_LS+set}" = set; then :
4884  $as_echo_n "(cached) " >&6
4885else
4886  case $LS in
4887  [\\/]* | ?:[\\/]*)
4888  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4889  ;;
4890  *)
4891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4892for as_dir in $PATH
4893do
4894  IFS=$as_save_IFS
4895  test -z "$as_dir" && as_dir=.
4896    for ac_exec_ext in '' $ac_executable_extensions; do
4897  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4898    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4900    break 2
4901  fi
4902done
4903  done
4904IFS=$as_save_IFS
4905
4906  ;;
4907esac
4908fi
4909LS=$ac_cv_path_LS
4910if test -n "$LS"; then
4911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4912$as_echo "$LS" >&6; }
4913else
4914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4915$as_echo "no" >&6; }
4916fi
4917
4918
4919  test -n "$LS" && break
4920done
4921
4922
4923    if test "x$LS" = x; then
4924        if test "xls" = x; then
4925          PROG_NAME=ls
4926        else
4927          PROG_NAME=ls
4928        fi
4929        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4930$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4931        as_fn_error $? "Cannot continue" "$LINENO" 5
4932    fi
4933
4934
4935
4936    for ac_prog in mkdir
4937do
4938  # Extract the first word of "$ac_prog", so it can be a program name with args.
4939set dummy $ac_prog; ac_word=$2
4940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4941$as_echo_n "checking for $ac_word... " >&6; }
4942if test "${ac_cv_path_MKDIR+set}" = set; then :
4943  $as_echo_n "(cached) " >&6
4944else
4945  case $MKDIR in
4946  [\\/]* | ?:[\\/]*)
4947  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4948  ;;
4949  *)
4950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4951for as_dir in $PATH
4952do
4953  IFS=$as_save_IFS
4954  test -z "$as_dir" && as_dir=.
4955    for ac_exec_ext in '' $ac_executable_extensions; do
4956  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4957    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4959    break 2
4960  fi
4961done
4962  done
4963IFS=$as_save_IFS
4964
4965  ;;
4966esac
4967fi
4968MKDIR=$ac_cv_path_MKDIR
4969if test -n "$MKDIR"; then
4970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4971$as_echo "$MKDIR" >&6; }
4972else
4973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4974$as_echo "no" >&6; }
4975fi
4976
4977
4978  test -n "$MKDIR" && break
4979done
4980
4981
4982    if test "x$MKDIR" = x; then
4983        if test "xmkdir" = x; then
4984          PROG_NAME=mkdir
4985        else
4986          PROG_NAME=mkdir
4987        fi
4988        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4989$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4990        as_fn_error $? "Cannot continue" "$LINENO" 5
4991    fi
4992
4993
4994
4995    for ac_prog in mktemp
4996do
4997  # Extract the first word of "$ac_prog", so it can be a program name with args.
4998set dummy $ac_prog; ac_word=$2
4999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5000$as_echo_n "checking for $ac_word... " >&6; }
5001if test "${ac_cv_path_MKTEMP+set}" = set; then :
5002  $as_echo_n "(cached) " >&6
5003else
5004  case $MKTEMP in
5005  [\\/]* | ?:[\\/]*)
5006  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5007  ;;
5008  *)
5009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5010for as_dir in $PATH
5011do
5012  IFS=$as_save_IFS
5013  test -z "$as_dir" && as_dir=.
5014    for ac_exec_ext in '' $ac_executable_extensions; do
5015  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5016    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5018    break 2
5019  fi
5020done
5021  done
5022IFS=$as_save_IFS
5023
5024  ;;
5025esac
5026fi
5027MKTEMP=$ac_cv_path_MKTEMP
5028if test -n "$MKTEMP"; then
5029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5030$as_echo "$MKTEMP" >&6; }
5031else
5032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5033$as_echo "no" >&6; }
5034fi
5035
5036
5037  test -n "$MKTEMP" && break
5038done
5039
5040
5041    if test "x$MKTEMP" = x; then
5042        if test "xmktemp" = x; then
5043          PROG_NAME=mktemp
5044        else
5045          PROG_NAME=mktemp
5046        fi
5047        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5048$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5049        as_fn_error $? "Cannot continue" "$LINENO" 5
5050    fi
5051
5052
5053
5054    for ac_prog in mv
5055do
5056  # Extract the first word of "$ac_prog", so it can be a program name with args.
5057set dummy $ac_prog; ac_word=$2
5058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5059$as_echo_n "checking for $ac_word... " >&6; }
5060if test "${ac_cv_path_MV+set}" = set; then :
5061  $as_echo_n "(cached) " >&6
5062else
5063  case $MV in
5064  [\\/]* | ?:[\\/]*)
5065  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5066  ;;
5067  *)
5068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5069for as_dir in $PATH
5070do
5071  IFS=$as_save_IFS
5072  test -z "$as_dir" && as_dir=.
5073    for ac_exec_ext in '' $ac_executable_extensions; do
5074  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5075    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5077    break 2
5078  fi
5079done
5080  done
5081IFS=$as_save_IFS
5082
5083  ;;
5084esac
5085fi
5086MV=$ac_cv_path_MV
5087if test -n "$MV"; then
5088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5089$as_echo "$MV" >&6; }
5090else
5091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5092$as_echo "no" >&6; }
5093fi
5094
5095
5096  test -n "$MV" && break
5097done
5098
5099
5100    if test "x$MV" = x; then
5101        if test "xmv" = x; then
5102          PROG_NAME=mv
5103        else
5104          PROG_NAME=mv
5105        fi
5106        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5107$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5108        as_fn_error $? "Cannot continue" "$LINENO" 5
5109    fi
5110
5111
5112
5113    for ac_prog in printf
5114do
5115  # Extract the first word of "$ac_prog", so it can be a program name with args.
5116set dummy $ac_prog; ac_word=$2
5117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5118$as_echo_n "checking for $ac_word... " >&6; }
5119if test "${ac_cv_path_PRINTF+set}" = set; then :
5120  $as_echo_n "(cached) " >&6
5121else
5122  case $PRINTF in
5123  [\\/]* | ?:[\\/]*)
5124  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5125  ;;
5126  *)
5127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5128for as_dir in $PATH
5129do
5130  IFS=$as_save_IFS
5131  test -z "$as_dir" && as_dir=.
5132    for ac_exec_ext in '' $ac_executable_extensions; do
5133  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5134    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5136    break 2
5137  fi
5138done
5139  done
5140IFS=$as_save_IFS
5141
5142  ;;
5143esac
5144fi
5145PRINTF=$ac_cv_path_PRINTF
5146if test -n "$PRINTF"; then
5147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5148$as_echo "$PRINTF" >&6; }
5149else
5150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5151$as_echo "no" >&6; }
5152fi
5153
5154
5155  test -n "$PRINTF" && break
5156done
5157
5158
5159    if test "x$PRINTF" = x; then
5160        if test "xprintf" = x; then
5161          PROG_NAME=printf
5162        else
5163          PROG_NAME=printf
5164        fi
5165        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5166$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5167        as_fn_error $? "Cannot continue" "$LINENO" 5
5168    fi
5169
5170
5171
5172    for ac_prog in rm
5173do
5174  # Extract the first word of "$ac_prog", so it can be a program name with args.
5175set dummy $ac_prog; ac_word=$2
5176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5177$as_echo_n "checking for $ac_word... " >&6; }
5178if test "${ac_cv_path_RM+set}" = set; then :
5179  $as_echo_n "(cached) " >&6
5180else
5181  case $RM in
5182  [\\/]* | ?:[\\/]*)
5183  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5184  ;;
5185  *)
5186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5187for as_dir in $PATH
5188do
5189  IFS=$as_save_IFS
5190  test -z "$as_dir" && as_dir=.
5191    for ac_exec_ext in '' $ac_executable_extensions; do
5192  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5193    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5195    break 2
5196  fi
5197done
5198  done
5199IFS=$as_save_IFS
5200
5201  ;;
5202esac
5203fi
5204RM=$ac_cv_path_RM
5205if test -n "$RM"; then
5206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5207$as_echo "$RM" >&6; }
5208else
5209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5210$as_echo "no" >&6; }
5211fi
5212
5213
5214  test -n "$RM" && break
5215done
5216
5217
5218    if test "x$RM" = x; then
5219        if test "xrm" = x; then
5220          PROG_NAME=rm
5221        else
5222          PROG_NAME=rm
5223        fi
5224        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5225$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5226        as_fn_error $? "Cannot continue" "$LINENO" 5
5227    fi
5228
5229
5230
5231    for ac_prog in sh
5232do
5233  # Extract the first word of "$ac_prog", so it can be a program name with args.
5234set dummy $ac_prog; ac_word=$2
5235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5236$as_echo_n "checking for $ac_word... " >&6; }
5237if test "${ac_cv_path_SH+set}" = set; then :
5238  $as_echo_n "(cached) " >&6
5239else
5240  case $SH in
5241  [\\/]* | ?:[\\/]*)
5242  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5243  ;;
5244  *)
5245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5246for as_dir in $PATH
5247do
5248  IFS=$as_save_IFS
5249  test -z "$as_dir" && as_dir=.
5250    for ac_exec_ext in '' $ac_executable_extensions; do
5251  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5252    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5254    break 2
5255  fi
5256done
5257  done
5258IFS=$as_save_IFS
5259
5260  ;;
5261esac
5262fi
5263SH=$ac_cv_path_SH
5264if test -n "$SH"; then
5265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5266$as_echo "$SH" >&6; }
5267else
5268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5269$as_echo "no" >&6; }
5270fi
5271
5272
5273  test -n "$SH" && break
5274done
5275
5276
5277    if test "x$SH" = x; then
5278        if test "xsh" = x; then
5279          PROG_NAME=sh
5280        else
5281          PROG_NAME=sh
5282        fi
5283        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5284$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5285        as_fn_error $? "Cannot continue" "$LINENO" 5
5286    fi
5287
5288
5289
5290    for ac_prog in sort
5291do
5292  # Extract the first word of "$ac_prog", so it can be a program name with args.
5293set dummy $ac_prog; ac_word=$2
5294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5295$as_echo_n "checking for $ac_word... " >&6; }
5296if test "${ac_cv_path_SORT+set}" = set; then :
5297  $as_echo_n "(cached) " >&6
5298else
5299  case $SORT in
5300  [\\/]* | ?:[\\/]*)
5301  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5302  ;;
5303  *)
5304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5305for as_dir in $PATH
5306do
5307  IFS=$as_save_IFS
5308  test -z "$as_dir" && as_dir=.
5309    for ac_exec_ext in '' $ac_executable_extensions; do
5310  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5311    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5313    break 2
5314  fi
5315done
5316  done
5317IFS=$as_save_IFS
5318
5319  ;;
5320esac
5321fi
5322SORT=$ac_cv_path_SORT
5323if test -n "$SORT"; then
5324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5325$as_echo "$SORT" >&6; }
5326else
5327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5328$as_echo "no" >&6; }
5329fi
5330
5331
5332  test -n "$SORT" && break
5333done
5334
5335
5336    if test "x$SORT" = x; then
5337        if test "xsort" = x; then
5338          PROG_NAME=sort
5339        else
5340          PROG_NAME=sort
5341        fi
5342        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5343$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5344        as_fn_error $? "Cannot continue" "$LINENO" 5
5345    fi
5346
5347
5348
5349    for ac_prog in tail
5350do
5351  # Extract the first word of "$ac_prog", so it can be a program name with args.
5352set dummy $ac_prog; ac_word=$2
5353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5354$as_echo_n "checking for $ac_word... " >&6; }
5355if test "${ac_cv_path_TAIL+set}" = set; then :
5356  $as_echo_n "(cached) " >&6
5357else
5358  case $TAIL in
5359  [\\/]* | ?:[\\/]*)
5360  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5361  ;;
5362  *)
5363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5364for as_dir in $PATH
5365do
5366  IFS=$as_save_IFS
5367  test -z "$as_dir" && as_dir=.
5368    for ac_exec_ext in '' $ac_executable_extensions; do
5369  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5370    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5372    break 2
5373  fi
5374done
5375  done
5376IFS=$as_save_IFS
5377
5378  ;;
5379esac
5380fi
5381TAIL=$ac_cv_path_TAIL
5382if test -n "$TAIL"; then
5383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5384$as_echo "$TAIL" >&6; }
5385else
5386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5387$as_echo "no" >&6; }
5388fi
5389
5390
5391  test -n "$TAIL" && break
5392done
5393
5394
5395    if test "x$TAIL" = x; then
5396        if test "xtail" = x; then
5397          PROG_NAME=tail
5398        else
5399          PROG_NAME=tail
5400        fi
5401        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5402$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5403        as_fn_error $? "Cannot continue" "$LINENO" 5
5404    fi
5405
5406
5407
5408    for ac_prog in tar
5409do
5410  # Extract the first word of "$ac_prog", so it can be a program name with args.
5411set dummy $ac_prog; ac_word=$2
5412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5413$as_echo_n "checking for $ac_word... " >&6; }
5414if test "${ac_cv_path_TAR+set}" = set; then :
5415  $as_echo_n "(cached) " >&6
5416else
5417  case $TAR in
5418  [\\/]* | ?:[\\/]*)
5419  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5420  ;;
5421  *)
5422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5423for as_dir in $PATH
5424do
5425  IFS=$as_save_IFS
5426  test -z "$as_dir" && as_dir=.
5427    for ac_exec_ext in '' $ac_executable_extensions; do
5428  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5429    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5431    break 2
5432  fi
5433done
5434  done
5435IFS=$as_save_IFS
5436
5437  ;;
5438esac
5439fi
5440TAR=$ac_cv_path_TAR
5441if test -n "$TAR"; then
5442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5443$as_echo "$TAR" >&6; }
5444else
5445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5446$as_echo "no" >&6; }
5447fi
5448
5449
5450  test -n "$TAR" && break
5451done
5452
5453
5454    if test "x$TAR" = x; then
5455        if test "xtar" = x; then
5456          PROG_NAME=tar
5457        else
5458          PROG_NAME=tar
5459        fi
5460        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5461$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5462        as_fn_error $? "Cannot continue" "$LINENO" 5
5463    fi
5464
5465
5466
5467    for ac_prog in tee
5468do
5469  # Extract the first word of "$ac_prog", so it can be a program name with args.
5470set dummy $ac_prog; ac_word=$2
5471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5472$as_echo_n "checking for $ac_word... " >&6; }
5473if test "${ac_cv_path_TEE+set}" = set; then :
5474  $as_echo_n "(cached) " >&6
5475else
5476  case $TEE in
5477  [\\/]* | ?:[\\/]*)
5478  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5479  ;;
5480  *)
5481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5482for as_dir in $PATH
5483do
5484  IFS=$as_save_IFS
5485  test -z "$as_dir" && as_dir=.
5486    for ac_exec_ext in '' $ac_executable_extensions; do
5487  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5488    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5490    break 2
5491  fi
5492done
5493  done
5494IFS=$as_save_IFS
5495
5496  ;;
5497esac
5498fi
5499TEE=$ac_cv_path_TEE
5500if test -n "$TEE"; then
5501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5502$as_echo "$TEE" >&6; }
5503else
5504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5505$as_echo "no" >&6; }
5506fi
5507
5508
5509  test -n "$TEE" && break
5510done
5511
5512
5513    if test "x$TEE" = x; then
5514        if test "xtee" = x; then
5515          PROG_NAME=tee
5516        else
5517          PROG_NAME=tee
5518        fi
5519        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5520$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5521        as_fn_error $? "Cannot continue" "$LINENO" 5
5522    fi
5523
5524
5525
5526    for ac_prog in touch
5527do
5528  # Extract the first word of "$ac_prog", so it can be a program name with args.
5529set dummy $ac_prog; ac_word=$2
5530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5531$as_echo_n "checking for $ac_word... " >&6; }
5532if test "${ac_cv_path_TOUCH+set}" = set; then :
5533  $as_echo_n "(cached) " >&6
5534else
5535  case $TOUCH in
5536  [\\/]* | ?:[\\/]*)
5537  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5538  ;;
5539  *)
5540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5541for as_dir in $PATH
5542do
5543  IFS=$as_save_IFS
5544  test -z "$as_dir" && as_dir=.
5545    for ac_exec_ext in '' $ac_executable_extensions; do
5546  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5547    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5549    break 2
5550  fi
5551done
5552  done
5553IFS=$as_save_IFS
5554
5555  ;;
5556esac
5557fi
5558TOUCH=$ac_cv_path_TOUCH
5559if test -n "$TOUCH"; then
5560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5561$as_echo "$TOUCH" >&6; }
5562else
5563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5564$as_echo "no" >&6; }
5565fi
5566
5567
5568  test -n "$TOUCH" && break
5569done
5570
5571
5572    if test "x$TOUCH" = x; then
5573        if test "xtouch" = x; then
5574          PROG_NAME=touch
5575        else
5576          PROG_NAME=touch
5577        fi
5578        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5579$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5580        as_fn_error $? "Cannot continue" "$LINENO" 5
5581    fi
5582
5583
5584
5585    for ac_prog in tr
5586do
5587  # Extract the first word of "$ac_prog", so it can be a program name with args.
5588set dummy $ac_prog; ac_word=$2
5589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5590$as_echo_n "checking for $ac_word... " >&6; }
5591if test "${ac_cv_path_TR+set}" = set; then :
5592  $as_echo_n "(cached) " >&6
5593else
5594  case $TR in
5595  [\\/]* | ?:[\\/]*)
5596  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5597  ;;
5598  *)
5599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5600for as_dir in $PATH
5601do
5602  IFS=$as_save_IFS
5603  test -z "$as_dir" && as_dir=.
5604    for ac_exec_ext in '' $ac_executable_extensions; do
5605  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5606    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5608    break 2
5609  fi
5610done
5611  done
5612IFS=$as_save_IFS
5613
5614  ;;
5615esac
5616fi
5617TR=$ac_cv_path_TR
5618if test -n "$TR"; then
5619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5620$as_echo "$TR" >&6; }
5621else
5622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5623$as_echo "no" >&6; }
5624fi
5625
5626
5627  test -n "$TR" && break
5628done
5629
5630
5631    if test "x$TR" = x; then
5632        if test "xtr" = x; then
5633          PROG_NAME=tr
5634        else
5635          PROG_NAME=tr
5636        fi
5637        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5638$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5639        as_fn_error $? "Cannot continue" "$LINENO" 5
5640    fi
5641
5642
5643
5644    for ac_prog in uname
5645do
5646  # Extract the first word of "$ac_prog", so it can be a program name with args.
5647set dummy $ac_prog; ac_word=$2
5648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5649$as_echo_n "checking for $ac_word... " >&6; }
5650if test "${ac_cv_path_UNAME+set}" = set; then :
5651  $as_echo_n "(cached) " >&6
5652else
5653  case $UNAME in
5654  [\\/]* | ?:[\\/]*)
5655  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5656  ;;
5657  *)
5658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5659for as_dir in $PATH
5660do
5661  IFS=$as_save_IFS
5662  test -z "$as_dir" && as_dir=.
5663    for ac_exec_ext in '' $ac_executable_extensions; do
5664  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5665    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5667    break 2
5668  fi
5669done
5670  done
5671IFS=$as_save_IFS
5672
5673  ;;
5674esac
5675fi
5676UNAME=$ac_cv_path_UNAME
5677if test -n "$UNAME"; then
5678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5679$as_echo "$UNAME" >&6; }
5680else
5681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5682$as_echo "no" >&6; }
5683fi
5684
5685
5686  test -n "$UNAME" && break
5687done
5688
5689
5690    if test "x$UNAME" = x; then
5691        if test "xuname" = x; then
5692          PROG_NAME=uname
5693        else
5694          PROG_NAME=uname
5695        fi
5696        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5697$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5698        as_fn_error $? "Cannot continue" "$LINENO" 5
5699    fi
5700
5701
5702
5703    for ac_prog in uniq
5704do
5705  # Extract the first word of "$ac_prog", so it can be a program name with args.
5706set dummy $ac_prog; ac_word=$2
5707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5708$as_echo_n "checking for $ac_word... " >&6; }
5709if test "${ac_cv_path_UNIQ+set}" = set; then :
5710  $as_echo_n "(cached) " >&6
5711else
5712  case $UNIQ in
5713  [\\/]* | ?:[\\/]*)
5714  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5715  ;;
5716  *)
5717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5718for as_dir in $PATH
5719do
5720  IFS=$as_save_IFS
5721  test -z "$as_dir" && as_dir=.
5722    for ac_exec_ext in '' $ac_executable_extensions; do
5723  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5724    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5726    break 2
5727  fi
5728done
5729  done
5730IFS=$as_save_IFS
5731
5732  ;;
5733esac
5734fi
5735UNIQ=$ac_cv_path_UNIQ
5736if test -n "$UNIQ"; then
5737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5738$as_echo "$UNIQ" >&6; }
5739else
5740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5741$as_echo "no" >&6; }
5742fi
5743
5744
5745  test -n "$UNIQ" && break
5746done
5747
5748
5749    if test "x$UNIQ" = x; then
5750        if test "xuniq" = x; then
5751          PROG_NAME=uniq
5752        else
5753          PROG_NAME=uniq
5754        fi
5755        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5756$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5757        as_fn_error $? "Cannot continue" "$LINENO" 5
5758    fi
5759
5760
5761
5762    for ac_prog in wc
5763do
5764  # Extract the first word of "$ac_prog", so it can be a program name with args.
5765set dummy $ac_prog; ac_word=$2
5766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5767$as_echo_n "checking for $ac_word... " >&6; }
5768if test "${ac_cv_path_WC+set}" = set; then :
5769  $as_echo_n "(cached) " >&6
5770else
5771  case $WC in
5772  [\\/]* | ?:[\\/]*)
5773  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5774  ;;
5775  *)
5776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5777for as_dir in $PATH
5778do
5779  IFS=$as_save_IFS
5780  test -z "$as_dir" && as_dir=.
5781    for ac_exec_ext in '' $ac_executable_extensions; do
5782  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5783    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5785    break 2
5786  fi
5787done
5788  done
5789IFS=$as_save_IFS
5790
5791  ;;
5792esac
5793fi
5794WC=$ac_cv_path_WC
5795if test -n "$WC"; then
5796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5797$as_echo "$WC" >&6; }
5798else
5799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5800$as_echo "no" >&6; }
5801fi
5802
5803
5804  test -n "$WC" && break
5805done
5806
5807
5808    if test "x$WC" = x; then
5809        if test "xwc" = x; then
5810          PROG_NAME=wc
5811        else
5812          PROG_NAME=wc
5813        fi
5814        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5815$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5816        as_fn_error $? "Cannot continue" "$LINENO" 5
5817    fi
5818
5819
5820
5821    for ac_prog in which
5822do
5823  # Extract the first word of "$ac_prog", so it can be a program name with args.
5824set dummy $ac_prog; ac_word=$2
5825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5826$as_echo_n "checking for $ac_word... " >&6; }
5827if test "${ac_cv_path_WHICH+set}" = set; then :
5828  $as_echo_n "(cached) " >&6
5829else
5830  case $WHICH in
5831  [\\/]* | ?:[\\/]*)
5832  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5833  ;;
5834  *)
5835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5836for as_dir in $PATH
5837do
5838  IFS=$as_save_IFS
5839  test -z "$as_dir" && as_dir=.
5840    for ac_exec_ext in '' $ac_executable_extensions; do
5841  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5842    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5844    break 2
5845  fi
5846done
5847  done
5848IFS=$as_save_IFS
5849
5850  ;;
5851esac
5852fi
5853WHICH=$ac_cv_path_WHICH
5854if test -n "$WHICH"; then
5855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5856$as_echo "$WHICH" >&6; }
5857else
5858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5859$as_echo "no" >&6; }
5860fi
5861
5862
5863  test -n "$WHICH" && break
5864done
5865
5866
5867    if test "x$WHICH" = x; then
5868        if test "xwhich" = x; then
5869          PROG_NAME=which
5870        else
5871          PROG_NAME=which
5872        fi
5873        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5874$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5875        as_fn_error $? "Cannot continue" "$LINENO" 5
5876    fi
5877
5878
5879
5880    for ac_prog in xargs
5881do
5882  # Extract the first word of "$ac_prog", so it can be a program name with args.
5883set dummy $ac_prog; ac_word=$2
5884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5885$as_echo_n "checking for $ac_word... " >&6; }
5886if test "${ac_cv_path_XARGS+set}" = set; then :
5887  $as_echo_n "(cached) " >&6
5888else
5889  case $XARGS in
5890  [\\/]* | ?:[\\/]*)
5891  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5892  ;;
5893  *)
5894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5895for as_dir in $PATH
5896do
5897  IFS=$as_save_IFS
5898  test -z "$as_dir" && as_dir=.
5899    for ac_exec_ext in '' $ac_executable_extensions; do
5900  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5901    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5903    break 2
5904  fi
5905done
5906  done
5907IFS=$as_save_IFS
5908
5909  ;;
5910esac
5911fi
5912XARGS=$ac_cv_path_XARGS
5913if test -n "$XARGS"; then
5914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5915$as_echo "$XARGS" >&6; }
5916else
5917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5918$as_echo "no" >&6; }
5919fi
5920
5921
5922  test -n "$XARGS" && break
5923done
5924
5925
5926    if test "x$XARGS" = x; then
5927        if test "xxargs" = x; then
5928          PROG_NAME=xargs
5929        else
5930          PROG_NAME=xargs
5931        fi
5932        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5933$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5934        as_fn_error $? "Cannot continue" "$LINENO" 5
5935    fi
5936
5937
5938
5939# Then required tools that require some special treatment.
5940for ac_prog in gawk mawk nawk awk
5941do
5942  # Extract the first word of "$ac_prog", so it can be a program name with args.
5943set dummy $ac_prog; ac_word=$2
5944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5945$as_echo_n "checking for $ac_word... " >&6; }
5946if test "${ac_cv_prog_AWK+set}" = set; then :
5947  $as_echo_n "(cached) " >&6
5948else
5949  if test -n "$AWK"; then
5950  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5951else
5952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5953for as_dir in $PATH
5954do
5955  IFS=$as_save_IFS
5956  test -z "$as_dir" && as_dir=.
5957    for ac_exec_ext in '' $ac_executable_extensions; do
5958  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5959    ac_cv_prog_AWK="$ac_prog"
5960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5961    break 2
5962  fi
5963done
5964  done
5965IFS=$as_save_IFS
5966
5967fi
5968fi
5969AWK=$ac_cv_prog_AWK
5970if test -n "$AWK"; then
5971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5972$as_echo "$AWK" >&6; }
5973else
5974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5975$as_echo "no" >&6; }
5976fi
5977
5978
5979  test -n "$AWK" && break
5980done
5981
5982
5983    if test "x$AWK" = x; then
5984        if test "x" = x; then
5985          PROG_NAME=awk
5986        else
5987          PROG_NAME=
5988        fi
5989        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5990$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5991        as_fn_error $? "Cannot continue" "$LINENO" 5
5992    fi
5993
5994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5995$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5996if test "${ac_cv_path_GREP+set}" = set; then :
5997  $as_echo_n "(cached) " >&6
5998else
5999  if test -z "$GREP"; then
6000  ac_path_GREP_found=false
6001  # Loop through the user's path and test for each of PROGNAME-LIST
6002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6003for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6004do
6005  IFS=$as_save_IFS
6006  test -z "$as_dir" && as_dir=.
6007    for ac_prog in grep ggrep; do
6008    for ac_exec_ext in '' $ac_executable_extensions; do
6009      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6010      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6011# Check for GNU ac_path_GREP and select it if it is found.
6012  # Check for GNU $ac_path_GREP
6013case `"$ac_path_GREP" --version 2>&1` in
6014*GNU*)
6015  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6016*)
6017  ac_count=0
6018  $as_echo_n 0123456789 >"conftest.in"
6019  while :
6020  do
6021    cat "conftest.in" "conftest.in" >"conftest.tmp"
6022    mv "conftest.tmp" "conftest.in"
6023    cp "conftest.in" "conftest.nl"
6024    $as_echo 'GREP' >> "conftest.nl"
6025    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6026    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6027    as_fn_arith $ac_count + 1 && ac_count=$as_val
6028    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6029      # Best one so far, save it but keep looking for a better one
6030      ac_cv_path_GREP="$ac_path_GREP"
6031      ac_path_GREP_max=$ac_count
6032    fi
6033    # 10*(2^10) chars as input seems more than enough
6034    test $ac_count -gt 10 && break
6035  done
6036  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6037esac
6038
6039      $ac_path_GREP_found && break 3
6040    done
6041  done
6042  done
6043IFS=$as_save_IFS
6044  if test -z "$ac_cv_path_GREP"; then
6045    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6046  fi
6047else
6048  ac_cv_path_GREP=$GREP
6049fi
6050
6051fi
6052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6053$as_echo "$ac_cv_path_GREP" >&6; }
6054 GREP="$ac_cv_path_GREP"
6055
6056
6057
6058    if test "x$GREP" = x; then
6059        if test "x" = x; then
6060          PROG_NAME=grep
6061        else
6062          PROG_NAME=
6063        fi
6064        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6065$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6066        as_fn_error $? "Cannot continue" "$LINENO" 5
6067    fi
6068
6069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6070$as_echo_n "checking for egrep... " >&6; }
6071if test "${ac_cv_path_EGREP+set}" = set; then :
6072  $as_echo_n "(cached) " >&6
6073else
6074  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6075   then ac_cv_path_EGREP="$GREP -E"
6076   else
6077     if test -z "$EGREP"; then
6078  ac_path_EGREP_found=false
6079  # Loop through the user's path and test for each of PROGNAME-LIST
6080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6081for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6082do
6083  IFS=$as_save_IFS
6084  test -z "$as_dir" && as_dir=.
6085    for ac_prog in egrep; do
6086    for ac_exec_ext in '' $ac_executable_extensions; do
6087      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6088      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6089# Check for GNU ac_path_EGREP and select it if it is found.
6090  # Check for GNU $ac_path_EGREP
6091case `"$ac_path_EGREP" --version 2>&1` in
6092*GNU*)
6093  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6094*)
6095  ac_count=0
6096  $as_echo_n 0123456789 >"conftest.in"
6097  while :
6098  do
6099    cat "conftest.in" "conftest.in" >"conftest.tmp"
6100    mv "conftest.tmp" "conftest.in"
6101    cp "conftest.in" "conftest.nl"
6102    $as_echo 'EGREP' >> "conftest.nl"
6103    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6104    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6105    as_fn_arith $ac_count + 1 && ac_count=$as_val
6106    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6107      # Best one so far, save it but keep looking for a better one
6108      ac_cv_path_EGREP="$ac_path_EGREP"
6109      ac_path_EGREP_max=$ac_count
6110    fi
6111    # 10*(2^10) chars as input seems more than enough
6112    test $ac_count -gt 10 && break
6113  done
6114  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6115esac
6116
6117      $ac_path_EGREP_found && break 3
6118    done
6119  done
6120  done
6121IFS=$as_save_IFS
6122  if test -z "$ac_cv_path_EGREP"; then
6123    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6124  fi
6125else
6126  ac_cv_path_EGREP=$EGREP
6127fi
6128
6129   fi
6130fi
6131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6132$as_echo "$ac_cv_path_EGREP" >&6; }
6133 EGREP="$ac_cv_path_EGREP"
6134
6135
6136
6137    if test "x$EGREP" = x; then
6138        if test "x" = x; then
6139          PROG_NAME=egrep
6140        else
6141          PROG_NAME=
6142        fi
6143        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6144$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6145        as_fn_error $? "Cannot continue" "$LINENO" 5
6146    fi
6147
6148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6149$as_echo_n "checking for fgrep... " >&6; }
6150if test "${ac_cv_path_FGREP+set}" = set; then :
6151  $as_echo_n "(cached) " >&6
6152else
6153  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6154   then ac_cv_path_FGREP="$GREP -F"
6155   else
6156     if test -z "$FGREP"; then
6157  ac_path_FGREP_found=false
6158  # Loop through the user's path and test for each of PROGNAME-LIST
6159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6160for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6161do
6162  IFS=$as_save_IFS
6163  test -z "$as_dir" && as_dir=.
6164    for ac_prog in fgrep; do
6165    for ac_exec_ext in '' $ac_executable_extensions; do
6166      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6167      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6168# Check for GNU ac_path_FGREP and select it if it is found.
6169  # Check for GNU $ac_path_FGREP
6170case `"$ac_path_FGREP" --version 2>&1` in
6171*GNU*)
6172  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6173*)
6174  ac_count=0
6175  $as_echo_n 0123456789 >"conftest.in"
6176  while :
6177  do
6178    cat "conftest.in" "conftest.in" >"conftest.tmp"
6179    mv "conftest.tmp" "conftest.in"
6180    cp "conftest.in" "conftest.nl"
6181    $as_echo 'FGREP' >> "conftest.nl"
6182    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6183    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6184    as_fn_arith $ac_count + 1 && ac_count=$as_val
6185    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6186      # Best one so far, save it but keep looking for a better one
6187      ac_cv_path_FGREP="$ac_path_FGREP"
6188      ac_path_FGREP_max=$ac_count
6189    fi
6190    # 10*(2^10) chars as input seems more than enough
6191    test $ac_count -gt 10 && break
6192  done
6193  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6194esac
6195
6196      $ac_path_FGREP_found && break 3
6197    done
6198  done
6199  done
6200IFS=$as_save_IFS
6201  if test -z "$ac_cv_path_FGREP"; then
6202    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6203  fi
6204else
6205  ac_cv_path_FGREP=$FGREP
6206fi
6207
6208   fi
6209fi
6210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6211$as_echo "$ac_cv_path_FGREP" >&6; }
6212 FGREP="$ac_cv_path_FGREP"
6213
6214
6215
6216    if test "x$FGREP" = x; then
6217        if test "x" = x; then
6218          PROG_NAME=fgrep
6219        else
6220          PROG_NAME=
6221        fi
6222        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6223$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6224        as_fn_error $? "Cannot continue" "$LINENO" 5
6225    fi
6226
6227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6228$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6229if test "${ac_cv_path_SED+set}" = set; then :
6230  $as_echo_n "(cached) " >&6
6231else
6232            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6233     for ac_i in 1 2 3 4 5 6 7; do
6234       ac_script="$ac_script$as_nl$ac_script"
6235     done
6236     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6237     { ac_script=; unset ac_script;}
6238     if test -z "$SED"; then
6239  ac_path_SED_found=false
6240  # Loop through the user's path and test for each of PROGNAME-LIST
6241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6242for as_dir in $PATH
6243do
6244  IFS=$as_save_IFS
6245  test -z "$as_dir" && as_dir=.
6246    for ac_prog in sed gsed; do
6247    for ac_exec_ext in '' $ac_executable_extensions; do
6248      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6249      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6250# Check for GNU ac_path_SED and select it if it is found.
6251  # Check for GNU $ac_path_SED
6252case `"$ac_path_SED" --version 2>&1` in
6253*GNU*)
6254  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6255*)
6256  ac_count=0
6257  $as_echo_n 0123456789 >"conftest.in"
6258  while :
6259  do
6260    cat "conftest.in" "conftest.in" >"conftest.tmp"
6261    mv "conftest.tmp" "conftest.in"
6262    cp "conftest.in" "conftest.nl"
6263    $as_echo '' >> "conftest.nl"
6264    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6265    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6266    as_fn_arith $ac_count + 1 && ac_count=$as_val
6267    if test $ac_count -gt ${ac_path_SED_max-0}; then
6268      # Best one so far, save it but keep looking for a better one
6269      ac_cv_path_SED="$ac_path_SED"
6270      ac_path_SED_max=$ac_count
6271    fi
6272    # 10*(2^10) chars as input seems more than enough
6273    test $ac_count -gt 10 && break
6274  done
6275  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6276esac
6277
6278      $ac_path_SED_found && break 3
6279    done
6280  done
6281  done
6282IFS=$as_save_IFS
6283  if test -z "$ac_cv_path_SED"; then
6284    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6285  fi
6286else
6287  ac_cv_path_SED=$SED
6288fi
6289
6290fi
6291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6292$as_echo "$ac_cv_path_SED" >&6; }
6293 SED="$ac_cv_path_SED"
6294  rm -f conftest.sed
6295
6296
6297    if test "x$SED" = x; then
6298        if test "x" = x; then
6299          PROG_NAME=sed
6300        else
6301          PROG_NAME=
6302        fi
6303        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6304$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6305        as_fn_error $? "Cannot continue" "$LINENO" 5
6306    fi
6307
6308
6309for ac_prog in nawk gawk awk
6310do
6311  # Extract the first word of "$ac_prog", so it can be a program name with args.
6312set dummy $ac_prog; ac_word=$2
6313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6314$as_echo_n "checking for $ac_word... " >&6; }
6315if test "${ac_cv_path_NAWK+set}" = set; then :
6316  $as_echo_n "(cached) " >&6
6317else
6318  case $NAWK in
6319  [\\/]* | ?:[\\/]*)
6320  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6321  ;;
6322  *)
6323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6324for as_dir in $PATH
6325do
6326  IFS=$as_save_IFS
6327  test -z "$as_dir" && as_dir=.
6328    for ac_exec_ext in '' $ac_executable_extensions; do
6329  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6330    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6332    break 2
6333  fi
6334done
6335  done
6336IFS=$as_save_IFS
6337
6338  ;;
6339esac
6340fi
6341NAWK=$ac_cv_path_NAWK
6342if test -n "$NAWK"; then
6343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6344$as_echo "$NAWK" >&6; }
6345else
6346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6347$as_echo "no" >&6; }
6348fi
6349
6350
6351  test -n "$NAWK" && break
6352done
6353
6354
6355    if test "x$NAWK" = x; then
6356        if test "x" = x; then
6357          PROG_NAME=nawk
6358        else
6359          PROG_NAME=
6360        fi
6361        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6362$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6363        as_fn_error $? "Cannot continue" "$LINENO" 5
6364    fi
6365
6366
6367# Always force rm.
6368RM="$RM -f"
6369
6370# pwd behaves differently on various platforms and some don't support the -L flag.
6371# Always use the bash builtin pwd to get uniform behavior.
6372THEPWDCMD=pwd
6373
6374# These are not required on all platforms
6375# Extract the first word of "cygpath", so it can be a program name with args.
6376set dummy cygpath; ac_word=$2
6377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6378$as_echo_n "checking for $ac_word... " >&6; }
6379if test "${ac_cv_path_CYGPATH+set}" = set; then :
6380  $as_echo_n "(cached) " >&6
6381else
6382  case $CYGPATH in
6383  [\\/]* | ?:[\\/]*)
6384  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6385  ;;
6386  *)
6387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6388for as_dir in $PATH
6389do
6390  IFS=$as_save_IFS
6391  test -z "$as_dir" && as_dir=.
6392    for ac_exec_ext in '' $ac_executable_extensions; do
6393  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6394    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6396    break 2
6397  fi
6398done
6399  done
6400IFS=$as_save_IFS
6401
6402  ;;
6403esac
6404fi
6405CYGPATH=$ac_cv_path_CYGPATH
6406if test -n "$CYGPATH"; then
6407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6408$as_echo "$CYGPATH" >&6; }
6409else
6410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6411$as_echo "no" >&6; }
6412fi
6413
6414
6415# Extract the first word of "readlink", so it can be a program name with args.
6416set dummy readlink; ac_word=$2
6417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6418$as_echo_n "checking for $ac_word... " >&6; }
6419if test "${ac_cv_path_READLINK+set}" = set; then :
6420  $as_echo_n "(cached) " >&6
6421else
6422  case $READLINK in
6423  [\\/]* | ?:[\\/]*)
6424  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6425  ;;
6426  *)
6427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6428for as_dir in $PATH
6429do
6430  IFS=$as_save_IFS
6431  test -z "$as_dir" && as_dir=.
6432    for ac_exec_ext in '' $ac_executable_extensions; do
6433  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6434    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6436    break 2
6437  fi
6438done
6439  done
6440IFS=$as_save_IFS
6441
6442  ;;
6443esac
6444fi
6445READLINK=$ac_cv_path_READLINK
6446if test -n "$READLINK"; then
6447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6448$as_echo "$READLINK" >&6; }
6449else
6450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451$as_echo "no" >&6; }
6452fi
6453
6454
6455# Extract the first word of "df", so it can be a program name with args.
6456set dummy df; ac_word=$2
6457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6458$as_echo_n "checking for $ac_word... " >&6; }
6459if test "${ac_cv_path_DF+set}" = set; then :
6460  $as_echo_n "(cached) " >&6
6461else
6462  case $DF in
6463  [\\/]* | ?:[\\/]*)
6464  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6465  ;;
6466  *)
6467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6468for as_dir in $PATH
6469do
6470  IFS=$as_save_IFS
6471  test -z "$as_dir" && as_dir=.
6472    for ac_exec_ext in '' $ac_executable_extensions; do
6473  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6474    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6476    break 2
6477  fi
6478done
6479  done
6480IFS=$as_save_IFS
6481
6482  ;;
6483esac
6484fi
6485DF=$ac_cv_path_DF
6486if test -n "$DF"; then
6487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6488$as_echo "$DF" >&6; }
6489else
6490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6491$as_echo "no" >&6; }
6492fi
6493
6494
6495# Extract the first word of "SetFile", so it can be a program name with args.
6496set dummy SetFile; ac_word=$2
6497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6498$as_echo_n "checking for $ac_word... " >&6; }
6499if test "${ac_cv_path_SETFILE+set}" = set; then :
6500  $as_echo_n "(cached) " >&6
6501else
6502  case $SETFILE in
6503  [\\/]* | ?:[\\/]*)
6504  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6505  ;;
6506  *)
6507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6508for as_dir in $PATH
6509do
6510  IFS=$as_save_IFS
6511  test -z "$as_dir" && as_dir=.
6512    for ac_exec_ext in '' $ac_executable_extensions; do
6513  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6514    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6516    break 2
6517  fi
6518done
6519  done
6520IFS=$as_save_IFS
6521
6522  ;;
6523esac
6524fi
6525SETFILE=$ac_cv_path_SETFILE
6526if test -n "$SETFILE"; then
6527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6528$as_echo "$SETFILE" >&6; }
6529else
6530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; }
6532fi
6533
6534
6535
6536
6537# Now we can determine OpenJDK build and target platforms. This is required to
6538# have early on.
6539# Make sure we can run config.sub.
6540$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6541  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6542
6543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6544$as_echo_n "checking build system type... " >&6; }
6545if test "${ac_cv_build+set}" = set; then :
6546  $as_echo_n "(cached) " >&6
6547else
6548  ac_build_alias=$build_alias
6549test "x$ac_build_alias" = x &&
6550  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6551test "x$ac_build_alias" = x &&
6552  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6553ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6554  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6555
6556fi
6557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6558$as_echo "$ac_cv_build" >&6; }
6559case $ac_cv_build in
6560*-*-*) ;;
6561*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6562esac
6563build=$ac_cv_build
6564ac_save_IFS=$IFS; IFS='-'
6565set x $ac_cv_build
6566shift
6567build_cpu=$1
6568build_vendor=$2
6569shift; shift
6570# Remember, the first character of IFS is used to create $*,
6571# except with old shells:
6572build_os=$*
6573IFS=$ac_save_IFS
6574case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6575
6576
6577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6578$as_echo_n "checking host system type... " >&6; }
6579if test "${ac_cv_host+set}" = set; then :
6580  $as_echo_n "(cached) " >&6
6581else
6582  if test "x$host_alias" = x; then
6583  ac_cv_host=$ac_cv_build
6584else
6585  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6586    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6587fi
6588
6589fi
6590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6591$as_echo "$ac_cv_host" >&6; }
6592case $ac_cv_host in
6593*-*-*) ;;
6594*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6595esac
6596host=$ac_cv_host
6597ac_save_IFS=$IFS; IFS='-'
6598set x $ac_cv_host
6599shift
6600host_cpu=$1
6601host_vendor=$2
6602shift; shift
6603# Remember, the first character of IFS is used to create $*,
6604# except with old shells:
6605host_os=$*
6606IFS=$ac_save_IFS
6607case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6608
6609
6610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6611$as_echo_n "checking target system type... " >&6; }
6612if test "${ac_cv_target+set}" = set; then :
6613  $as_echo_n "(cached) " >&6
6614else
6615  if test "x$target_alias" = x; then
6616  ac_cv_target=$ac_cv_host
6617else
6618  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6619    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6620fi
6621
6622fi
6623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6624$as_echo "$ac_cv_target" >&6; }
6625case $ac_cv_target in
6626*-*-*) ;;
6627*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6628esac
6629target=$ac_cv_target
6630ac_save_IFS=$IFS; IFS='-'
6631set x $ac_cv_target
6632shift
6633target_cpu=$1
6634target_vendor=$2
6635shift; shift
6636# Remember, the first character of IFS is used to create $*,
6637# except with old shells:
6638target_os=$*
6639IFS=$ac_save_IFS
6640case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6641
6642
6643# The aliases save the names the user supplied, while $host etc.
6644# will get canonicalized.
6645test -n "$target_alias" &&
6646  test "$program_prefix$program_suffix$program_transform_name" = \
6647    NONENONEs,x,x, &&
6648  program_prefix=${target_alias}-
6649
6650# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6651# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6652# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6653# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6654# to use the configure naming style.
6655
6656
6657
6658
6659
6660    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6661    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6662    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6663    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6664    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6665    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6666
6667
6668
6669    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6670
6671  case "$build_os" in
6672    *linux*)
6673      VAR_OS=linux
6674      VAR_OS_API=posix
6675      VAR_OS_ENV=linux
6676      ;;
6677    *solaris*)
6678      VAR_OS=solaris
6679      VAR_OS_API=posix
6680      VAR_OS_ENV=solaris
6681      ;;
6682    *darwin*)
6683      VAR_OS=macosx
6684      VAR_OS_API=posix
6685      VAR_OS_ENV=macosx
6686      ;;
6687    *bsd*)
6688      VAR_OS=bsd
6689      VAR_OS_API=posix
6690      VAR_OS_ENV=bsd
6691      ;;
6692    *cygwin*)
6693      VAR_OS=windows
6694      VAR_OS_API=winapi
6695      VAR_OS_ENV=windows.cygwin
6696      ;;
6697    *mingw*)
6698      VAR_OS=windows
6699      VAR_OS_API=winapi
6700      VAR_OS_ENV=windows.msys
6701      ;;
6702    *)
6703      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6704      ;;
6705  esac
6706
6707
6708  # First argument is the cpu name from the trip/quad
6709  case "$build_cpu" in
6710    x86_64)
6711      VAR_CPU=x86_64
6712      VAR_CPU_ARCH=x86
6713      VAR_CPU_BITS=64
6714      VAR_CPU_ENDIAN=little
6715      ;;
6716    i?86)
6717      VAR_CPU=x86
6718      VAR_CPU_ARCH=x86
6719      VAR_CPU_BITS=32
6720      VAR_CPU_ENDIAN=little
6721      ;;
6722    arm*)
6723      VAR_CPU=arm
6724      VAR_CPU_ARCH=arm
6725      VAR_CPU_BITS=32
6726      VAR_CPU_ENDIAN=little
6727      ;;
6728    powerpc)
6729      VAR_CPU=ppc
6730      VAR_CPU_ARCH=ppc
6731      VAR_CPU_BITS=32
6732      VAR_CPU_ENDIAN=big
6733       ;;
6734    powerpc64)
6735      VAR_CPU=ppc64
6736      VAR_CPU_ARCH=ppc
6737      VAR_CPU_BITS=64
6738      VAR_CPU_ENDIAN=big
6739       ;;
6740    sparc)
6741      VAR_CPU=sparc
6742      VAR_CPU_ARCH=sparc
6743      VAR_CPU_BITS=32
6744      VAR_CPU_ENDIAN=big
6745       ;;
6746    sparcv9)
6747      VAR_CPU=sparcv9
6748      VAR_CPU_ARCH=sparc
6749      VAR_CPU_BITS=64
6750      VAR_CPU_ENDIAN=big
6751       ;;
6752    *)
6753      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6754      ;;
6755  esac
6756
6757    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6758    OPENJDK_BUILD_OS="$VAR_OS"
6759    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6760    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6761    OPENJDK_BUILD_CPU="$VAR_CPU"
6762    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6763    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6764    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6765
6766
6767
6768
6769
6770
6771
6772    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6773$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6775$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6776
6777    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6778
6779  case "$host_os" in
6780    *linux*)
6781      VAR_OS=linux
6782      VAR_OS_API=posix
6783      VAR_OS_ENV=linux
6784      ;;
6785    *solaris*)
6786      VAR_OS=solaris
6787      VAR_OS_API=posix
6788      VAR_OS_ENV=solaris
6789      ;;
6790    *darwin*)
6791      VAR_OS=macosx
6792      VAR_OS_API=posix
6793      VAR_OS_ENV=macosx
6794      ;;
6795    *bsd*)
6796      VAR_OS=bsd
6797      VAR_OS_API=posix
6798      VAR_OS_ENV=bsd
6799      ;;
6800    *cygwin*)
6801      VAR_OS=windows
6802      VAR_OS_API=winapi
6803      VAR_OS_ENV=windows.cygwin
6804      ;;
6805    *mingw*)
6806      VAR_OS=windows
6807      VAR_OS_API=winapi
6808      VAR_OS_ENV=windows.msys
6809      ;;
6810    *)
6811      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6812      ;;
6813  esac
6814
6815
6816  # First argument is the cpu name from the trip/quad
6817  case "$host_cpu" in
6818    x86_64)
6819      VAR_CPU=x86_64
6820      VAR_CPU_ARCH=x86
6821      VAR_CPU_BITS=64
6822      VAR_CPU_ENDIAN=little
6823      ;;
6824    i?86)
6825      VAR_CPU=x86
6826      VAR_CPU_ARCH=x86
6827      VAR_CPU_BITS=32
6828      VAR_CPU_ENDIAN=little
6829      ;;
6830    arm*)
6831      VAR_CPU=arm
6832      VAR_CPU_ARCH=arm
6833      VAR_CPU_BITS=32
6834      VAR_CPU_ENDIAN=little
6835      ;;
6836    powerpc)
6837      VAR_CPU=ppc
6838      VAR_CPU_ARCH=ppc
6839      VAR_CPU_BITS=32
6840      VAR_CPU_ENDIAN=big
6841       ;;
6842    powerpc64)
6843      VAR_CPU=ppc64
6844      VAR_CPU_ARCH=ppc
6845      VAR_CPU_BITS=64
6846      VAR_CPU_ENDIAN=big
6847       ;;
6848    sparc)
6849      VAR_CPU=sparc
6850      VAR_CPU_ARCH=sparc
6851      VAR_CPU_BITS=32
6852      VAR_CPU_ENDIAN=big
6853       ;;
6854    sparcv9)
6855      VAR_CPU=sparcv9
6856      VAR_CPU_ARCH=sparc
6857      VAR_CPU_BITS=64
6858      VAR_CPU_ENDIAN=big
6859       ;;
6860    *)
6861      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6862      ;;
6863  esac
6864
6865    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6866    OPENJDK_TARGET_OS="$VAR_OS"
6867    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6868    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6869    OPENJDK_TARGET_CPU="$VAR_CPU"
6870    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6871    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6872    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6873
6874
6875
6876
6877
6878
6879
6880    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6881$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6883$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6884
6885
6886
6887# Check whether --with-target-bits was given.
6888if test "${with_target_bits+set}" = set; then :
6889  withval=$with_target_bits;
6890fi
6891
6892
6893  # We have three types of compiles:
6894  # native  == normal compilation, target system == build system
6895  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6896  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6897  #
6898  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6899    # We're doing a proper cross-compilation
6900    COMPILE_TYPE="cross"
6901  else
6902    COMPILE_TYPE="native"
6903  fi
6904
6905  if test "x$with_target_bits" != x; then
6906    if test "x$COMPILE_TYPE" = "xcross"; then
6907      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6908    fi
6909
6910    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6911      # A reduced build is requested
6912      COMPILE_TYPE="reduced"
6913      OPENJDK_TARGET_CPU_BITS=32
6914      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6915        OPENJDK_TARGET_CPU=x86
6916      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6917        OPENJDK_TARGET_CPU=sparc
6918      else
6919        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6920      fi
6921    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6922      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
6923    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6924      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6925$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6926    else
6927      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6928    fi
6929  fi
6930
6931
6932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6933$as_echo_n "checking compilation type... " >&6; }
6934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6935$as_echo "$COMPILE_TYPE" >&6; }
6936
6937
6938    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6939       REQUIRED_OS_NAME=SunOS
6940       REQUIRED_OS_VERSION=5.10
6941    fi
6942    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6943       REQUIRED_OS_NAME=Linux
6944       REQUIRED_OS_VERSION=2.6
6945    fi
6946    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6947        REQUIRED_OS_NAME=Windows
6948        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6949            REQUIRED_OS_VERSION=5.2
6950        else
6951            REQUIRED_OS_VERSION=5.1
6952        fi
6953    fi
6954    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6955        REQUIRED_OS_NAME=Darwin
6956        REQUIRED_OS_VERSION=11.2
6957    fi
6958
6959
6960
6961
6962
6963    # Also store the legacy naming of the cpu.
6964    # Ie i586 and amd64 instead of x86 and x86_64
6965    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6966    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6967      OPENJDK_TARGET_CPU_LEGACY="i586"
6968    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6969      # On all platforms except MacOSX replace x86_64 with amd64.
6970      OPENJDK_TARGET_CPU_LEGACY="amd64"
6971    fi
6972
6973
6974    # And the second legacy naming of the cpu.
6975    # Ie i386 and amd64 instead of x86 and x86_64.
6976    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6977    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6978      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6979    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6980      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6981    fi
6982
6983
6984    # This is the name of the cpu (but using i386 and amd64 instead of
6985    # x86 and x86_64, respectively), preceeded by a /, to be used when
6986    # locating libraries. On macosx, it's empty, though.
6987    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6988    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6989        OPENJDK_TARGET_CPU_LIBDIR=""
6990    fi
6991
6992
6993    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6994    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6995    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6996    OPENJDK_TARGET_CPU_ISADIR=""
6997    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6998      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6999          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7000      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7001          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7002      fi
7003    fi
7004
7005
7006    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7007    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7008    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7009      # On linux only, we replace x86 with i386.
7010      OPENJDK_TARGET_CPU_OSARCH="i386"
7011    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7012      # On all platforms except macosx, we replace x86_64 with amd64.
7013      OPENJDK_TARGET_CPU_OSARCH="amd64"
7014    fi
7015
7016
7017    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7018    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7019      OPENJDK_TARGET_CPU_JLI="i386"
7020    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7021      # On all platforms except macosx, we replace x86_64 with amd64.
7022      OPENJDK_TARGET_CPU_JLI="amd64"
7023    fi
7024    # Now setup the -D flags for building libjli.
7025    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7026    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7027      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7028        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7029      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7030        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7031      fi
7032    fi
7033
7034
7035    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7036    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7037        OPENJDK_TARGET_OS_API_DIR="solaris"
7038    fi
7039    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7040        OPENJDK_TARGET_OS_API_DIR="windows"
7041    fi
7042
7043
7044    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7045        A_LP64="LP64:="
7046        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7047        # unpack200.exe
7048        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7049            ADD_LP64="-D_LP64=1"
7050        fi
7051    fi
7052    LP64=$A_LP64
7053
7054
7055    if test "x$COMPILE_TYPE" = "xcross"; then
7056      # FIXME: ... or should this include reduced builds..?
7057      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7058    else
7059      DEFINE_CROSS_COMPILE_ARCH=""
7060    fi
7061
7062
7063    # ZERO_ARCHDEF is used to enable architecture-specific code
7064    case "${OPENJDK_TARGET_CPU}" in
7065      ppc*)    ZERO_ARCHDEF=PPC   ;;
7066      s390*)   ZERO_ARCHDEF=S390  ;;
7067      sparc*)  ZERO_ARCHDEF=SPARC ;;
7068      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7069      x86)     ZERO_ARCHDEF=IA32  ;;
7070      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7071    esac
7072
7073
7074
7075
7076
7077# Continue setting up basic stuff. Most remaining code require fundamental tools.
7078
7079# Locate the directory of this script.
7080SCRIPT="$0"
7081AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7082
7083# Where is the source? It is located two levels above the configure script.
7084CURDIR="$PWD"
7085cd "$AUTOCONF_DIR/../.."
7086SRC_ROOT="`$THEPWDCMD -L`"
7087
7088if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7089  PATH_SEP=";"
7090
7091  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7092  if test $SRC_ROOT_LENGTH -gt 100; then
7093      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7094  fi
7095
7096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7097    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7098$as_echo_n "checking cygwin release... " >&6; }
7099    CYGWIN_VERSION=`$UNAME -r`
7100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7101$as_echo "$CYGWIN_VERSION" >&6; }
7102    WINDOWS_ENV_VENDOR='cygwin'
7103    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7104
7105    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7106    if test "x$CYGWIN_VERSION_OK" = x; then
7107      { $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
7108$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;}
7109      as_fn_error $? "Cannot continue" "$LINENO" 5
7110    fi
7111    if test "x$CYGPATH" = x; then
7112        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7113    fi
7114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7115$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7116    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7117    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7118    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7119    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7121$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7122    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7123    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7124    if test "x$test_cygdrive_prefix" = x; then
7125        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7126    fi
7127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7129$as_echo_n "checking msys release... " >&6; }
7130    MSYS_VERSION=`$UNAME -r`
7131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7132$as_echo "$MSYS_VERSION" >&6; }
7133
7134    WINDOWS_ENV_VENDOR='msys'
7135    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7136
7137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7138$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7139    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7140    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7141
7142  windows_path="$MSYS_ROOT_PATH"
7143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7144    unix_path=`$CYGPATH -u "$windows_path"`
7145    MSYS_ROOT_PATH="$unix_path"
7146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7148    MSYS_ROOT_PATH="$unix_path"
7149  fi
7150
7151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7152$as_echo "$MSYS_ROOT_PATH" >&6; }
7153    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7154  else
7155    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7156  fi
7157
7158  # Test if windows or unix (cygwin/msys) find is first in path.
7159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7160$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7161  FIND_BINARY_OUTPUT=`find --version 2>&1`
7162  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7164$as_echo "unix style" >&6; }
7165  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7167$as_echo "Windows" >&6; }
7168    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7169$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7170    { $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
7171$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7172    as_fn_error $? "Cannot continue" "$LINENO" 5
7173  else
7174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7175$as_echo "unknown" >&6; }
7176    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7177$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7178  fi
7179
7180else
7181  PATH_SEP=":"
7182fi
7183
7184
7185
7186cd "$CURDIR"
7187
7188
7189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7190
7191  # Input might be given as Windows format, start by converting to
7192  # unix format.
7193  path="$SRC_ROOT"
7194  new_path=`$CYGPATH -u "$path"`
7195
7196  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7197  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7198  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7199  # "foo.exe" is OK but "foo" is an error.
7200  #
7201  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7202  # It is also a way to make sure we got the proper file name for the real test later on.
7203  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7204  if test "x$test_shortpath" = x; then
7205    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7206$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7207    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7208  fi
7209
7210  # Call helper function which possibly converts this using DOS-style short mode.
7211  # If so, the updated path is stored in $new_path.
7212
7213  input_path="$new_path"
7214  # Check if we need to convert this using DOS-style short mode. If the path
7215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7216  # take no chances and rewrite it.
7217  # Note: m4 eats our [], so we need to use [ and ] instead.
7218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7219  if test "x$has_forbidden_chars" != x; then
7220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7221    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7222    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7223    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7224      # Going to short mode and back again did indeed matter. Since short mode is
7225      # case insensitive, let's make it lowercase to improve readability.
7226      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7227      # Now convert it back to Unix-stile (cygpath)
7228      input_path=`$CYGPATH -u "$shortmode_path"`
7229      new_path="$input_path"
7230    fi
7231  fi
7232
7233  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7234  if test "x$test_cygdrive_prefix" = x; then
7235    # As a simple fix, exclude /usr/bin since it's not a real path.
7236    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7237      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7238      # a path prefixed by /cygdrive for fixpath to work.
7239      new_path="$CYGWIN_ROOT_PATH$input_path"
7240    fi
7241  fi
7242
7243
7244  if test "x$path" != "x$new_path"; then
7245    SRC_ROOT="$new_path"
7246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7247$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7248  fi
7249
7250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7251
7252  path="$SRC_ROOT"
7253  has_colon=`$ECHO $path | $GREP ^.:`
7254  new_path="$path"
7255  if test "x$has_colon" = x; then
7256    # Not in mixed or Windows style, start by that.
7257    new_path=`cmd //c echo $path`
7258  fi
7259
7260
7261  input_path="$new_path"
7262  # Check if we need to convert this using DOS-style short mode. If the path
7263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7264  # take no chances and rewrite it.
7265  # Note: m4 eats our [], so we need to use [ and ] instead.
7266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7267  if test "x$has_forbidden_chars" != x; then
7268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7270  fi
7271
7272
7273  windows_path="$new_path"
7274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7275    unix_path=`$CYGPATH -u "$windows_path"`
7276    new_path="$unix_path"
7277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7279    new_path="$unix_path"
7280  fi
7281
7282  if test "x$path" != "x$new_path"; then
7283    SRC_ROOT="$new_path"
7284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7285$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7286  fi
7287
7288  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7289  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7290
7291  else
7292    # We're on a posix platform. Hooray! :)
7293    path="$SRC_ROOT"
7294    has_space=`$ECHO "$path" | $GREP " "`
7295    if test "x$has_space" != x; then
7296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7297$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7298      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7299    fi
7300
7301    # Use eval to expand a potential ~
7302    eval path="$path"
7303    if test ! -f "$path" && test ! -d "$path"; then
7304      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7305    fi
7306
7307    SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7308  fi
7309
7310
7311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7312
7313  # Input might be given as Windows format, start by converting to
7314  # unix format.
7315  path="$CURDIR"
7316  new_path=`$CYGPATH -u "$path"`
7317
7318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7321  # "foo.exe" is OK but "foo" is an error.
7322  #
7323  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7324  # It is also a way to make sure we got the proper file name for the real test later on.
7325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7326  if test "x$test_shortpath" = x; then
7327    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7328$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7329    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7330  fi
7331
7332  # Call helper function which possibly converts this using DOS-style short mode.
7333  # If so, the updated path is stored in $new_path.
7334
7335  input_path="$new_path"
7336  # Check if we need to convert this using DOS-style short mode. If the path
7337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7338  # take no chances and rewrite it.
7339  # Note: m4 eats our [], so we need to use [ and ] instead.
7340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7341  if test "x$has_forbidden_chars" != x; then
7342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7346      # Going to short mode and back again did indeed matter. Since short mode is
7347      # case insensitive, let's make it lowercase to improve readability.
7348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7349      # Now convert it back to Unix-stile (cygpath)
7350      input_path=`$CYGPATH -u "$shortmode_path"`
7351      new_path="$input_path"
7352    fi
7353  fi
7354
7355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7356  if test "x$test_cygdrive_prefix" = x; then
7357    # As a simple fix, exclude /usr/bin since it's not a real path.
7358    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7360      # a path prefixed by /cygdrive for fixpath to work.
7361      new_path="$CYGWIN_ROOT_PATH$input_path"
7362    fi
7363  fi
7364
7365
7366  if test "x$path" != "x$new_path"; then
7367    CURDIR="$new_path"
7368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7369$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7370  fi
7371
7372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7373
7374  path="$CURDIR"
7375  has_colon=`$ECHO $path | $GREP ^.:`
7376  new_path="$path"
7377  if test "x$has_colon" = x; then
7378    # Not in mixed or Windows style, start by that.
7379    new_path=`cmd //c echo $path`
7380  fi
7381
7382
7383  input_path="$new_path"
7384  # Check if we need to convert this using DOS-style short mode. If the path
7385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7386  # take no chances and rewrite it.
7387  # Note: m4 eats our [], so we need to use [ and ] instead.
7388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7389  if test "x$has_forbidden_chars" != x; then
7390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7392  fi
7393
7394
7395  windows_path="$new_path"
7396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7397    unix_path=`$CYGPATH -u "$windows_path"`
7398    new_path="$unix_path"
7399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7401    new_path="$unix_path"
7402  fi
7403
7404  if test "x$path" != "x$new_path"; then
7405    CURDIR="$new_path"
7406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7407$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7408  fi
7409
7410  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7411  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7412
7413  else
7414    # We're on a posix platform. Hooray! :)
7415    path="$CURDIR"
7416    has_space=`$ECHO "$path" | $GREP " "`
7417    if test "x$has_space" != x; then
7418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7419$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7420      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7421    fi
7422
7423    # Use eval to expand a potential ~
7424    eval path="$path"
7425    if test ! -f "$path" && test ! -d "$path"; then
7426      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7427    fi
7428
7429    CURDIR="`cd "$path"; $THEPWDCMD -L`"
7430  fi
7431
7432
7433if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7434    # Add extra search paths on solaris for utilities like ar and as etc...
7435    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7436fi
7437
7438# You can force the sys-root if the sys-root encoded into the cross compiler tools
7439# is not correct.
7440
7441# Check whether --with-sys-root was given.
7442if test "${with_sys_root+set}" = set; then :
7443  withval=$with_sys_root;
7444fi
7445
7446
7447if test "x$with_sys_root" != x; then
7448  SYS_ROOT=$with_sys_root
7449else
7450  SYS_ROOT=/
7451fi
7452
7453
7454
7455# Check whether --with-tools-dir was given.
7456if test "${with_tools_dir+set}" = set; then :
7457  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7458fi
7459
7460
7461
7462# Check whether --with-devkit was given.
7463if test "${with_devkit+set}" = set; then :
7464  withval=$with_devkit;
7465    if test "x$with_sys_root" != x; then
7466      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7467    fi
7468    if test "x$with_tools_dir" != x; then
7469      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7470    fi
7471    TOOLS_DIR=$with_devkit/bin
7472    SYS_ROOT=$with_devkit/$host_alias/libc
7473
7474fi
7475
7476
7477
7478
7479# Setup default logging of stdout and stderr to build.log in the output root.
7480BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7481BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7482BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7483
7484
7485
7486
7487
7488# Check if it's a pure open build or if custom sources are to be used.
7489
7490  # Check whether --enable-openjdk-only was given.
7491if test "${enable_openjdk_only+set}" = set; then :
7492  enableval=$enable_openjdk_only;
7493else
7494  enable_openjdk_only="no"
7495fi
7496
7497
7498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7499$as_echo_n "checking for presence of closed sources... " >&6; }
7500  if test -d "$SRC_ROOT/jdk/src/closed"; then
7501    CLOSED_SOURCE_PRESENT=yes
7502  else
7503    CLOSED_SOURCE_PRESENT=no
7504  fi
7505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7506$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7507
7508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7509$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7510  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7512$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7513
7514  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7515    OPENJDK=true
7516    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7517      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7518$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7519    fi
7520  else
7521    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7522      OPENJDK=true
7523    else
7524      OPENJDK=false
7525    fi
7526  fi
7527
7528  if test "x$OPENJDK" = "xtrue"; then
7529    SET_OPENJDK="OPENJDK=true"
7530  fi
7531
7532
7533
7534
7535# These are needed to be able to create a configuration name (and thus the output directory)
7536
7537###############################################################################
7538#
7539# Check which variant of the JDK that we want to build.
7540# Currently we have:
7541#    normal:   standard edition
7542# but the custom make system may add other variants
7543#
7544# Effectively the JDK variant gives a name to a specific set of
7545# modules to compile into the JDK. In the future, these modules
7546# might even be Jigsaw modules.
7547#
7548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7549$as_echo_n "checking which variant of the JDK to build... " >&6; }
7550
7551# Check whether --with-jdk-variant was given.
7552if test "${with_jdk_variant+set}" = set; then :
7553  withval=$with_jdk_variant;
7554fi
7555
7556
7557if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7558    JDK_VARIANT="normal"
7559else
7560    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7561fi
7562
7563
7564
7565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7566$as_echo "$JDK_VARIANT" >&6; }
7567
7568
7569
7570###############################################################################
7571#
7572# Check which variants of the JVM that we want to build.
7573# Currently we have:
7574#    server: normal interpreter and a tiered C1/C2 compiler
7575#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7576#    minimal1: reduced form of client with optional VM services and features stripped out
7577#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7578#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7579#    zero: no machine code interpreter, no compiler
7580#    zeroshark: zero interpreter and shark/llvm compiler backend
7581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7582$as_echo_n "checking which variants of the JVM to build... " >&6; }
7583
7584# Check whether --with-jvm-variants was given.
7585if test "${with_jvm_variants+set}" = set; then :
7586  withval=$with_jvm_variants;
7587fi
7588
7589
7590if test "x$with_jvm_variants" = x; then
7591     with_jvm_variants="server"
7592fi
7593
7594JVM_VARIANTS=",$with_jvm_variants,"
7595TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7596
7597if test "x$TEST_VARIANTS" != "x,"; then
7598   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7599fi
7600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7601$as_echo "$with_jvm_variants" >&6; }
7602
7603JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7604JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7605JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7606JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7607JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7608JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7609
7610if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7611    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7612        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7613    fi
7614fi
7615if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7616    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7617        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7618    fi
7619fi
7620if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7621    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7622        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7623    fi
7624fi
7625
7626# Replace the commas with AND for use in the build directory name.
7627ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7628COUNT_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/'`
7629if test "x$COUNT_VARIANTS" != "x,1"; then
7630    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7631else
7632    BUILDING_MULTIPLE_JVM_VARIANTS=no
7633fi
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643INCLUDE_SA=true
7644if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7645    INCLUDE_SA=false
7646fi
7647if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7648    INCLUDE_SA=false
7649fi
7650
7651
7652if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7653   MACOSX_UNIVERSAL="true"
7654fi
7655
7656
7657
7658
7659
7660###############################################################################
7661#
7662# Set the debug level
7663#    release: no debug information, all optimizations, no asserts.
7664#    fastdebug: debug information (-g), all optimizations, all asserts
7665#    slowdebug: debug information (-g), no optimizations, all asserts
7666#
7667DEBUG_LEVEL="release"
7668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7669$as_echo_n "checking which debug level to use... " >&6; }
7670# Check whether --enable-debug was given.
7671if test "${enable_debug+set}" = set; then :
7672  enableval=$enable_debug;
7673        ENABLE_DEBUG="${enableval}"
7674        DEBUG_LEVEL="fastdebug"
7675
7676else
7677  ENABLE_DEBUG="no"
7678fi
7679
7680
7681
7682# Check whether --with-debug-level was given.
7683if test "${with_debug_level+set}" = set; then :
7684  withval=$with_debug_level;
7685        DEBUG_LEVEL="${withval}"
7686        if test "x$ENABLE_DEBUG" = xyes; then
7687			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7688        fi
7689
7690fi
7691
7692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7693$as_echo "$DEBUG_LEVEL" >&6; }
7694
7695if test "x$DEBUG_LEVEL" != xrelease && \
7696   test "x$DEBUG_LEVEL" != xfastdebug && \
7697   test "x$DEBUG_LEVEL" != xslowdebug; then
7698   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7699fi
7700
7701
7702###############################################################################
7703#
7704# Setup legacy vars/targets and new vars to deal with different debug levels.
7705#
7706
7707case $DEBUG_LEVEL in
7708      release )
7709          VARIANT="OPT"
7710          FASTDEBUG="false"
7711          DEBUG_CLASSFILES="false"
7712          BUILD_VARIANT_RELEASE=""
7713          HOTSPOT_DEBUG_LEVEL="product"
7714          HOTSPOT_EXPORT="product"
7715           ;;
7716      fastdebug )
7717          VARIANT="DBG"
7718          FASTDEBUG="true"
7719          DEBUG_CLASSFILES="true"
7720          BUILD_VARIANT_RELEASE="-fastdebug"
7721          HOTSPOT_DEBUG_LEVEL="fastdebug"
7722          HOTSPOT_EXPORT="fastdebug"
7723           ;;
7724      slowdebug )
7725          VARIANT="DBG"
7726          FASTDEBUG="false"
7727          DEBUG_CLASSFILES="true"
7728          BUILD_VARIANT_RELEASE="-debug"
7729          HOTSPOT_DEBUG_LEVEL="jvmg"
7730          HOTSPOT_EXPORT="debug"
7731           ;;
7732esac
7733
7734#####
7735# Generate the legacy makefile targets for hotspot.
7736# The hotspot api for selecting the build artifacts, really, needs to be improved.
7737# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7738# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7739# But until then ...
7740HOTSPOT_TARGET=""
7741
7742if test "x$JVM_VARIANT_SERVER" = xtrue; then
7743    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7744fi
7745
7746if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7747    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7748fi
7749
7750if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7751    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7752fi
7753
7754if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7755    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7756fi
7757
7758if test "x$JVM_VARIANT_ZERO" = xtrue; then
7759    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7760fi
7761
7762if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7763    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7764fi
7765
7766HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7767
7768# On Macosx universal binaries are produced, but they only contain
7769# 64 bit intel. This invalidates control of which jvms are built
7770# from configure, but only server is valid anyway. Fix this
7771# when hotspot makefiles are rewritten.
7772if test "x$MACOSX_UNIVERSAL" = xtrue; then
7773    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7774fi
7775
7776#####
7777
7778
7779
7780
7781
7782
7783
7784
7785# With basic setup done, call the custom early hook.
7786
7787
7788# To properly create a configuration name, we need to have the OpenJDK target
7789# and options (variants and debug level) parsed.
7790
7791
7792
7793# Check whether --with-conf-name was given.
7794if test "${with_conf_name+set}" = set; then :
7795  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7796fi
7797
7798
7799# Test from where we are running configure, in or outside of src root.
7800if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7801        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7802        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7803    # We are running configure from the src root.
7804    # Create a default ./build/target-variant-debuglevel output root.
7805    if test "x${CONF_NAME}" = x; then
7806        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7807    fi
7808    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7809    $MKDIR -p "$OUTPUT_ROOT"
7810    if test ! -d "$OUTPUT_ROOT"; then
7811        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7812    fi
7813else
7814    # We are running configure from outside of the src dir.
7815    # Then use the current directory as output dir!
7816    # If configuration is situated in normal build directory, just use the build
7817    # directory name as configuration name, otherwise use the complete path.
7818    if test "x${CONF_NAME}" = x; then
7819        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7820    fi
7821    OUTPUT_ROOT="$CURDIR"
7822
7823    # WARNING: This might be a bad thing to do. You need to be sure you want to
7824    # have a configuration in this directory. Do some sanity checks!
7825
7826    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7827      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7828      # other files
7829      files_present=`$LS $OUTPUT_ROOT`
7830      # Configure has already touched config.log and confdefs.h in the current dir when this check
7831      # is performed.
7832      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7833                                             | $TR -d '\n'`
7834      if test "x$filtered_files" != x; then
7835        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7836$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7837        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7838$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7839        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7840$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7841        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7842$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7843        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7844$as_echo "$as_me: seriously mess up just about everything." >&6;}
7845        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7846$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7847        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7848$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7849        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7850      fi
7851    fi
7852fi
7853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7854$as_echo_n "checking what configuration name to use... " >&6; }
7855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7856$as_echo "$CONF_NAME" >&6; }
7857
7858
7859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7860
7861  # Input might be given as Windows format, start by converting to
7862  # unix format.
7863  path="$OUTPUT_ROOT"
7864  new_path=`$CYGPATH -u "$path"`
7865
7866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7869  # "foo.exe" is OK but "foo" is an error.
7870  #
7871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7872  # It is also a way to make sure we got the proper file name for the real test later on.
7873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7874  if test "x$test_shortpath" = x; then
7875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7876$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7877    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7878  fi
7879
7880  # Call helper function which possibly converts this using DOS-style short mode.
7881  # If so, the updated path is stored in $new_path.
7882
7883  input_path="$new_path"
7884  # Check if we need to convert this using DOS-style short mode. If the path
7885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7886  # take no chances and rewrite it.
7887  # Note: m4 eats our [], so we need to use [ and ] instead.
7888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7889  if test "x$has_forbidden_chars" != x; then
7890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7894      # Going to short mode and back again did indeed matter. Since short mode is
7895      # case insensitive, let's make it lowercase to improve readability.
7896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7897      # Now convert it back to Unix-stile (cygpath)
7898      input_path=`$CYGPATH -u "$shortmode_path"`
7899      new_path="$input_path"
7900    fi
7901  fi
7902
7903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7904  if test "x$test_cygdrive_prefix" = x; then
7905    # As a simple fix, exclude /usr/bin since it's not a real path.
7906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7908      # a path prefixed by /cygdrive for fixpath to work.
7909      new_path="$CYGWIN_ROOT_PATH$input_path"
7910    fi
7911  fi
7912
7913
7914  if test "x$path" != "x$new_path"; then
7915    OUTPUT_ROOT="$new_path"
7916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7917$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7918  fi
7919
7920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7921
7922  path="$OUTPUT_ROOT"
7923  has_colon=`$ECHO $path | $GREP ^.:`
7924  new_path="$path"
7925  if test "x$has_colon" = x; then
7926    # Not in mixed or Windows style, start by that.
7927    new_path=`cmd //c echo $path`
7928  fi
7929
7930
7931  input_path="$new_path"
7932  # Check if we need to convert this using DOS-style short mode. If the path
7933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7934  # take no chances and rewrite it.
7935  # Note: m4 eats our [], so we need to use [ and ] instead.
7936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7937  if test "x$has_forbidden_chars" != x; then
7938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7940  fi
7941
7942
7943  windows_path="$new_path"
7944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7945    unix_path=`$CYGPATH -u "$windows_path"`
7946    new_path="$unix_path"
7947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7949    new_path="$unix_path"
7950  fi
7951
7952  if test "x$path" != "x$new_path"; then
7953    OUTPUT_ROOT="$new_path"
7954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7955$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7956  fi
7957
7958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7960
7961  else
7962    # We're on a posix platform. Hooray! :)
7963    path="$OUTPUT_ROOT"
7964    has_space=`$ECHO "$path" | $GREP " "`
7965    if test "x$has_space" != x; then
7966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7967$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7968      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7969    fi
7970
7971    # Use eval to expand a potential ~
7972    eval path="$path"
7973    if test ! -f "$path" && test ! -d "$path"; then
7974      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7975    fi
7976
7977    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
7978  fi
7979
7980
7981SPEC=$OUTPUT_ROOT/spec.gmk
7982
7983CONF_NAME=$CONF_NAME
7984
7985OUTPUT_ROOT=$OUTPUT_ROOT
7986
7987
7988# Most of the probed defines are put into config.h
7989ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7990
7991# The spec.gmk file contains all variables for the make system.
7992ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7993
7994# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7995ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7996
7997# The bootcycle-spec.gmk file contains support for boot cycle builds.
7998ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7999
8000# The compare.sh is used to compare the build output to other builds.
8001ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8002
8003# Spec.sh is currently used by compare-objects.sh
8004ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8005
8006# The generated Makefile knows where the spec.gmk is and where the source is.
8007# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8008# which will look for generated configurations
8009ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8010
8011
8012# Save the arguments given to us
8013echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8014
8015
8016# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8017
8018    for ac_prog in apt-get yum port pkgutil pkgadd
8019do
8020  # Extract the first word of "$ac_prog", so it can be a program name with args.
8021set dummy $ac_prog; ac_word=$2
8022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8023$as_echo_n "checking for $ac_word... " >&6; }
8024if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8025  $as_echo_n "(cached) " >&6
8026else
8027  if test -n "$PKGHANDLER"; then
8028  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8029else
8030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8031for as_dir in $PATH
8032do
8033  IFS=$as_save_IFS
8034  test -z "$as_dir" && as_dir=.
8035    for ac_exec_ext in '' $ac_executable_extensions; do
8036  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8037    ac_cv_prog_PKGHANDLER="$ac_prog"
8038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8039    break 2
8040  fi
8041done
8042  done
8043IFS=$as_save_IFS
8044
8045fi
8046fi
8047PKGHANDLER=$ac_cv_prog_PKGHANDLER
8048if test -n "$PKGHANDLER"; then
8049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8050$as_echo "$PKGHANDLER" >&6; }
8051else
8052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8053$as_echo "no" >&6; }
8054fi
8055
8056
8057  test -n "$PKGHANDLER" && break
8058done
8059
8060
8061
8062# Setup tools that requires more complex handling, or that is not needed by the configure script.
8063
8064
8065  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8066  if test "x$MAKE" != x; then
8067    # User has supplied a make, test it.
8068    if test ! -f "$MAKE"; then
8069      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8070    fi
8071
8072  MAKE_CANDIDATE=""$MAKE""
8073  DESCRIPTION="user supplied MAKE=$MAKE"
8074  if test "x$MAKE_CANDIDATE" != x; then
8075    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8076$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8077    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8078    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8079    if test "x$IS_GNU_MAKE" = x; then
8080      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8081$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8082    else
8083      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8084      if test "x$IS_MODERN_MAKE" = x; then
8085        { $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
8086$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;}
8087      else
8088        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8089          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8090            MAKE_EXPECTED_ENV='cygwin'
8091          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8092            MAKE_EXPECTED_ENV='msys'
8093          else
8094            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8095          fi
8096          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8097          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8098        else
8099          # Not relevant for non-Windows
8100          IS_MAKE_CORRECT_ENV=true
8101        fi
8102        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8103          { $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
8104$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;}
8105        else
8106          FOUND_MAKE=$MAKE_CANDIDATE
8107
8108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8109
8110  # First separate the path from the arguments. This will split at the first
8111  # space.
8112  complete="$FOUND_MAKE"
8113  path="${complete%% *}"
8114  tmp="$complete EOL"
8115  arguments="${tmp#* }"
8116
8117  # Input might be given as Windows format, start by converting to
8118  # unix format.
8119  new_path=`$CYGPATH -u "$path"`
8120
8121  # Now try to locate executable using which
8122  new_path=`$WHICH "$new_path" 2> /dev/null`
8123  # bat and cmd files are not always considered executable in cygwin causing which
8124  # to not find them
8125  if test "x$new_path" = x \
8126           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8127           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8128    new_path=`$CYGPATH -u "$path"`
8129  fi
8130  if test "x$new_path" = x; then
8131    # Oops. Which didn't find the executable.
8132    # The splitting of arguments from the executable at a space might have been incorrect,
8133    # since paths with space are more likely in Windows. Give it another try with the whole
8134    # argument.
8135    path="$complete"
8136    arguments="EOL"
8137    new_path=`$CYGPATH -u "$path"`
8138    new_path=`$WHICH "$new_path" 2> /dev/null`
8139    # bat and cmd files are not always considered executable in cygwin causing which
8140    # to not find them
8141    if test "x$new_path" = x \
8142             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8143             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8144      new_path=`$CYGPATH -u "$path"`
8145    fi
8146    if test "x$new_path" = x; then
8147      # It's still not found. Now this is an unrecoverable error.
8148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8149$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8150      has_space=`$ECHO "$complete" | $GREP " "`
8151      if test "x$has_space" != x; then
8152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8154      fi
8155      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8156    fi
8157  fi
8158
8159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8162  # "foo.exe" is OK but "foo" is an error.
8163  #
8164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8165  # It is also a way to make sure we got the proper file name for the real test later on.
8166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8167  if test "x$test_shortpath" = x; then
8168    # Short path failed, file does not exist as specified.
8169    # Try adding .exe or .cmd
8170    if test -f "${new_path}.exe"; then
8171       input_to_shortpath="${new_path}.exe"
8172    elif test -f "${new_path}.cmd"; then
8173       input_to_shortpath="${new_path}.cmd"
8174    else
8175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8176$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8177      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8178$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8179      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8180    fi
8181  else
8182    input_to_shortpath="$new_path"
8183  fi
8184
8185  # Call helper function which possibly converts this using DOS-style short mode.
8186  # If so, the updated path is stored in $new_path.
8187  new_path="$input_to_shortpath"
8188
8189  input_path="$input_to_shortpath"
8190  # Check if we need to convert this using DOS-style short mode. If the path
8191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8192  # take no chances and rewrite it.
8193  # Note: m4 eats our [], so we need to use [ and ] instead.
8194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8195  if test "x$has_forbidden_chars" != x; then
8196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8200      # Going to short mode and back again did indeed matter. Since short mode is
8201      # case insensitive, let's make it lowercase to improve readability.
8202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8203      # Now convert it back to Unix-stile (cygpath)
8204      input_path=`$CYGPATH -u "$shortmode_path"`
8205      new_path="$input_path"
8206    fi
8207  fi
8208
8209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8210  if test "x$test_cygdrive_prefix" = x; then
8211    # As a simple fix, exclude /usr/bin since it's not a real path.
8212    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8214      # a path prefixed by /cygdrive for fixpath to work.
8215      new_path="$CYGWIN_ROOT_PATH$input_path"
8216    fi
8217  fi
8218
8219  # remove trailing .exe if any
8220  new_path="${new_path/%.exe/}"
8221
8222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8223
8224  # First separate the path from the arguments. This will split at the first
8225  # space.
8226  complete="$FOUND_MAKE"
8227  path="${complete%% *}"
8228  tmp="$complete EOL"
8229  arguments="${tmp#* }"
8230
8231  # Input might be given as Windows format, start by converting to
8232  # unix format.
8233  new_path="$path"
8234
8235  windows_path="$new_path"
8236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8237    unix_path=`$CYGPATH -u "$windows_path"`
8238    new_path="$unix_path"
8239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8241    new_path="$unix_path"
8242  fi
8243
8244
8245  # Now try to locate executable using which
8246  new_path=`$WHICH "$new_path" 2> /dev/null`
8247
8248  if test "x$new_path" = x; then
8249    # Oops. Which didn't find the executable.
8250    # The splitting of arguments from the executable at a space might have been incorrect,
8251    # since paths with space are more likely in Windows. Give it another try with the whole
8252    # argument.
8253    path="$complete"
8254    arguments="EOL"
8255    new_path="$path"
8256
8257  windows_path="$new_path"
8258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8259    unix_path=`$CYGPATH -u "$windows_path"`
8260    new_path="$unix_path"
8261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8263    new_path="$unix_path"
8264  fi
8265
8266
8267    new_path=`$WHICH "$new_path" 2> /dev/null`
8268
8269    if test "x$new_path" = x; then
8270      # It's still not found. Now this is an unrecoverable error.
8271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8272$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8273      has_space=`$ECHO "$complete" | $GREP " "`
8274      if test "x$has_space" != x; then
8275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8277      fi
8278      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8279    fi
8280  fi
8281
8282  # Now new_path has a complete unix path to the binary
8283  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8284    # Keep paths in /bin as-is, but remove trailing .exe if any
8285    new_path="${new_path/%.exe/}"
8286    # Do not save /bin paths to all_fixpath_prefixes!
8287  else
8288    # Not in mixed or Windows style, start by that.
8289    new_path=`cmd //c echo $new_path`
8290
8291  input_path="$new_path"
8292  # Check if we need to convert this using DOS-style short mode. If the path
8293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8294  # take no chances and rewrite it.
8295  # Note: m4 eats our [], so we need to use [ and ] instead.
8296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8297  if test "x$has_forbidden_chars" != x; then
8298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8300  fi
8301
8302    # Output is in $new_path
8303
8304  windows_path="$new_path"
8305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8306    unix_path=`$CYGPATH -u "$windows_path"`
8307    new_path="$unix_path"
8308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8310    new_path="$unix_path"
8311  fi
8312
8313    # remove trailing .exe if any
8314    new_path="${new_path/%.exe/}"
8315
8316    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8317    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8318  fi
8319
8320  else
8321    # We're on a posix platform. Hooray! :)
8322    # First separate the path from the arguments. This will split at the first
8323    # space.
8324    complete="$FOUND_MAKE"
8325    path="${complete%% *}"
8326    tmp="$complete EOL"
8327    arguments="${tmp#* }"
8328
8329    # Cannot rely on the command "which" here since it doesn't always work.
8330    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8331    if test -z "$is_absolute_path"; then
8332      # Path to executable is not absolute. Find it.
8333      IFS_save="$IFS"
8334      IFS=:
8335      for p in $PATH; do
8336        if test -f "$p/$path" && test -x "$p/$path"; then
8337          new_path="$p/$path"
8338          break
8339        fi
8340      done
8341      IFS="$IFS_save"
8342    else
8343      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8344$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8345      new_path="$path"
8346    fi
8347
8348    if test "x$new_path" = x; then
8349        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8350$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8351        has_space=`$ECHO "$complete" | $GREP " "`
8352        if test "x$has_space" != x; then
8353          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8354$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8355        fi
8356        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8357      fi
8358  fi
8359
8360      # Now join together the path and the arguments once again
8361      if test "x$arguments" != xEOL; then
8362        new_complete="$new_path ${arguments% *}"
8363      else
8364        new_complete="$new_path"
8365      fi
8366
8367  if test "x$complete" != "x$new_complete"; then
8368      FOUND_MAKE="$new_complete"
8369      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8370$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8371    fi
8372
8373        fi
8374      fi
8375    fi
8376  fi
8377
8378    if test "x$FOUND_MAKE" = x; then
8379      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8380    fi
8381  else
8382    # Try our hardest to locate a correct version of GNU make
8383    for ac_prog in gmake
8384do
8385  # Extract the first word of "$ac_prog", so it can be a program name with args.
8386set dummy $ac_prog; ac_word=$2
8387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8388$as_echo_n "checking for $ac_word... " >&6; }
8389if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8390  $as_echo_n "(cached) " >&6
8391else
8392  case $CHECK_GMAKE in
8393  [\\/]* | ?:[\\/]*)
8394  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8395  ;;
8396  *)
8397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8398for as_dir in $PATH
8399do
8400  IFS=$as_save_IFS
8401  test -z "$as_dir" && as_dir=.
8402    for ac_exec_ext in '' $ac_executable_extensions; do
8403  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8404    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8406    break 2
8407  fi
8408done
8409  done
8410IFS=$as_save_IFS
8411
8412  ;;
8413esac
8414fi
8415CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8416if test -n "$CHECK_GMAKE"; then
8417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8418$as_echo "$CHECK_GMAKE" >&6; }
8419else
8420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8421$as_echo "no" >&6; }
8422fi
8423
8424
8425  test -n "$CHECK_GMAKE" && break
8426done
8427
8428
8429  MAKE_CANDIDATE=""$CHECK_GMAKE""
8430  DESCRIPTION="gmake in PATH"
8431  if test "x$MAKE_CANDIDATE" != x; then
8432    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8433$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8434    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8435    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8436    if test "x$IS_GNU_MAKE" = x; then
8437      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8438$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8439    else
8440      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8441      if test "x$IS_MODERN_MAKE" = x; then
8442        { $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
8443$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;}
8444      else
8445        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8446          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8447            MAKE_EXPECTED_ENV='cygwin'
8448          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8449            MAKE_EXPECTED_ENV='msys'
8450          else
8451            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8452          fi
8453          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8454          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8455        else
8456          # Not relevant for non-Windows
8457          IS_MAKE_CORRECT_ENV=true
8458        fi
8459        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8460          { $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
8461$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;}
8462        else
8463          FOUND_MAKE=$MAKE_CANDIDATE
8464
8465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8466
8467  # First separate the path from the arguments. This will split at the first
8468  # space.
8469  complete="$FOUND_MAKE"
8470  path="${complete%% *}"
8471  tmp="$complete EOL"
8472  arguments="${tmp#* }"
8473
8474  # Input might be given as Windows format, start by converting to
8475  # unix format.
8476  new_path=`$CYGPATH -u "$path"`
8477
8478  # Now try to locate executable using which
8479  new_path=`$WHICH "$new_path" 2> /dev/null`
8480  # bat and cmd files are not always considered executable in cygwin causing which
8481  # to not find them
8482  if test "x$new_path" = x \
8483           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8484           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8485    new_path=`$CYGPATH -u "$path"`
8486  fi
8487  if test "x$new_path" = x; then
8488    # Oops. Which didn't find the executable.
8489    # The splitting of arguments from the executable at a space might have been incorrect,
8490    # since paths with space are more likely in Windows. Give it another try with the whole
8491    # argument.
8492    path="$complete"
8493    arguments="EOL"
8494    new_path=`$CYGPATH -u "$path"`
8495    new_path=`$WHICH "$new_path" 2> /dev/null`
8496    # bat and cmd files are not always considered executable in cygwin causing which
8497    # to not find them
8498    if test "x$new_path" = x \
8499             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8500             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8501      new_path=`$CYGPATH -u "$path"`
8502    fi
8503    if test "x$new_path" = x; then
8504      # It's still not found. Now this is an unrecoverable error.
8505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8506$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8507      has_space=`$ECHO "$complete" | $GREP " "`
8508      if test "x$has_space" != x; then
8509        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8510$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8511      fi
8512      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8513    fi
8514  fi
8515
8516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8519  # "foo.exe" is OK but "foo" is an error.
8520  #
8521  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8522  # It is also a way to make sure we got the proper file name for the real test later on.
8523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8524  if test "x$test_shortpath" = x; then
8525    # Short path failed, file does not exist as specified.
8526    # Try adding .exe or .cmd
8527    if test -f "${new_path}.exe"; then
8528       input_to_shortpath="${new_path}.exe"
8529    elif test -f "${new_path}.cmd"; then
8530       input_to_shortpath="${new_path}.cmd"
8531    else
8532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8533$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8534      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8535$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8536      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8537    fi
8538  else
8539    input_to_shortpath="$new_path"
8540  fi
8541
8542  # Call helper function which possibly converts this using DOS-style short mode.
8543  # If so, the updated path is stored in $new_path.
8544  new_path="$input_to_shortpath"
8545
8546  input_path="$input_to_shortpath"
8547  # Check if we need to convert this using DOS-style short mode. If the path
8548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8549  # take no chances and rewrite it.
8550  # Note: m4 eats our [], so we need to use [ and ] instead.
8551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8552  if test "x$has_forbidden_chars" != x; then
8553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8554    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8555    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8556    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8557      # Going to short mode and back again did indeed matter. Since short mode is
8558      # case insensitive, let's make it lowercase to improve readability.
8559      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8560      # Now convert it back to Unix-stile (cygpath)
8561      input_path=`$CYGPATH -u "$shortmode_path"`
8562      new_path="$input_path"
8563    fi
8564  fi
8565
8566  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8567  if test "x$test_cygdrive_prefix" = x; then
8568    # As a simple fix, exclude /usr/bin since it's not a real path.
8569    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8570      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8571      # a path prefixed by /cygdrive for fixpath to work.
8572      new_path="$CYGWIN_ROOT_PATH$input_path"
8573    fi
8574  fi
8575
8576  # remove trailing .exe if any
8577  new_path="${new_path/%.exe/}"
8578
8579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8580
8581  # First separate the path from the arguments. This will split at the first
8582  # space.
8583  complete="$FOUND_MAKE"
8584  path="${complete%% *}"
8585  tmp="$complete EOL"
8586  arguments="${tmp#* }"
8587
8588  # Input might be given as Windows format, start by converting to
8589  # unix format.
8590  new_path="$path"
8591
8592  windows_path="$new_path"
8593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8594    unix_path=`$CYGPATH -u "$windows_path"`
8595    new_path="$unix_path"
8596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8598    new_path="$unix_path"
8599  fi
8600
8601
8602  # Now try to locate executable using which
8603  new_path=`$WHICH "$new_path" 2> /dev/null`
8604
8605  if test "x$new_path" = x; then
8606    # Oops. Which didn't find the executable.
8607    # The splitting of arguments from the executable at a space might have been incorrect,
8608    # since paths with space are more likely in Windows. Give it another try with the whole
8609    # argument.
8610    path="$complete"
8611    arguments="EOL"
8612    new_path="$path"
8613
8614  windows_path="$new_path"
8615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8616    unix_path=`$CYGPATH -u "$windows_path"`
8617    new_path="$unix_path"
8618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8620    new_path="$unix_path"
8621  fi
8622
8623
8624    new_path=`$WHICH "$new_path" 2> /dev/null`
8625
8626    if test "x$new_path" = x; then
8627      # It's still not found. Now this is an unrecoverable error.
8628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8629$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8630      has_space=`$ECHO "$complete" | $GREP " "`
8631      if test "x$has_space" != x; then
8632        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8633$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8634      fi
8635      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8636    fi
8637  fi
8638
8639  # Now new_path has a complete unix path to the binary
8640  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8641    # Keep paths in /bin as-is, but remove trailing .exe if any
8642    new_path="${new_path/%.exe/}"
8643    # Do not save /bin paths to all_fixpath_prefixes!
8644  else
8645    # Not in mixed or Windows style, start by that.
8646    new_path=`cmd //c echo $new_path`
8647
8648  input_path="$new_path"
8649  # Check if we need to convert this using DOS-style short mode. If the path
8650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8651  # take no chances and rewrite it.
8652  # Note: m4 eats our [], so we need to use [ and ] instead.
8653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8654  if test "x$has_forbidden_chars" != x; then
8655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8657  fi
8658
8659    # Output is in $new_path
8660
8661  windows_path="$new_path"
8662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8663    unix_path=`$CYGPATH -u "$windows_path"`
8664    new_path="$unix_path"
8665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8667    new_path="$unix_path"
8668  fi
8669
8670    # remove trailing .exe if any
8671    new_path="${new_path/%.exe/}"
8672
8673    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8674    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8675  fi
8676
8677  else
8678    # We're on a posix platform. Hooray! :)
8679    # First separate the path from the arguments. This will split at the first
8680    # space.
8681    complete="$FOUND_MAKE"
8682    path="${complete%% *}"
8683    tmp="$complete EOL"
8684    arguments="${tmp#* }"
8685
8686    # Cannot rely on the command "which" here since it doesn't always work.
8687    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8688    if test -z "$is_absolute_path"; then
8689      # Path to executable is not absolute. Find it.
8690      IFS_save="$IFS"
8691      IFS=:
8692      for p in $PATH; do
8693        if test -f "$p/$path" && test -x "$p/$path"; then
8694          new_path="$p/$path"
8695          break
8696        fi
8697      done
8698      IFS="$IFS_save"
8699    else
8700      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8701$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8702      new_path="$path"
8703    fi
8704
8705    if test "x$new_path" = x; then
8706        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8707$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8708        has_space=`$ECHO "$complete" | $GREP " "`
8709        if test "x$has_space" != x; then
8710          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8711$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8712        fi
8713        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8714      fi
8715  fi
8716
8717      # Now join together the path and the arguments once again
8718      if test "x$arguments" != xEOL; then
8719        new_complete="$new_path ${arguments% *}"
8720      else
8721        new_complete="$new_path"
8722      fi
8723
8724  if test "x$complete" != "x$new_complete"; then
8725      FOUND_MAKE="$new_complete"
8726      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8727$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8728    fi
8729
8730        fi
8731      fi
8732    fi
8733  fi
8734
8735
8736    if test "x$FOUND_MAKE" = x; then
8737      for ac_prog in make
8738do
8739  # Extract the first word of "$ac_prog", so it can be a program name with args.
8740set dummy $ac_prog; ac_word=$2
8741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8742$as_echo_n "checking for $ac_word... " >&6; }
8743if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8744  $as_echo_n "(cached) " >&6
8745else
8746  case $CHECK_MAKE in
8747  [\\/]* | ?:[\\/]*)
8748  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8749  ;;
8750  *)
8751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8752for as_dir in $PATH
8753do
8754  IFS=$as_save_IFS
8755  test -z "$as_dir" && as_dir=.
8756    for ac_exec_ext in '' $ac_executable_extensions; do
8757  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8758    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8760    break 2
8761  fi
8762done
8763  done
8764IFS=$as_save_IFS
8765
8766  ;;
8767esac
8768fi
8769CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8770if test -n "$CHECK_MAKE"; then
8771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8772$as_echo "$CHECK_MAKE" >&6; }
8773else
8774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8775$as_echo "no" >&6; }
8776fi
8777
8778
8779  test -n "$CHECK_MAKE" && break
8780done
8781
8782
8783  MAKE_CANDIDATE=""$CHECK_MAKE""
8784  DESCRIPTION="make in PATH"
8785  if test "x$MAKE_CANDIDATE" != x; then
8786    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8787$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8788    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8789    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8790    if test "x$IS_GNU_MAKE" = x; then
8791      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8792$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8793    else
8794      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8795      if test "x$IS_MODERN_MAKE" = x; then
8796        { $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
8797$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;}
8798      else
8799        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8800          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8801            MAKE_EXPECTED_ENV='cygwin'
8802          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8803            MAKE_EXPECTED_ENV='msys'
8804          else
8805            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8806          fi
8807          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8808          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8809        else
8810          # Not relevant for non-Windows
8811          IS_MAKE_CORRECT_ENV=true
8812        fi
8813        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8814          { $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
8815$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;}
8816        else
8817          FOUND_MAKE=$MAKE_CANDIDATE
8818
8819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8820
8821  # First separate the path from the arguments. This will split at the first
8822  # space.
8823  complete="$FOUND_MAKE"
8824  path="${complete%% *}"
8825  tmp="$complete EOL"
8826  arguments="${tmp#* }"
8827
8828  # Input might be given as Windows format, start by converting to
8829  # unix format.
8830  new_path=`$CYGPATH -u "$path"`
8831
8832  # Now try to locate executable using which
8833  new_path=`$WHICH "$new_path" 2> /dev/null`
8834  # bat and cmd files are not always considered executable in cygwin causing which
8835  # to not find them
8836  if test "x$new_path" = x \
8837           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8838           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8839    new_path=`$CYGPATH -u "$path"`
8840  fi
8841  if test "x$new_path" = x; then
8842    # Oops. Which didn't find the executable.
8843    # The splitting of arguments from the executable at a space might have been incorrect,
8844    # since paths with space are more likely in Windows. Give it another try with the whole
8845    # argument.
8846    path="$complete"
8847    arguments="EOL"
8848    new_path=`$CYGPATH -u "$path"`
8849    new_path=`$WHICH "$new_path" 2> /dev/null`
8850    # bat and cmd files are not always considered executable in cygwin causing which
8851    # to not find them
8852    if test "x$new_path" = x \
8853             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8854             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8855      new_path=`$CYGPATH -u "$path"`
8856    fi
8857    if test "x$new_path" = x; then
8858      # It's still not found. Now this is an unrecoverable error.
8859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8860$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8861      has_space=`$ECHO "$complete" | $GREP " "`
8862      if test "x$has_space" != x; then
8863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8865      fi
8866      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8867    fi
8868  fi
8869
8870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8873  # "foo.exe" is OK but "foo" is an error.
8874  #
8875  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8876  # It is also a way to make sure we got the proper file name for the real test later on.
8877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8878  if test "x$test_shortpath" = x; then
8879    # Short path failed, file does not exist as specified.
8880    # Try adding .exe or .cmd
8881    if test -f "${new_path}.exe"; then
8882       input_to_shortpath="${new_path}.exe"
8883    elif test -f "${new_path}.cmd"; then
8884       input_to_shortpath="${new_path}.cmd"
8885    else
8886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8887$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8888      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8889$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8890      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8891    fi
8892  else
8893    input_to_shortpath="$new_path"
8894  fi
8895
8896  # Call helper function which possibly converts this using DOS-style short mode.
8897  # If so, the updated path is stored in $new_path.
8898  new_path="$input_to_shortpath"
8899
8900  input_path="$input_to_shortpath"
8901  # Check if we need to convert this using DOS-style short mode. If the path
8902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8903  # take no chances and rewrite it.
8904  # Note: m4 eats our [], so we need to use [ and ] instead.
8905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8906  if test "x$has_forbidden_chars" != x; then
8907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8911      # Going to short mode and back again did indeed matter. Since short mode is
8912      # case insensitive, let's make it lowercase to improve readability.
8913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8914      # Now convert it back to Unix-stile (cygpath)
8915      input_path=`$CYGPATH -u "$shortmode_path"`
8916      new_path="$input_path"
8917    fi
8918  fi
8919
8920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8921  if test "x$test_cygdrive_prefix" = x; then
8922    # As a simple fix, exclude /usr/bin since it's not a real path.
8923    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8925      # a path prefixed by /cygdrive for fixpath to work.
8926      new_path="$CYGWIN_ROOT_PATH$input_path"
8927    fi
8928  fi
8929
8930  # remove trailing .exe if any
8931  new_path="${new_path/%.exe/}"
8932
8933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8934
8935  # First separate the path from the arguments. This will split at the first
8936  # space.
8937  complete="$FOUND_MAKE"
8938  path="${complete%% *}"
8939  tmp="$complete EOL"
8940  arguments="${tmp#* }"
8941
8942  # Input might be given as Windows format, start by converting to
8943  # unix format.
8944  new_path="$path"
8945
8946  windows_path="$new_path"
8947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8948    unix_path=`$CYGPATH -u "$windows_path"`
8949    new_path="$unix_path"
8950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8952    new_path="$unix_path"
8953  fi
8954
8955
8956  # Now try to locate executable using which
8957  new_path=`$WHICH "$new_path" 2> /dev/null`
8958
8959  if test "x$new_path" = x; then
8960    # Oops. Which didn't find the executable.
8961    # The splitting of arguments from the executable at a space might have been incorrect,
8962    # since paths with space are more likely in Windows. Give it another try with the whole
8963    # argument.
8964    path="$complete"
8965    arguments="EOL"
8966    new_path="$path"
8967
8968  windows_path="$new_path"
8969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8970    unix_path=`$CYGPATH -u "$windows_path"`
8971    new_path="$unix_path"
8972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8974    new_path="$unix_path"
8975  fi
8976
8977
8978    new_path=`$WHICH "$new_path" 2> /dev/null`
8979
8980    if test "x$new_path" = x; then
8981      # It's still not found. Now this is an unrecoverable error.
8982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8983$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8984      has_space=`$ECHO "$complete" | $GREP " "`
8985      if test "x$has_space" != x; then
8986        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8987$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8988      fi
8989      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8990    fi
8991  fi
8992
8993  # Now new_path has a complete unix path to the binary
8994  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8995    # Keep paths in /bin as-is, but remove trailing .exe if any
8996    new_path="${new_path/%.exe/}"
8997    # Do not save /bin paths to all_fixpath_prefixes!
8998  else
8999    # Not in mixed or Windows style, start by that.
9000    new_path=`cmd //c echo $new_path`
9001
9002  input_path="$new_path"
9003  # Check if we need to convert this using DOS-style short mode. If the path
9004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9005  # take no chances and rewrite it.
9006  # Note: m4 eats our [], so we need to use [ and ] instead.
9007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9008  if test "x$has_forbidden_chars" != x; then
9009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9011  fi
9012
9013    # Output is in $new_path
9014
9015  windows_path="$new_path"
9016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9017    unix_path=`$CYGPATH -u "$windows_path"`
9018    new_path="$unix_path"
9019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9021    new_path="$unix_path"
9022  fi
9023
9024    # remove trailing .exe if any
9025    new_path="${new_path/%.exe/}"
9026
9027    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9028    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9029  fi
9030
9031  else
9032    # We're on a posix platform. Hooray! :)
9033    # First separate the path from the arguments. This will split at the first
9034    # space.
9035    complete="$FOUND_MAKE"
9036    path="${complete%% *}"
9037    tmp="$complete EOL"
9038    arguments="${tmp#* }"
9039
9040    # Cannot rely on the command "which" here since it doesn't always work.
9041    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9042    if test -z "$is_absolute_path"; then
9043      # Path to executable is not absolute. Find it.
9044      IFS_save="$IFS"
9045      IFS=:
9046      for p in $PATH; do
9047        if test -f "$p/$path" && test -x "$p/$path"; then
9048          new_path="$p/$path"
9049          break
9050        fi
9051      done
9052      IFS="$IFS_save"
9053    else
9054      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9055$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9056      new_path="$path"
9057    fi
9058
9059    if test "x$new_path" = x; then
9060        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9061$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9062        has_space=`$ECHO "$complete" | $GREP " "`
9063        if test "x$has_space" != x; then
9064          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9065$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9066        fi
9067        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9068      fi
9069  fi
9070
9071      # Now join together the path and the arguments once again
9072      if test "x$arguments" != xEOL; then
9073        new_complete="$new_path ${arguments% *}"
9074      else
9075        new_complete="$new_path"
9076      fi
9077
9078  if test "x$complete" != "x$new_complete"; then
9079      FOUND_MAKE="$new_complete"
9080      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9081$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9082    fi
9083
9084        fi
9085      fi
9086    fi
9087  fi
9088
9089    fi
9090
9091    if test "x$FOUND_MAKE" = x; then
9092      if test "x$TOOLS_DIR" != x; then
9093        # We have a tools-dir, check that as well before giving up.
9094        OLD_PATH=$PATH
9095        PATH=$TOOLS_DIR:$PATH
9096        for ac_prog in gmake
9097do
9098  # Extract the first word of "$ac_prog", so it can be a program name with args.
9099set dummy $ac_prog; ac_word=$2
9100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9101$as_echo_n "checking for $ac_word... " >&6; }
9102if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9103  $as_echo_n "(cached) " >&6
9104else
9105  case $CHECK_TOOLSDIR_GMAKE in
9106  [\\/]* | ?:[\\/]*)
9107  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9108  ;;
9109  *)
9110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9111for as_dir in $PATH
9112do
9113  IFS=$as_save_IFS
9114  test -z "$as_dir" && as_dir=.
9115    for ac_exec_ext in '' $ac_executable_extensions; do
9116  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9117    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9119    break 2
9120  fi
9121done
9122  done
9123IFS=$as_save_IFS
9124
9125  ;;
9126esac
9127fi
9128CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9129if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9131$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9132else
9133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9134$as_echo "no" >&6; }
9135fi
9136
9137
9138  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9139done
9140
9141
9142  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9143  DESCRIPTION="gmake in tools-dir"
9144  if test "x$MAKE_CANDIDATE" != x; then
9145    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9146$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9147    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9148    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9149    if test "x$IS_GNU_MAKE" = x; then
9150      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9151$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9152    else
9153      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9154      if test "x$IS_MODERN_MAKE" = x; then
9155        { $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
9156$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;}
9157      else
9158        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9159          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9160            MAKE_EXPECTED_ENV='cygwin'
9161          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9162            MAKE_EXPECTED_ENV='msys'
9163          else
9164            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9165          fi
9166          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9167          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9168        else
9169          # Not relevant for non-Windows
9170          IS_MAKE_CORRECT_ENV=true
9171        fi
9172        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9173          { $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
9174$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;}
9175        else
9176          FOUND_MAKE=$MAKE_CANDIDATE
9177
9178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9179
9180  # First separate the path from the arguments. This will split at the first
9181  # space.
9182  complete="$FOUND_MAKE"
9183  path="${complete%% *}"
9184  tmp="$complete EOL"
9185  arguments="${tmp#* }"
9186
9187  # Input might be given as Windows format, start by converting to
9188  # unix format.
9189  new_path=`$CYGPATH -u "$path"`
9190
9191  # Now try to locate executable using which
9192  new_path=`$WHICH "$new_path" 2> /dev/null`
9193  # bat and cmd files are not always considered executable in cygwin causing which
9194  # to not find them
9195  if test "x$new_path" = x \
9196           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9197           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9198    new_path=`$CYGPATH -u "$path"`
9199  fi
9200  if test "x$new_path" = x; then
9201    # Oops. Which didn't find the executable.
9202    # The splitting of arguments from the executable at a space might have been incorrect,
9203    # since paths with space are more likely in Windows. Give it another try with the whole
9204    # argument.
9205    path="$complete"
9206    arguments="EOL"
9207    new_path=`$CYGPATH -u "$path"`
9208    new_path=`$WHICH "$new_path" 2> /dev/null`
9209    # bat and cmd files are not always considered executable in cygwin causing which
9210    # to not find them
9211    if test "x$new_path" = x \
9212             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9213             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9214      new_path=`$CYGPATH -u "$path"`
9215    fi
9216    if test "x$new_path" = x; then
9217      # It's still not found. Now this is an unrecoverable error.
9218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9219$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9220      has_space=`$ECHO "$complete" | $GREP " "`
9221      if test "x$has_space" != x; then
9222        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9223$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9224      fi
9225      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9226    fi
9227  fi
9228
9229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9232  # "foo.exe" is OK but "foo" is an error.
9233  #
9234  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9235  # It is also a way to make sure we got the proper file name for the real test later on.
9236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9237  if test "x$test_shortpath" = x; then
9238    # Short path failed, file does not exist as specified.
9239    # Try adding .exe or .cmd
9240    if test -f "${new_path}.exe"; then
9241       input_to_shortpath="${new_path}.exe"
9242    elif test -f "${new_path}.cmd"; then
9243       input_to_shortpath="${new_path}.cmd"
9244    else
9245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9246$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9247      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9248$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9249      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9250    fi
9251  else
9252    input_to_shortpath="$new_path"
9253  fi
9254
9255  # Call helper function which possibly converts this using DOS-style short mode.
9256  # If so, the updated path is stored in $new_path.
9257  new_path="$input_to_shortpath"
9258
9259  input_path="$input_to_shortpath"
9260  # Check if we need to convert this using DOS-style short mode. If the path
9261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9262  # take no chances and rewrite it.
9263  # Note: m4 eats our [], so we need to use [ and ] instead.
9264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9265  if test "x$has_forbidden_chars" != x; then
9266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9270      # Going to short mode and back again did indeed matter. Since short mode is
9271      # case insensitive, let's make it lowercase to improve readability.
9272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9273      # Now convert it back to Unix-stile (cygpath)
9274      input_path=`$CYGPATH -u "$shortmode_path"`
9275      new_path="$input_path"
9276    fi
9277  fi
9278
9279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9280  if test "x$test_cygdrive_prefix" = x; then
9281    # As a simple fix, exclude /usr/bin since it's not a real path.
9282    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9284      # a path prefixed by /cygdrive for fixpath to work.
9285      new_path="$CYGWIN_ROOT_PATH$input_path"
9286    fi
9287  fi
9288
9289  # remove trailing .exe if any
9290  new_path="${new_path/%.exe/}"
9291
9292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9293
9294  # First separate the path from the arguments. This will split at the first
9295  # space.
9296  complete="$FOUND_MAKE"
9297  path="${complete%% *}"
9298  tmp="$complete EOL"
9299  arguments="${tmp#* }"
9300
9301  # Input might be given as Windows format, start by converting to
9302  # unix format.
9303  new_path="$path"
9304
9305  windows_path="$new_path"
9306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9307    unix_path=`$CYGPATH -u "$windows_path"`
9308    new_path="$unix_path"
9309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9311    new_path="$unix_path"
9312  fi
9313
9314
9315  # Now try to locate executable using which
9316  new_path=`$WHICH "$new_path" 2> /dev/null`
9317
9318  if test "x$new_path" = x; then
9319    # Oops. Which didn't find the executable.
9320    # The splitting of arguments from the executable at a space might have been incorrect,
9321    # since paths with space are more likely in Windows. Give it another try with the whole
9322    # argument.
9323    path="$complete"
9324    arguments="EOL"
9325    new_path="$path"
9326
9327  windows_path="$new_path"
9328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9329    unix_path=`$CYGPATH -u "$windows_path"`
9330    new_path="$unix_path"
9331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9333    new_path="$unix_path"
9334  fi
9335
9336
9337    new_path=`$WHICH "$new_path" 2> /dev/null`
9338
9339    if test "x$new_path" = x; then
9340      # It's still not found. Now this is an unrecoverable error.
9341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9342$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9343      has_space=`$ECHO "$complete" | $GREP " "`
9344      if test "x$has_space" != x; then
9345        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9346$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9347      fi
9348      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9349    fi
9350  fi
9351
9352  # Now new_path has a complete unix path to the binary
9353  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9354    # Keep paths in /bin as-is, but remove trailing .exe if any
9355    new_path="${new_path/%.exe/}"
9356    # Do not save /bin paths to all_fixpath_prefixes!
9357  else
9358    # Not in mixed or Windows style, start by that.
9359    new_path=`cmd //c echo $new_path`
9360
9361  input_path="$new_path"
9362  # Check if we need to convert this using DOS-style short mode. If the path
9363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9364  # take no chances and rewrite it.
9365  # Note: m4 eats our [], so we need to use [ and ] instead.
9366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9367  if test "x$has_forbidden_chars" != x; then
9368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9370  fi
9371
9372    # Output is in $new_path
9373
9374  windows_path="$new_path"
9375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9376    unix_path=`$CYGPATH -u "$windows_path"`
9377    new_path="$unix_path"
9378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9380    new_path="$unix_path"
9381  fi
9382
9383    # remove trailing .exe if any
9384    new_path="${new_path/%.exe/}"
9385
9386    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9387    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9388  fi
9389
9390  else
9391    # We're on a posix platform. Hooray! :)
9392    # First separate the path from the arguments. This will split at the first
9393    # space.
9394    complete="$FOUND_MAKE"
9395    path="${complete%% *}"
9396    tmp="$complete EOL"
9397    arguments="${tmp#* }"
9398
9399    # Cannot rely on the command "which" here since it doesn't always work.
9400    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9401    if test -z "$is_absolute_path"; then
9402      # Path to executable is not absolute. Find it.
9403      IFS_save="$IFS"
9404      IFS=:
9405      for p in $PATH; do
9406        if test -f "$p/$path" && test -x "$p/$path"; then
9407          new_path="$p/$path"
9408          break
9409        fi
9410      done
9411      IFS="$IFS_save"
9412    else
9413      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9414$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9415      new_path="$path"
9416    fi
9417
9418    if test "x$new_path" = x; then
9419        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9420$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9421        has_space=`$ECHO "$complete" | $GREP " "`
9422        if test "x$has_space" != x; then
9423          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9424$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9425        fi
9426        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9427      fi
9428  fi
9429
9430      # Now join together the path and the arguments once again
9431      if test "x$arguments" != xEOL; then
9432        new_complete="$new_path ${arguments% *}"
9433      else
9434        new_complete="$new_path"
9435      fi
9436
9437  if test "x$complete" != "x$new_complete"; then
9438      FOUND_MAKE="$new_complete"
9439      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9440$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9441    fi
9442
9443        fi
9444      fi
9445    fi
9446  fi
9447
9448        if test "x$FOUND_MAKE" = x; then
9449          for ac_prog in make
9450do
9451  # Extract the first word of "$ac_prog", so it can be a program name with args.
9452set dummy $ac_prog; ac_word=$2
9453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9454$as_echo_n "checking for $ac_word... " >&6; }
9455if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9456  $as_echo_n "(cached) " >&6
9457else
9458  case $CHECK_TOOLSDIR_MAKE in
9459  [\\/]* | ?:[\\/]*)
9460  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9461  ;;
9462  *)
9463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9464for as_dir in $PATH
9465do
9466  IFS=$as_save_IFS
9467  test -z "$as_dir" && as_dir=.
9468    for ac_exec_ext in '' $ac_executable_extensions; do
9469  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9470    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9472    break 2
9473  fi
9474done
9475  done
9476IFS=$as_save_IFS
9477
9478  ;;
9479esac
9480fi
9481CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9482if test -n "$CHECK_TOOLSDIR_MAKE"; then
9483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9484$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9485else
9486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9487$as_echo "no" >&6; }
9488fi
9489
9490
9491  test -n "$CHECK_TOOLSDIR_MAKE" && break
9492done
9493
9494
9495  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9496  DESCRIPTION="make in tools-dir"
9497  if test "x$MAKE_CANDIDATE" != x; then
9498    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9499$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9500    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9501    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9502    if test "x$IS_GNU_MAKE" = x; then
9503      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9504$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9505    else
9506      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9507      if test "x$IS_MODERN_MAKE" = x; then
9508        { $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
9509$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;}
9510      else
9511        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9512          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9513            MAKE_EXPECTED_ENV='cygwin'
9514          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9515            MAKE_EXPECTED_ENV='msys'
9516          else
9517            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9518          fi
9519          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9520          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9521        else
9522          # Not relevant for non-Windows
9523          IS_MAKE_CORRECT_ENV=true
9524        fi
9525        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9526          { $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
9527$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;}
9528        else
9529          FOUND_MAKE=$MAKE_CANDIDATE
9530
9531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9532
9533  # First separate the path from the arguments. This will split at the first
9534  # space.
9535  complete="$FOUND_MAKE"
9536  path="${complete%% *}"
9537  tmp="$complete EOL"
9538  arguments="${tmp#* }"
9539
9540  # Input might be given as Windows format, start by converting to
9541  # unix format.
9542  new_path=`$CYGPATH -u "$path"`
9543
9544  # Now try to locate executable using which
9545  new_path=`$WHICH "$new_path" 2> /dev/null`
9546  # bat and cmd files are not always considered executable in cygwin causing which
9547  # to not find them
9548  if test "x$new_path" = x \
9549           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9550           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9551    new_path=`$CYGPATH -u "$path"`
9552  fi
9553  if test "x$new_path" = x; then
9554    # Oops. Which didn't find the executable.
9555    # The splitting of arguments from the executable at a space might have been incorrect,
9556    # since paths with space are more likely in Windows. Give it another try with the whole
9557    # argument.
9558    path="$complete"
9559    arguments="EOL"
9560    new_path=`$CYGPATH -u "$path"`
9561    new_path=`$WHICH "$new_path" 2> /dev/null`
9562    # bat and cmd files are not always considered executable in cygwin causing which
9563    # to not find them
9564    if test "x$new_path" = x \
9565             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9566             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9567      new_path=`$CYGPATH -u "$path"`
9568    fi
9569    if test "x$new_path" = x; then
9570      # It's still not found. Now this is an unrecoverable error.
9571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9572$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9573      has_space=`$ECHO "$complete" | $GREP " "`
9574      if test "x$has_space" != x; then
9575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9577      fi
9578      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9579    fi
9580  fi
9581
9582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9585  # "foo.exe" is OK but "foo" is an error.
9586  #
9587  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9588  # It is also a way to make sure we got the proper file name for the real test later on.
9589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9590  if test "x$test_shortpath" = x; then
9591    # Short path failed, file does not exist as specified.
9592    # Try adding .exe or .cmd
9593    if test -f "${new_path}.exe"; then
9594       input_to_shortpath="${new_path}.exe"
9595    elif test -f "${new_path}.cmd"; then
9596       input_to_shortpath="${new_path}.cmd"
9597    else
9598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9599$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9600      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9601$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9602      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9603    fi
9604  else
9605    input_to_shortpath="$new_path"
9606  fi
9607
9608  # Call helper function which possibly converts this using DOS-style short mode.
9609  # If so, the updated path is stored in $new_path.
9610  new_path="$input_to_shortpath"
9611
9612  input_path="$input_to_shortpath"
9613  # Check if we need to convert this using DOS-style short mode. If the path
9614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9615  # take no chances and rewrite it.
9616  # Note: m4 eats our [], so we need to use [ and ] instead.
9617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9618  if test "x$has_forbidden_chars" != x; then
9619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9623      # Going to short mode and back again did indeed matter. Since short mode is
9624      # case insensitive, let's make it lowercase to improve readability.
9625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9626      # Now convert it back to Unix-stile (cygpath)
9627      input_path=`$CYGPATH -u "$shortmode_path"`
9628      new_path="$input_path"
9629    fi
9630  fi
9631
9632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9633  if test "x$test_cygdrive_prefix" = x; then
9634    # As a simple fix, exclude /usr/bin since it's not a real path.
9635    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9637      # a path prefixed by /cygdrive for fixpath to work.
9638      new_path="$CYGWIN_ROOT_PATH$input_path"
9639    fi
9640  fi
9641
9642  # remove trailing .exe if any
9643  new_path="${new_path/%.exe/}"
9644
9645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9646
9647  # First separate the path from the arguments. This will split at the first
9648  # space.
9649  complete="$FOUND_MAKE"
9650  path="${complete%% *}"
9651  tmp="$complete EOL"
9652  arguments="${tmp#* }"
9653
9654  # Input might be given as Windows format, start by converting to
9655  # unix format.
9656  new_path="$path"
9657
9658  windows_path="$new_path"
9659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9660    unix_path=`$CYGPATH -u "$windows_path"`
9661    new_path="$unix_path"
9662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9664    new_path="$unix_path"
9665  fi
9666
9667
9668  # Now try to locate executable using which
9669  new_path=`$WHICH "$new_path" 2> /dev/null`
9670
9671  if test "x$new_path" = x; then
9672    # Oops. Which didn't find the executable.
9673    # The splitting of arguments from the executable at a space might have been incorrect,
9674    # since paths with space are more likely in Windows. Give it another try with the whole
9675    # argument.
9676    path="$complete"
9677    arguments="EOL"
9678    new_path="$path"
9679
9680  windows_path="$new_path"
9681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9682    unix_path=`$CYGPATH -u "$windows_path"`
9683    new_path="$unix_path"
9684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9686    new_path="$unix_path"
9687  fi
9688
9689
9690    new_path=`$WHICH "$new_path" 2> /dev/null`
9691
9692    if test "x$new_path" = x; then
9693      # It's still not found. Now this is an unrecoverable error.
9694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9695$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9696      has_space=`$ECHO "$complete" | $GREP " "`
9697      if test "x$has_space" != x; then
9698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9700      fi
9701      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9702    fi
9703  fi
9704
9705  # Now new_path has a complete unix path to the binary
9706  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9707    # Keep paths in /bin as-is, but remove trailing .exe if any
9708    new_path="${new_path/%.exe/}"
9709    # Do not save /bin paths to all_fixpath_prefixes!
9710  else
9711    # Not in mixed or Windows style, start by that.
9712    new_path=`cmd //c echo $new_path`
9713
9714  input_path="$new_path"
9715  # Check if we need to convert this using DOS-style short mode. If the path
9716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9717  # take no chances and rewrite it.
9718  # Note: m4 eats our [], so we need to use [ and ] instead.
9719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9720  if test "x$has_forbidden_chars" != x; then
9721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9723  fi
9724
9725    # Output is in $new_path
9726
9727  windows_path="$new_path"
9728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9729    unix_path=`$CYGPATH -u "$windows_path"`
9730    new_path="$unix_path"
9731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9733    new_path="$unix_path"
9734  fi
9735
9736    # remove trailing .exe if any
9737    new_path="${new_path/%.exe/}"
9738
9739    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9740    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9741  fi
9742
9743  else
9744    # We're on a posix platform. Hooray! :)
9745    # First separate the path from the arguments. This will split at the first
9746    # space.
9747    complete="$FOUND_MAKE"
9748    path="${complete%% *}"
9749    tmp="$complete EOL"
9750    arguments="${tmp#* }"
9751
9752    # Cannot rely on the command "which" here since it doesn't always work.
9753    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9754    if test -z "$is_absolute_path"; then
9755      # Path to executable is not absolute. Find it.
9756      IFS_save="$IFS"
9757      IFS=:
9758      for p in $PATH; do
9759        if test -f "$p/$path" && test -x "$p/$path"; then
9760          new_path="$p/$path"
9761          break
9762        fi
9763      done
9764      IFS="$IFS_save"
9765    else
9766      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9767$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9768      new_path="$path"
9769    fi
9770
9771    if test "x$new_path" = x; then
9772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9773$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9774        has_space=`$ECHO "$complete" | $GREP " "`
9775        if test "x$has_space" != x; then
9776          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9777$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9778        fi
9779        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9780      fi
9781  fi
9782
9783      # Now join together the path and the arguments once again
9784      if test "x$arguments" != xEOL; then
9785        new_complete="$new_path ${arguments% *}"
9786      else
9787        new_complete="$new_path"
9788      fi
9789
9790  if test "x$complete" != "x$new_complete"; then
9791      FOUND_MAKE="$new_complete"
9792      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9793$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9794    fi
9795
9796        fi
9797      fi
9798    fi
9799  fi
9800
9801        fi
9802        PATH=$OLD_PATH
9803      fi
9804    fi
9805
9806    if test "x$FOUND_MAKE" = x; then
9807      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
9808    fi
9809  fi
9810
9811  MAKE=$FOUND_MAKE
9812
9813  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9814$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9815
9816
9817
9818    # Test if find supports -delete
9819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9820$as_echo_n "checking if find supports -delete... " >&6; }
9821    FIND_DELETE="-delete"
9822
9823    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9824
9825    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9826
9827    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9828    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9829        # No, it does not.
9830        rm $DELETEDIR/TestIfFindSupportsDelete
9831        FIND_DELETE="-exec rm \{\} \+"
9832        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9833$as_echo "no" >&6; }
9834    else
9835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9836$as_echo "yes" >&6; }
9837    fi
9838    rmdir $DELETEDIR
9839
9840
9841
9842# These tools might not be installed by default,
9843# need hint on how to install them.
9844
9845    for ac_prog in unzip
9846do
9847  # Extract the first word of "$ac_prog", so it can be a program name with args.
9848set dummy $ac_prog; ac_word=$2
9849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9850$as_echo_n "checking for $ac_word... " >&6; }
9851if test "${ac_cv_path_UNZIP+set}" = set; then :
9852  $as_echo_n "(cached) " >&6
9853else
9854  case $UNZIP in
9855  [\\/]* | ?:[\\/]*)
9856  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9857  ;;
9858  *)
9859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9860for as_dir in $PATH
9861do
9862  IFS=$as_save_IFS
9863  test -z "$as_dir" && as_dir=.
9864    for ac_exec_ext in '' $ac_executable_extensions; do
9865  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9866    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9868    break 2
9869  fi
9870done
9871  done
9872IFS=$as_save_IFS
9873
9874  ;;
9875esac
9876fi
9877UNZIP=$ac_cv_path_UNZIP
9878if test -n "$UNZIP"; then
9879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9880$as_echo "$UNZIP" >&6; }
9881else
9882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9883$as_echo "no" >&6; }
9884fi
9885
9886
9887  test -n "$UNZIP" && break
9888done
9889
9890
9891    if test "x$UNZIP" = x; then
9892        if test "xunzip" = x; then
9893          PROG_NAME=unzip
9894        else
9895          PROG_NAME=unzip
9896        fi
9897        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9898$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9899        as_fn_error $? "Cannot continue" "$LINENO" 5
9900    fi
9901
9902
9903
9904    for ac_prog in zip
9905do
9906  # Extract the first word of "$ac_prog", so it can be a program name with args.
9907set dummy $ac_prog; ac_word=$2
9908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9909$as_echo_n "checking for $ac_word... " >&6; }
9910if test "${ac_cv_path_ZIP+set}" = set; then :
9911  $as_echo_n "(cached) " >&6
9912else
9913  case $ZIP in
9914  [\\/]* | ?:[\\/]*)
9915  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9916  ;;
9917  *)
9918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9919for as_dir in $PATH
9920do
9921  IFS=$as_save_IFS
9922  test -z "$as_dir" && as_dir=.
9923    for ac_exec_ext in '' $ac_executable_extensions; do
9924  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9925    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9927    break 2
9928  fi
9929done
9930  done
9931IFS=$as_save_IFS
9932
9933  ;;
9934esac
9935fi
9936ZIP=$ac_cv_path_ZIP
9937if test -n "$ZIP"; then
9938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9939$as_echo "$ZIP" >&6; }
9940else
9941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9942$as_echo "no" >&6; }
9943fi
9944
9945
9946  test -n "$ZIP" && break
9947done
9948
9949
9950    if test "x$ZIP" = x; then
9951        if test "xzip" = x; then
9952          PROG_NAME=zip
9953        else
9954          PROG_NAME=zip
9955        fi
9956        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9957$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9958        as_fn_error $? "Cannot continue" "$LINENO" 5
9959    fi
9960
9961
9962
9963# Non-required basic tools
9964
9965# Extract the first word of "ldd", so it can be a program name with args.
9966set dummy ldd; ac_word=$2
9967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9968$as_echo_n "checking for $ac_word... " >&6; }
9969if test "${ac_cv_path_LDD+set}" = set; then :
9970  $as_echo_n "(cached) " >&6
9971else
9972  case $LDD in
9973  [\\/]* | ?:[\\/]*)
9974  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9975  ;;
9976  *)
9977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9978for as_dir in $PATH
9979do
9980  IFS=$as_save_IFS
9981  test -z "$as_dir" && as_dir=.
9982    for ac_exec_ext in '' $ac_executable_extensions; do
9983  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9984    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9986    break 2
9987  fi
9988done
9989  done
9990IFS=$as_save_IFS
9991
9992  ;;
9993esac
9994fi
9995LDD=$ac_cv_path_LDD
9996if test -n "$LDD"; then
9997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
9998$as_echo "$LDD" >&6; }
9999else
10000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10001$as_echo "no" >&6; }
10002fi
10003
10004
10005if test "x$LDD" = "x"; then
10006    # List shared lib dependencies is used for
10007    # debug output and checking for forbidden dependencies.
10008    # We can build without it.
10009    LDD="true"
10010fi
10011# Extract the first word of "otool", so it can be a program name with args.
10012set dummy otool; ac_word=$2
10013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10014$as_echo_n "checking for $ac_word... " >&6; }
10015if test "${ac_cv_path_OTOOL+set}" = set; then :
10016  $as_echo_n "(cached) " >&6
10017else
10018  case $OTOOL in
10019  [\\/]* | ?:[\\/]*)
10020  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10021  ;;
10022  *)
10023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10024for as_dir in $PATH
10025do
10026  IFS=$as_save_IFS
10027  test -z "$as_dir" && as_dir=.
10028    for ac_exec_ext in '' $ac_executable_extensions; do
10029  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10030    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10032    break 2
10033  fi
10034done
10035  done
10036IFS=$as_save_IFS
10037
10038  ;;
10039esac
10040fi
10041OTOOL=$ac_cv_path_OTOOL
10042if test -n "$OTOOL"; then
10043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10044$as_echo "$OTOOL" >&6; }
10045else
10046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10047$as_echo "no" >&6; }
10048fi
10049
10050
10051if test "x$OTOOL" = "x"; then
10052   OTOOL="true"
10053fi
10054for ac_prog in readelf greadelf
10055do
10056  # Extract the first word of "$ac_prog", so it can be a program name with args.
10057set dummy $ac_prog; ac_word=$2
10058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10059$as_echo_n "checking for $ac_word... " >&6; }
10060if test "${ac_cv_path_READELF+set}" = set; then :
10061  $as_echo_n "(cached) " >&6
10062else
10063  case $READELF in
10064  [\\/]* | ?:[\\/]*)
10065  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10066  ;;
10067  *)
10068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10069for as_dir in $PATH
10070do
10071  IFS=$as_save_IFS
10072  test -z "$as_dir" && as_dir=.
10073    for ac_exec_ext in '' $ac_executable_extensions; do
10074  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10075    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10077    break 2
10078  fi
10079done
10080  done
10081IFS=$as_save_IFS
10082
10083  ;;
10084esac
10085fi
10086READELF=$ac_cv_path_READELF
10087if test -n "$READELF"; then
10088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10089$as_echo "$READELF" >&6; }
10090else
10091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10092$as_echo "no" >&6; }
10093fi
10094
10095
10096  test -n "$READELF" && break
10097done
10098
10099# Extract the first word of "hg", so it can be a program name with args.
10100set dummy hg; ac_word=$2
10101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10102$as_echo_n "checking for $ac_word... " >&6; }
10103if test "${ac_cv_path_HG+set}" = set; then :
10104  $as_echo_n "(cached) " >&6
10105else
10106  case $HG in
10107  [\\/]* | ?:[\\/]*)
10108  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10109  ;;
10110  *)
10111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10112for as_dir in $PATH
10113do
10114  IFS=$as_save_IFS
10115  test -z "$as_dir" && as_dir=.
10116    for ac_exec_ext in '' $ac_executable_extensions; do
10117  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10118    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10120    break 2
10121  fi
10122done
10123  done
10124IFS=$as_save_IFS
10125
10126  ;;
10127esac
10128fi
10129HG=$ac_cv_path_HG
10130if test -n "$HG"; then
10131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10132$as_echo "$HG" >&6; }
10133else
10134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10135$as_echo "no" >&6; }
10136fi
10137
10138
10139# Extract the first word of "stat", so it can be a program name with args.
10140set dummy stat; ac_word=$2
10141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10142$as_echo_n "checking for $ac_word... " >&6; }
10143if test "${ac_cv_path_STAT+set}" = set; then :
10144  $as_echo_n "(cached) " >&6
10145else
10146  case $STAT in
10147  [\\/]* | ?:[\\/]*)
10148  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10149  ;;
10150  *)
10151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10152for as_dir in $PATH
10153do
10154  IFS=$as_save_IFS
10155  test -z "$as_dir" && as_dir=.
10156    for ac_exec_ext in '' $ac_executable_extensions; do
10157  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10158    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10160    break 2
10161  fi
10162done
10163  done
10164IFS=$as_save_IFS
10165
10166  ;;
10167esac
10168fi
10169STAT=$ac_cv_path_STAT
10170if test -n "$STAT"; then
10171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10172$as_echo "$STAT" >&6; }
10173else
10174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10175$as_echo "no" >&6; }
10176fi
10177
10178
10179# Extract the first word of "time", so it can be a program name with args.
10180set dummy time; ac_word=$2
10181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10182$as_echo_n "checking for $ac_word... " >&6; }
10183if test "${ac_cv_path_TIME+set}" = set; then :
10184  $as_echo_n "(cached) " >&6
10185else
10186  case $TIME in
10187  [\\/]* | ?:[\\/]*)
10188  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10189  ;;
10190  *)
10191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10192for as_dir in $PATH
10193do
10194  IFS=$as_save_IFS
10195  test -z "$as_dir" && as_dir=.
10196    for ac_exec_ext in '' $ac_executable_extensions; do
10197  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10198    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10200    break 2
10201  fi
10202done
10203  done
10204IFS=$as_save_IFS
10205
10206  ;;
10207esac
10208fi
10209TIME=$ac_cv_path_TIME
10210if test -n "$TIME"; then
10211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10212$as_echo "$TIME" >&6; }
10213else
10214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10215$as_echo "no" >&6; }
10216fi
10217
10218
10219
10220if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10221
10222    for ac_prog in comm
10223do
10224  # Extract the first word of "$ac_prog", so it can be a program name with args.
10225set dummy $ac_prog; ac_word=$2
10226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10227$as_echo_n "checking for $ac_word... " >&6; }
10228if test "${ac_cv_path_COMM+set}" = set; then :
10229  $as_echo_n "(cached) " >&6
10230else
10231  case $COMM in
10232  [\\/]* | ?:[\\/]*)
10233  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10234  ;;
10235  *)
10236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10237for as_dir in $PATH
10238do
10239  IFS=$as_save_IFS
10240  test -z "$as_dir" && as_dir=.
10241    for ac_exec_ext in '' $ac_executable_extensions; do
10242  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10243    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10245    break 2
10246  fi
10247done
10248  done
10249IFS=$as_save_IFS
10250
10251  ;;
10252esac
10253fi
10254COMM=$ac_cv_path_COMM
10255if test -n "$COMM"; then
10256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10257$as_echo "$COMM" >&6; }
10258else
10259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10260$as_echo "no" >&6; }
10261fi
10262
10263
10264  test -n "$COMM" && break
10265done
10266
10267
10268    if test "x$COMM" = x; then
10269        if test "xcomm" = x; then
10270          PROG_NAME=comm
10271        else
10272          PROG_NAME=comm
10273        fi
10274        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10275$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10276        as_fn_error $? "Cannot continue" "$LINENO" 5
10277    fi
10278
10279
10280fi
10281
10282if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10283
10284    for ac_prog in xattr
10285do
10286  # Extract the first word of "$ac_prog", so it can be a program name with args.
10287set dummy $ac_prog; ac_word=$2
10288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10289$as_echo_n "checking for $ac_word... " >&6; }
10290if test "${ac_cv_path_XATTR+set}" = set; then :
10291  $as_echo_n "(cached) " >&6
10292else
10293  case $XATTR in
10294  [\\/]* | ?:[\\/]*)
10295  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10296  ;;
10297  *)
10298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10299for as_dir in $PATH
10300do
10301  IFS=$as_save_IFS
10302  test -z "$as_dir" && as_dir=.
10303    for ac_exec_ext in '' $ac_executable_extensions; do
10304  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10305    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10307    break 2
10308  fi
10309done
10310  done
10311IFS=$as_save_IFS
10312
10313  ;;
10314esac
10315fi
10316XATTR=$ac_cv_path_XATTR
10317if test -n "$XATTR"; then
10318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10319$as_echo "$XATTR" >&6; }
10320else
10321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10322$as_echo "no" >&6; }
10323fi
10324
10325
10326  test -n "$XATTR" && break
10327done
10328
10329
10330    if test "x$XATTR" = x; then
10331        if test "xxattr" = x; then
10332          PROG_NAME=xattr
10333        else
10334          PROG_NAME=xattr
10335        fi
10336        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10337$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10338        as_fn_error $? "Cannot continue" "$LINENO" 5
10339    fi
10340
10341
10342  # Extract the first word of "codesign", so it can be a program name with args.
10343set dummy codesign; ac_word=$2
10344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10345$as_echo_n "checking for $ac_word... " >&6; }
10346if test "${ac_cv_path_CODESIGN+set}" = set; then :
10347  $as_echo_n "(cached) " >&6
10348else
10349  case $CODESIGN in
10350  [\\/]* | ?:[\\/]*)
10351  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10352  ;;
10353  *)
10354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10355for as_dir in $PATH
10356do
10357  IFS=$as_save_IFS
10358  test -z "$as_dir" && as_dir=.
10359    for ac_exec_ext in '' $ac_executable_extensions; do
10360  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10361    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10363    break 2
10364  fi
10365done
10366  done
10367IFS=$as_save_IFS
10368
10369  ;;
10370esac
10371fi
10372CODESIGN=$ac_cv_path_CODESIGN
10373if test -n "$CODESIGN"; then
10374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10375$as_echo "$CODESIGN" >&6; }
10376else
10377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10378$as_echo "no" >&6; }
10379fi
10380
10381
10382  if test "x$CODESIGN" != "x"; then
10383    # Verify that the openjdk_codesign certificate is present
10384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10385$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10386    rm -f codesign-testfile
10387    touch codesign-testfile
10388    codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10389    rm -f codesign-testfile
10390    if test "x$CODESIGN" = x; then
10391      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10392$as_echo "no" >&6; }
10393    else
10394      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10395$as_echo "yes" >&6; }
10396    fi
10397  fi
10398fi
10399
10400
10401# Check if pkg-config is available.
10402
10403
10404if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10405	if test -n "$ac_tool_prefix"; then
10406  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10407set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10409$as_echo_n "checking for $ac_word... " >&6; }
10410if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10411  $as_echo_n "(cached) " >&6
10412else
10413  case $PKG_CONFIG in
10414  [\\/]* | ?:[\\/]*)
10415  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10416  ;;
10417  *)
10418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10419for as_dir in $PATH
10420do
10421  IFS=$as_save_IFS
10422  test -z "$as_dir" && as_dir=.
10423    for ac_exec_ext in '' $ac_executable_extensions; do
10424  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10425    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10427    break 2
10428  fi
10429done
10430  done
10431IFS=$as_save_IFS
10432
10433  ;;
10434esac
10435fi
10436PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10437if test -n "$PKG_CONFIG"; then
10438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10439$as_echo "$PKG_CONFIG" >&6; }
10440else
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10442$as_echo "no" >&6; }
10443fi
10444
10445
10446fi
10447if test -z "$ac_cv_path_PKG_CONFIG"; then
10448  ac_pt_PKG_CONFIG=$PKG_CONFIG
10449  # Extract the first word of "pkg-config", so it can be a program name with args.
10450set dummy pkg-config; ac_word=$2
10451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10452$as_echo_n "checking for $ac_word... " >&6; }
10453if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10454  $as_echo_n "(cached) " >&6
10455else
10456  case $ac_pt_PKG_CONFIG in
10457  [\\/]* | ?:[\\/]*)
10458  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10459  ;;
10460  *)
10461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10462for as_dir in $PATH
10463do
10464  IFS=$as_save_IFS
10465  test -z "$as_dir" && as_dir=.
10466    for ac_exec_ext in '' $ac_executable_extensions; do
10467  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10468    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10470    break 2
10471  fi
10472done
10473  done
10474IFS=$as_save_IFS
10475
10476  ;;
10477esac
10478fi
10479ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10480if test -n "$ac_pt_PKG_CONFIG"; then
10481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10482$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10483else
10484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10485$as_echo "no" >&6; }
10486fi
10487
10488  if test "x$ac_pt_PKG_CONFIG" = x; then
10489    PKG_CONFIG=""
10490  else
10491    case $cross_compiling:$ac_tool_warned in
10492yes:)
10493{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10494$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10495ac_tool_warned=yes ;;
10496esac
10497    PKG_CONFIG=$ac_pt_PKG_CONFIG
10498  fi
10499else
10500  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10501fi
10502
10503fi
10504if test -n "$PKG_CONFIG"; then
10505	_pkg_min_version=0.9.0
10506	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10507$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10508	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10509		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10510$as_echo "yes" >&6; }
10511	else
10512		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10513$as_echo "no" >&6; }
10514		PKG_CONFIG=""
10515	fi
10516
10517fi
10518
10519# After basic tools have been setup, we can check build os specific details.
10520
10521###############################################################################
10522
10523# Note that this is the build platform OS version!
10524
10525OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10526OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10527OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10528OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10529
10530
10531
10532
10533
10534# Setup builddeps, for automatic downloading of tools we need.
10535# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10536# boot-jdk setup, but we need to have basic tools setup first.
10537
10538
10539# Check whether --with-builddeps-conf was given.
10540if test "${with_builddeps_conf+set}" = set; then :
10541  withval=$with_builddeps_conf;
10542fi
10543
10544
10545
10546# Check whether --with-builddeps-server was given.
10547if test "${with_builddeps_server+set}" = set; then :
10548  withval=$with_builddeps_server;
10549fi
10550
10551
10552
10553# Check whether --with-builddeps-dir was given.
10554if test "${with_builddeps_dir+set}" = set; then :
10555  withval=$with_builddeps_dir;
10556else
10557  with_builddeps_dir=/localhome/builddeps
10558fi
10559
10560
10561
10562# Check whether --with-builddeps-group was given.
10563if test "${with_builddeps_group+set}" = set; then :
10564  withval=$with_builddeps_group;
10565fi
10566
10567
10568
10569
10570    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10571        if test "x$with_builddeps_conf" != x; then
10572            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10573$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10574            builddepsfile=$with_builddeps_conf
10575            if test -s $builddepsfile; then
10576                . $builddepsfile
10577                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10578$as_echo "loaded!" >&6; }
10579            else
10580               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10581           fi
10582        else
10583            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10584$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10585            builddepsfile=`mktemp`
10586            touch $builddepsfile
10587            # Put all found confs into a single file.
10588            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10589            # Source the file to acquire the variables
10590            if test -s $builddepsfile; then
10591                . $builddepsfile
10592                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10593$as_echo "found at least one!" >&6; }
10594            else
10595               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10596           fi
10597        fi
10598        # Create build and target names that use _ instead of "-" and ".".
10599        # This is necessary to use them in variable names.
10600        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10601        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10602        # Extract rewrite information for build and target
10603        eval rewritten_build=\${REWRITE_${build_var}}
10604        if test "x$rewritten_build" = x; then
10605            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10606            echo Build stays the same $rewritten_build
10607        else
10608            echo Rewriting build for builddeps into $rewritten_build
10609        fi
10610        eval rewritten_target=\${REWRITE_${target_var}}
10611        if test "x$rewritten_target" = x; then
10612            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10613            echo Target stays the same $rewritten_target
10614        else
10615            echo Rewriting target for builddeps into $rewritten_target
10616        fi
10617        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10618        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10619    fi
10620    for ac_prog in 7z unzip
10621do
10622  # Extract the first word of "$ac_prog", so it can be a program name with args.
10623set dummy $ac_prog; ac_word=$2
10624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10625$as_echo_n "checking for $ac_word... " >&6; }
10626if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10627  $as_echo_n "(cached) " >&6
10628else
10629  if test -n "$BDEPS_UNZIP"; then
10630  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10631else
10632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10633for as_dir in $PATH
10634do
10635  IFS=$as_save_IFS
10636  test -z "$as_dir" && as_dir=.
10637    for ac_exec_ext in '' $ac_executable_extensions; do
10638  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10639    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10641    break 2
10642  fi
10643done
10644  done
10645IFS=$as_save_IFS
10646
10647fi
10648fi
10649BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10650if test -n "$BDEPS_UNZIP"; then
10651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10652$as_echo "$BDEPS_UNZIP" >&6; }
10653else
10654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10655$as_echo "no" >&6; }
10656fi
10657
10658
10659  test -n "$BDEPS_UNZIP" && break
10660done
10661
10662    if test "x$BDEPS_UNZIP" = x7z; then
10663        BDEPS_UNZIP="7z x"
10664    fi
10665
10666    for ac_prog in wget lftp ftp
10667do
10668  # Extract the first word of "$ac_prog", so it can be a program name with args.
10669set dummy $ac_prog; ac_word=$2
10670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10671$as_echo_n "checking for $ac_word... " >&6; }
10672if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10673  $as_echo_n "(cached) " >&6
10674else
10675  if test -n "$BDEPS_FTP"; then
10676  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10677else
10678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10679for as_dir in $PATH
10680do
10681  IFS=$as_save_IFS
10682  test -z "$as_dir" && as_dir=.
10683    for ac_exec_ext in '' $ac_executable_extensions; do
10684  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10685    ac_cv_prog_BDEPS_FTP="$ac_prog"
10686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10687    break 2
10688  fi
10689done
10690  done
10691IFS=$as_save_IFS
10692
10693fi
10694fi
10695BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10696if test -n "$BDEPS_FTP"; then
10697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10698$as_echo "$BDEPS_FTP" >&6; }
10699else
10700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10701$as_echo "no" >&6; }
10702fi
10703
10704
10705  test -n "$BDEPS_FTP" && break
10706done
10707
10708
10709
10710###############################################################################
10711#
10712# Determine OpenJDK variants, options and version numbers.
10713#
10714###############################################################################
10715
10716# We need build & target for this.
10717
10718
10719###############################################################################
10720#
10721# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10722# We always build headless support.
10723#
10724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10725$as_echo_n "checking headful support... " >&6; }
10726# Check whether --enable-headful was given.
10727if test "${enable_headful+set}" = set; then :
10728  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10729else
10730  SUPPORT_HEADFUL=yes
10731fi
10732
10733
10734SUPPORT_HEADLESS=yes
10735BUILD_HEADLESS="BUILD_HEADLESS:=true"
10736
10737if test "x$SUPPORT_HEADFUL" = xyes; then
10738    # We are building both headful and headless.
10739    headful_msg="inlude support for both headful and headless"
10740fi
10741
10742if test "x$SUPPORT_HEADFUL" = xno; then
10743    # Thus we are building headless only.
10744    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10745    headful_msg="headless only"
10746fi
10747
10748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10749$as_echo "$headful_msg" >&6; }
10750
10751
10752
10753
10754
10755# Control wether Hotspot runs Queens test after build.
10756# Check whether --enable-hotspot-test-in-build was given.
10757if test "${enable_hotspot_test_in_build+set}" = set; then :
10758  enableval=$enable_hotspot_test_in_build;
10759else
10760  enable_hotspot_test_in_build=no
10761fi
10762
10763if test "x$enable_hotspot_test_in_build" = "xyes"; then
10764    TEST_IN_BUILD=true
10765else
10766    TEST_IN_BUILD=false
10767fi
10768
10769
10770###############################################################################
10771#
10772# Choose cacerts source file
10773#
10774
10775# Check whether --with-cacerts-file was given.
10776if test "${with_cacerts_file+set}" = set; then :
10777  withval=$with_cacerts_file;
10778fi
10779
10780if test "x$with_cacerts_file" != x; then
10781    CACERTS_FILE=$with_cacerts_file
10782else
10783    if test "x$OPENJDK" = "xtrue"; then
10784        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10785    else
10786        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10787    fi
10788fi
10789
10790
10791###############################################################################
10792#
10793# Enable or disable unlimited crypto
10794#
10795# Check whether --enable-unlimited-crypto was given.
10796if test "${enable_unlimited_crypto+set}" = set; then :
10797  enableval=$enable_unlimited_crypto;
10798else
10799  enable_unlimited_crypto=no
10800fi
10801
10802if test "x$enable_unlimited_crypto" = "xyes"; then
10803    UNLIMITED_CRYPTO=true
10804else
10805    UNLIMITED_CRYPTO=false
10806fi
10807
10808
10809###############################################################################
10810#
10811# Enable or disable the elliptic curve crypto implementation
10812#
10813
10814
10815###############################################################################
10816#
10817# Compress jars
10818#
10819COMPRESS_JARS=false
10820
10821
10822
10823
10824# Source the version numbers
10825. $AUTOCONF_DIR/version-numbers
10826
10827# Get the settings from parameters
10828
10829# Check whether --with-milestone was given.
10830if test "${with_milestone+set}" = set; then :
10831  withval=$with_milestone;
10832fi
10833
10834if test "x$with_milestone" = xyes; then
10835  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10836elif test "x$with_milestone" != x; then
10837    MILESTONE="$with_milestone"
10838fi
10839if test "x$MILESTONE" = x; then
10840  MILESTONE=internal
10841fi
10842
10843
10844# Check whether --with-build-number was given.
10845if test "${with_build_number+set}" = set; then :
10846  withval=$with_build_number;
10847fi
10848
10849if test "x$with_build_number" = xyes; then
10850  as_fn_error $? "Build number must have a value" "$LINENO" 5
10851elif test "x$with_build_number" != x; then
10852  JDK_BUILD_NUMBER="$with_build_number"
10853fi
10854if test "x$JDK_BUILD_NUMBER" = x; then
10855  JDK_BUILD_NUMBER=b00
10856fi
10857
10858
10859# Check whether --with-user-release-suffix was given.
10860if test "${with_user_release_suffix+set}" = set; then :
10861  withval=$with_user_release_suffix;
10862fi
10863
10864if test "x$with_user_release_suffix" = xyes; then
10865  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10866elif test "x$with_user_release_suffix" != x; then
10867  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10868else
10869  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10870  # Avoid [:alnum:] since it depends on the locale.
10871  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10872  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10873fi
10874
10875
10876# Now set the JDK version, milestone, build number etc.
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891COPYRIGHT_YEAR=`date +'%Y'`
10892
10893
10894if test "x$JDK_UPDATE_VERSION" != x; then
10895  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10896else
10897  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10898fi
10899
10900
10901COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10902
10903
10904
10905###############################################################################
10906#
10907# Setup BootJDK, used to bootstrap the build.
10908#
10909###############################################################################
10910
10911
10912BOOT_JDK_FOUND=no
10913
10914# Check whether --with-boot-jdk was given.
10915if test "${with_boot_jdk+set}" = set; then :
10916  withval=$with_boot_jdk;
10917fi
10918
10919
10920# We look for the Boot JDK through various means, going from more certain to
10921# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10922# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10923# must check if this is indeed valid; otherwise we'll continue looking.
10924
10925# Test: Is bootjdk explicitely set by command line arguments?
10926
10927  if test "x$BOOT_JDK_FOUND" = xno; then
10928    # Now execute the test
10929
10930if test "x$with_boot_jdk" != x; then
10931    BOOT_JDK=$with_boot_jdk
10932    BOOT_JDK_FOUND=maybe
10933    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10934$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10935fi
10936
10937
10938    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10939    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10940      # Do we have a bin/java?
10941      if test ! -x "$BOOT_JDK/bin/java"; then
10942        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10944        BOOT_JDK_FOUND=no
10945      else
10946        # Do we have a bin/javac?
10947        if test ! -x "$BOOT_JDK/bin/javac"; then
10948          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10950          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10951$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10952          BOOT_JDK_FOUND=no
10953        else
10954          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10955          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10956            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10958            BOOT_JDK_FOUND=no
10959          else
10960            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10961            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10962
10963            # Extra M4 quote needed to protect [] in grep expression.
10964            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10965            if test "x$FOUND_VERSION_78" = x; then
10966              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10968              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10969$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10970              BOOT_JDK_FOUND=no
10971            else
10972              # We're done! :-)
10973              BOOT_JDK_FOUND=yes
10974
10975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10976
10977  # Input might be given as Windows format, start by converting to
10978  # unix format.
10979  path="$BOOT_JDK"
10980  new_path=`$CYGPATH -u "$path"`
10981
10982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10985  # "foo.exe" is OK but "foo" is an error.
10986  #
10987  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10988  # It is also a way to make sure we got the proper file name for the real test later on.
10989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10990  if test "x$test_shortpath" = x; then
10991    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10992$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10993    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10994  fi
10995
10996  # Call helper function which possibly converts this using DOS-style short mode.
10997  # If so, the updated path is stored in $new_path.
10998
10999  input_path="$new_path"
11000  # Check if we need to convert this using DOS-style short mode. If the path
11001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11002  # take no chances and rewrite it.
11003  # Note: m4 eats our [], so we need to use [ and ] instead.
11004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11005  if test "x$has_forbidden_chars" != x; then
11006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11007    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11008    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11009    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11010      # Going to short mode and back again did indeed matter. Since short mode is
11011      # case insensitive, let's make it lowercase to improve readability.
11012      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11013      # Now convert it back to Unix-stile (cygpath)
11014      input_path=`$CYGPATH -u "$shortmode_path"`
11015      new_path="$input_path"
11016    fi
11017  fi
11018
11019  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11020  if test "x$test_cygdrive_prefix" = x; then
11021    # As a simple fix, exclude /usr/bin since it's not a real path.
11022    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11023      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11024      # a path prefixed by /cygdrive for fixpath to work.
11025      new_path="$CYGWIN_ROOT_PATH$input_path"
11026    fi
11027  fi
11028
11029
11030  if test "x$path" != "x$new_path"; then
11031    BOOT_JDK="$new_path"
11032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11033$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11034  fi
11035
11036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11037
11038  path="$BOOT_JDK"
11039  has_colon=`$ECHO $path | $GREP ^.:`
11040  new_path="$path"
11041  if test "x$has_colon" = x; then
11042    # Not in mixed or Windows style, start by that.
11043    new_path=`cmd //c echo $path`
11044  fi
11045
11046
11047  input_path="$new_path"
11048  # Check if we need to convert this using DOS-style short mode. If the path
11049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11050  # take no chances and rewrite it.
11051  # Note: m4 eats our [], so we need to use [ and ] instead.
11052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11053  if test "x$has_forbidden_chars" != x; then
11054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11056  fi
11057
11058
11059  windows_path="$new_path"
11060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11061    unix_path=`$CYGPATH -u "$windows_path"`
11062    new_path="$unix_path"
11063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11065    new_path="$unix_path"
11066  fi
11067
11068  if test "x$path" != "x$new_path"; then
11069    BOOT_JDK="$new_path"
11070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11071$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11072  fi
11073
11074  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11075  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11076
11077  else
11078    # We're on a posix platform. Hooray! :)
11079    path="$BOOT_JDK"
11080    has_space=`$ECHO "$path" | $GREP " "`
11081    if test "x$has_space" != x; then
11082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11083$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11084      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11085    fi
11086
11087    # Use eval to expand a potential ~
11088    eval path="$path"
11089    if test ! -f "$path" && test ! -d "$path"; then
11090      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11091    fi
11092
11093    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11094  fi
11095
11096              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11097$as_echo_n "checking for Boot JDK... " >&6; }
11098              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11099$as_echo "$BOOT_JDK" >&6; }
11100              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11101$as_echo_n "checking Boot JDK version... " >&6; }
11102              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11103              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11104$as_echo "$BOOT_JDK_VERSION" >&6; }
11105            fi # end check jdk version
11106          fi # end check rt.jar
11107        fi # end check javac
11108      fi # end check java
11109    fi # end check boot jdk found
11110  fi
11111
11112if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11113  # Having specified an argument which is incorrect will produce an instant failure;
11114  # we should not go on looking
11115  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11116fi
11117
11118# Test: Is bootjdk available from builddeps?
11119
11120  if test "x$BOOT_JDK_FOUND" = xno; then
11121    # Now execute the test
11122
11123
11124
11125    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11126        # Source the builddeps file again, to make sure it uses the latest variables!
11127        . $builddepsfile
11128        # Look for a target and build machine specific resource!
11129        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11130        if test "x$resource" = x; then
11131            # Ok, lets instead look for a target specific resource
11132            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11133        fi
11134        if test "x$resource" = x; then
11135            # Ok, lets instead look for a build specific resource
11136            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11137        fi
11138        if test "x$resource" = x; then
11139            # Ok, lets instead look for a generic resource
11140            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11141            resource=${builddep_bootjdk}
11142        fi
11143        if test "x$resource" != x; then
11144            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11145$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11146	    # If the resource in the builddeps.conf file is an existing directory,
11147	    # for example /java/linux/cups
11148	    if test -d ${resource}; then
11149	       depdir=${resource}
11150	    else
11151
11152# bootjdk is for example mymodule
11153# $resource is for example libs/general/libmymod_1_2_3.zip
11154# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11155# $with_builddeps_dir is for example /localhome/builddeps
11156# depdir is the name of the variable into which we store the depdir, eg MYMOD
11157# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11158# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11159    filename=`basename $resource`
11160    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11161    filebase=${filename%%.*}
11162    extension=${filename#*.}
11163    installdir=$with_builddeps_dir/$filebase
11164    if test ! -f $installdir/$filename.unpacked; then
11165        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11166$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11167        if test ! -d $installdir; then
11168            mkdir -p $installdir
11169        fi
11170        if test ! -d $installdir; then
11171            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11172        fi
11173        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11174        touch $tmpfile
11175        if test ! -f $tmpfile; then
11176            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11177        fi
11178
11179    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11180    # $tmpfile is the local file name for the downloaded file.
11181    VALID_TOOL=no
11182    if test "x$BDEPS_FTP" = xwget; then
11183       VALID_TOOL=yes
11184       wget -O $tmpfile $with_builddeps_server/$resource
11185    fi
11186    if test "x$BDEPS_FTP" = xlftp; then
11187       VALID_TOOL=yes
11188       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11189    fi
11190    if test "x$BDEPS_FTP" = xftp; then
11191        VALID_TOOL=yes
11192        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11193        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11194        FTPUSERPWD=${FTPSERVER%%@*}
11195        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11196            FTPUSER=${userpwd%%:*}
11197            FTPPWD=${userpwd#*@}
11198            FTPSERVER=${FTPSERVER#*@}
11199        else
11200            FTPUSER=ftp
11201            FTPPWD=ftp
11202        fi
11203        # the "pass" command does not work on some
11204        # ftp clients (read ftp.exe) but if it works,
11205        # passive mode is better!
11206        (\
11207            echo "user $FTPUSER $FTPPWD"        ;\
11208            echo "pass"                         ;\
11209            echo "bin"                          ;\
11210            echo "get $FTPPATH $tmpfile"              ;\
11211        ) | ftp -in $FTPSERVER
11212    fi
11213    if test "x$VALID_TOOL" != xyes; then
11214       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11215    fi
11216
11217        mv $tmpfile $installdir/$filename
11218        if test ! -s $installdir/$filename; then
11219            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11220        fi
11221        case "$extension" in
11222            zip)  echo "Unzipping $installdir/$filename..."
11223               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11224            ;;
11225            tar.gz) echo "Untaring $installdir/$filename..."
11226               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11227            ;;
11228            tgz) echo "Untaring $installdir/$filename..."
11229               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11230            ;;
11231            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11232            ;;
11233        esac
11234    fi
11235    if test -f $installdir/$filename.unpacked; then
11236        depdir=$installdir
11237    fi
11238
11239	    fi
11240            # Source the builddeps file again, because in the previous command, the depdir
11241            # was updated to point at the current build dependency install directory.
11242            . $builddepsfile
11243            # Now extract variables from the builddeps.conf files.
11244            theroot=${builddep_bootjdk_ROOT}
11245            thecflags=${builddep_bootjdk_CFLAGS}
11246            thelibs=${builddep_bootjdk_LIBS}
11247            if test "x$depdir" = x; then
11248                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11249            fi
11250            BOOT_JDK=$depdir
11251            if test "x$theroot" != x; then
11252               BOOT_JDK="$theroot"
11253            fi
11254            if test "x$thecflags" != x; then
11255               BOOT_JDK_CFLAGS="$thecflags"
11256            fi
11257            if test "x$thelibs" != x; then
11258               BOOT_JDK_LIBS="$thelibs"
11259            fi
11260            BOOT_JDK_FOUND=maybe
11261            else BOOT_JDK_FOUND=no
11262
11263        fi
11264        else BOOT_JDK_FOUND=no
11265
11266    fi
11267
11268
11269
11270    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11271    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11272      # Do we have a bin/java?
11273      if test ! -x "$BOOT_JDK/bin/java"; then
11274        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11276        BOOT_JDK_FOUND=no
11277      else
11278        # Do we have a bin/javac?
11279        if test ! -x "$BOOT_JDK/bin/javac"; then
11280          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11281$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11282          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11283$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11284          BOOT_JDK_FOUND=no
11285        else
11286          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11287          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11288            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11290            BOOT_JDK_FOUND=no
11291          else
11292            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11293            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11294
11295            # Extra M4 quote needed to protect [] in grep expression.
11296            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11297            if test "x$FOUND_VERSION_78" = x; then
11298              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11299$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11300              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11301$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11302              BOOT_JDK_FOUND=no
11303            else
11304              # We're done! :-)
11305              BOOT_JDK_FOUND=yes
11306
11307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11308
11309  # Input might be given as Windows format, start by converting to
11310  # unix format.
11311  path="$BOOT_JDK"
11312  new_path=`$CYGPATH -u "$path"`
11313
11314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11317  # "foo.exe" is OK but "foo" is an error.
11318  #
11319  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11320  # It is also a way to make sure we got the proper file name for the real test later on.
11321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11322  if test "x$test_shortpath" = x; then
11323    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11324$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11325    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11326  fi
11327
11328  # Call helper function which possibly converts this using DOS-style short mode.
11329  # If so, the updated path is stored in $new_path.
11330
11331  input_path="$new_path"
11332  # Check if we need to convert this using DOS-style short mode. If the path
11333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11334  # take no chances and rewrite it.
11335  # Note: m4 eats our [], so we need to use [ and ] instead.
11336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11337  if test "x$has_forbidden_chars" != x; then
11338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11342      # Going to short mode and back again did indeed matter. Since short mode is
11343      # case insensitive, let's make it lowercase to improve readability.
11344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11345      # Now convert it back to Unix-stile (cygpath)
11346      input_path=`$CYGPATH -u "$shortmode_path"`
11347      new_path="$input_path"
11348    fi
11349  fi
11350
11351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11352  if test "x$test_cygdrive_prefix" = x; then
11353    # As a simple fix, exclude /usr/bin since it's not a real path.
11354    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11356      # a path prefixed by /cygdrive for fixpath to work.
11357      new_path="$CYGWIN_ROOT_PATH$input_path"
11358    fi
11359  fi
11360
11361
11362  if test "x$path" != "x$new_path"; then
11363    BOOT_JDK="$new_path"
11364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11365$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11366  fi
11367
11368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11369
11370  path="$BOOT_JDK"
11371  has_colon=`$ECHO $path | $GREP ^.:`
11372  new_path="$path"
11373  if test "x$has_colon" = x; then
11374    # Not in mixed or Windows style, start by that.
11375    new_path=`cmd //c echo $path`
11376  fi
11377
11378
11379  input_path="$new_path"
11380  # Check if we need to convert this using DOS-style short mode. If the path
11381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11382  # take no chances and rewrite it.
11383  # Note: m4 eats our [], so we need to use [ and ] instead.
11384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11385  if test "x$has_forbidden_chars" != x; then
11386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11388  fi
11389
11390
11391  windows_path="$new_path"
11392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11393    unix_path=`$CYGPATH -u "$windows_path"`
11394    new_path="$unix_path"
11395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11397    new_path="$unix_path"
11398  fi
11399
11400  if test "x$path" != "x$new_path"; then
11401    BOOT_JDK="$new_path"
11402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11403$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11404  fi
11405
11406  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11407  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11408
11409  else
11410    # We're on a posix platform. Hooray! :)
11411    path="$BOOT_JDK"
11412    has_space=`$ECHO "$path" | $GREP " "`
11413    if test "x$has_space" != x; then
11414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11415$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11416      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11417    fi
11418
11419    # Use eval to expand a potential ~
11420    eval path="$path"
11421    if test ! -f "$path" && test ! -d "$path"; then
11422      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11423    fi
11424
11425    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11426  fi
11427
11428              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11429$as_echo_n "checking for Boot JDK... " >&6; }
11430              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11431$as_echo "$BOOT_JDK" >&6; }
11432              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11433$as_echo_n "checking Boot JDK version... " >&6; }
11434              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11435              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11436$as_echo "$BOOT_JDK_VERSION" >&6; }
11437            fi # end check jdk version
11438          fi # end check rt.jar
11439        fi # end check javac
11440      fi # end check java
11441    fi # end check boot jdk found
11442  fi
11443
11444
11445# Test: Is $JAVA_HOME set?
11446
11447  if test "x$BOOT_JDK_FOUND" = xno; then
11448    # Now execute the test
11449
11450    if test "x$JAVA_HOME" != x; then
11451        JAVA_HOME_PROCESSED="$JAVA_HOME"
11452
11453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11454
11455  # Input might be given as Windows format, start by converting to
11456  # unix format.
11457  path="$JAVA_HOME_PROCESSED"
11458  new_path=`$CYGPATH -u "$path"`
11459
11460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11463  # "foo.exe" is OK but "foo" is an error.
11464  #
11465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11466  # It is also a way to make sure we got the proper file name for the real test later on.
11467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11468  if test "x$test_shortpath" = x; then
11469    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11470$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11471    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11472  fi
11473
11474  # Call helper function which possibly converts this using DOS-style short mode.
11475  # If so, the updated path is stored in $new_path.
11476
11477  input_path="$new_path"
11478  # Check if we need to convert this using DOS-style short mode. If the path
11479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11480  # take no chances and rewrite it.
11481  # Note: m4 eats our [], so we need to use [ and ] instead.
11482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11483  if test "x$has_forbidden_chars" != x; then
11484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11488      # Going to short mode and back again did indeed matter. Since short mode is
11489      # case insensitive, let's make it lowercase to improve readability.
11490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11491      # Now convert it back to Unix-stile (cygpath)
11492      input_path=`$CYGPATH -u "$shortmode_path"`
11493      new_path="$input_path"
11494    fi
11495  fi
11496
11497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11498  if test "x$test_cygdrive_prefix" = x; then
11499    # As a simple fix, exclude /usr/bin since it's not a real path.
11500    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11502      # a path prefixed by /cygdrive for fixpath to work.
11503      new_path="$CYGWIN_ROOT_PATH$input_path"
11504    fi
11505  fi
11506
11507
11508  if test "x$path" != "x$new_path"; then
11509    JAVA_HOME_PROCESSED="$new_path"
11510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11511$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11512  fi
11513
11514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11515
11516  path="$JAVA_HOME_PROCESSED"
11517  has_colon=`$ECHO $path | $GREP ^.:`
11518  new_path="$path"
11519  if test "x$has_colon" = x; then
11520    # Not in mixed or Windows style, start by that.
11521    new_path=`cmd //c echo $path`
11522  fi
11523
11524
11525  input_path="$new_path"
11526  # Check if we need to convert this using DOS-style short mode. If the path
11527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11528  # take no chances and rewrite it.
11529  # Note: m4 eats our [], so we need to use [ and ] instead.
11530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11531  if test "x$has_forbidden_chars" != x; then
11532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11534  fi
11535
11536
11537  windows_path="$new_path"
11538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11539    unix_path=`$CYGPATH -u "$windows_path"`
11540    new_path="$unix_path"
11541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11543    new_path="$unix_path"
11544  fi
11545
11546  if test "x$path" != "x$new_path"; then
11547    JAVA_HOME_PROCESSED="$new_path"
11548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11549$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11550  fi
11551
11552  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11553  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11554
11555  else
11556    # We're on a posix platform. Hooray! :)
11557    path="$JAVA_HOME_PROCESSED"
11558    has_space=`$ECHO "$path" | $GREP " "`
11559    if test "x$has_space" != x; then
11560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11561$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11562      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11563    fi
11564
11565    # Use eval to expand a potential ~
11566    eval path="$path"
11567    if test ! -f "$path" && test ! -d "$path"; then
11568      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11569    fi
11570
11571    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11572  fi
11573
11574        if test ! -d "$JAVA_HOME_PROCESSED"; then
11575            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11576$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11577        else
11578          # Aha, the user has set a JAVA_HOME
11579          # let us use that as the Boot JDK.
11580          BOOT_JDK="$JAVA_HOME_PROCESSED"
11581          BOOT_JDK_FOUND=maybe
11582          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11583$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11584        fi
11585    fi
11586
11587
11588    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11589    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11590      # Do we have a bin/java?
11591      if test ! -x "$BOOT_JDK/bin/java"; then
11592        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11594        BOOT_JDK_FOUND=no
11595      else
11596        # Do we have a bin/javac?
11597        if test ! -x "$BOOT_JDK/bin/javac"; then
11598          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11600          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11601$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11602          BOOT_JDK_FOUND=no
11603        else
11604          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11605          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11606            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11608            BOOT_JDK_FOUND=no
11609          else
11610            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11611            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11612
11613            # Extra M4 quote needed to protect [] in grep expression.
11614            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11615            if test "x$FOUND_VERSION_78" = x; then
11616              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11618              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11619$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11620              BOOT_JDK_FOUND=no
11621            else
11622              # We're done! :-)
11623              BOOT_JDK_FOUND=yes
11624
11625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11626
11627  # Input might be given as Windows format, start by converting to
11628  # unix format.
11629  path="$BOOT_JDK"
11630  new_path=`$CYGPATH -u "$path"`
11631
11632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11635  # "foo.exe" is OK but "foo" is an error.
11636  #
11637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11638  # It is also a way to make sure we got the proper file name for the real test later on.
11639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11640  if test "x$test_shortpath" = x; then
11641    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11642$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11643    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11644  fi
11645
11646  # Call helper function which possibly converts this using DOS-style short mode.
11647  # If so, the updated path is stored in $new_path.
11648
11649  input_path="$new_path"
11650  # Check if we need to convert this using DOS-style short mode. If the path
11651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11652  # take no chances and rewrite it.
11653  # Note: m4 eats our [], so we need to use [ and ] instead.
11654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11655  if test "x$has_forbidden_chars" != x; then
11656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11660      # Going to short mode and back again did indeed matter. Since short mode is
11661      # case insensitive, let's make it lowercase to improve readability.
11662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11663      # Now convert it back to Unix-stile (cygpath)
11664      input_path=`$CYGPATH -u "$shortmode_path"`
11665      new_path="$input_path"
11666    fi
11667  fi
11668
11669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11670  if test "x$test_cygdrive_prefix" = x; then
11671    # As a simple fix, exclude /usr/bin since it's not a real path.
11672    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11674      # a path prefixed by /cygdrive for fixpath to work.
11675      new_path="$CYGWIN_ROOT_PATH$input_path"
11676    fi
11677  fi
11678
11679
11680  if test "x$path" != "x$new_path"; then
11681    BOOT_JDK="$new_path"
11682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11683$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11684  fi
11685
11686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11687
11688  path="$BOOT_JDK"
11689  has_colon=`$ECHO $path | $GREP ^.:`
11690  new_path="$path"
11691  if test "x$has_colon" = x; then
11692    # Not in mixed or Windows style, start by that.
11693    new_path=`cmd //c echo $path`
11694  fi
11695
11696
11697  input_path="$new_path"
11698  # Check if we need to convert this using DOS-style short mode. If the path
11699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11700  # take no chances and rewrite it.
11701  # Note: m4 eats our [], so we need to use [ and ] instead.
11702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11703  if test "x$has_forbidden_chars" != x; then
11704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11706  fi
11707
11708
11709  windows_path="$new_path"
11710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11711    unix_path=`$CYGPATH -u "$windows_path"`
11712    new_path="$unix_path"
11713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11715    new_path="$unix_path"
11716  fi
11717
11718  if test "x$path" != "x$new_path"; then
11719    BOOT_JDK="$new_path"
11720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11721$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11722  fi
11723
11724  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11725  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11726
11727  else
11728    # We're on a posix platform. Hooray! :)
11729    path="$BOOT_JDK"
11730    has_space=`$ECHO "$path" | $GREP " "`
11731    if test "x$has_space" != x; then
11732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11733$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11734      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11735    fi
11736
11737    # Use eval to expand a potential ~
11738    eval path="$path"
11739    if test ! -f "$path" && test ! -d "$path"; then
11740      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11741    fi
11742
11743    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11744  fi
11745
11746              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11747$as_echo_n "checking for Boot JDK... " >&6; }
11748              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11749$as_echo "$BOOT_JDK" >&6; }
11750              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11751$as_echo_n "checking Boot JDK version... " >&6; }
11752              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11753              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11754$as_echo "$BOOT_JDK_VERSION" >&6; }
11755            fi # end check jdk version
11756          fi # end check rt.jar
11757        fi # end check javac
11758      fi # end check java
11759    fi # end check boot jdk found
11760  fi
11761
11762
11763# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11764
11765  if test "x$BOOT_JDK_FOUND" = xno; then
11766    # Now execute the test
11767
11768    if test -x /usr/libexec/java_home; then
11769        BOOT_JDK=`/usr/libexec/java_home`
11770        BOOT_JDK_FOUND=maybe
11771        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11772$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11773    fi
11774
11775
11776    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11777    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11778      # Do we have a bin/java?
11779      if test ! -x "$BOOT_JDK/bin/java"; then
11780        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11782        BOOT_JDK_FOUND=no
11783      else
11784        # Do we have a bin/javac?
11785        if test ! -x "$BOOT_JDK/bin/javac"; then
11786          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11788          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11789$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11790          BOOT_JDK_FOUND=no
11791        else
11792          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11793          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11794            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11796            BOOT_JDK_FOUND=no
11797          else
11798            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11799            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11800
11801            # Extra M4 quote needed to protect [] in grep expression.
11802            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11803            if test "x$FOUND_VERSION_78" = x; then
11804              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11806              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11807$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11808              BOOT_JDK_FOUND=no
11809            else
11810              # We're done! :-)
11811              BOOT_JDK_FOUND=yes
11812
11813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11814
11815  # Input might be given as Windows format, start by converting to
11816  # unix format.
11817  path="$BOOT_JDK"
11818  new_path=`$CYGPATH -u "$path"`
11819
11820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11823  # "foo.exe" is OK but "foo" is an error.
11824  #
11825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11826  # It is also a way to make sure we got the proper file name for the real test later on.
11827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11828  if test "x$test_shortpath" = x; then
11829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11830$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11831    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11832  fi
11833
11834  # Call helper function which possibly converts this using DOS-style short mode.
11835  # If so, the updated path is stored in $new_path.
11836
11837  input_path="$new_path"
11838  # Check if we need to convert this using DOS-style short mode. If the path
11839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11840  # take no chances and rewrite it.
11841  # Note: m4 eats our [], so we need to use [ and ] instead.
11842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11843  if test "x$has_forbidden_chars" != x; then
11844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11848      # Going to short mode and back again did indeed matter. Since short mode is
11849      # case insensitive, let's make it lowercase to improve readability.
11850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11851      # Now convert it back to Unix-stile (cygpath)
11852      input_path=`$CYGPATH -u "$shortmode_path"`
11853      new_path="$input_path"
11854    fi
11855  fi
11856
11857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11858  if test "x$test_cygdrive_prefix" = x; then
11859    # As a simple fix, exclude /usr/bin since it's not a real path.
11860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11862      # a path prefixed by /cygdrive for fixpath to work.
11863      new_path="$CYGWIN_ROOT_PATH$input_path"
11864    fi
11865  fi
11866
11867
11868  if test "x$path" != "x$new_path"; then
11869    BOOT_JDK="$new_path"
11870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11871$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11872  fi
11873
11874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11875
11876  path="$BOOT_JDK"
11877  has_colon=`$ECHO $path | $GREP ^.:`
11878  new_path="$path"
11879  if test "x$has_colon" = x; then
11880    # Not in mixed or Windows style, start by that.
11881    new_path=`cmd //c echo $path`
11882  fi
11883
11884
11885  input_path="$new_path"
11886  # Check if we need to convert this using DOS-style short mode. If the path
11887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11888  # take no chances and rewrite it.
11889  # Note: m4 eats our [], so we need to use [ and ] instead.
11890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11891  if test "x$has_forbidden_chars" != x; then
11892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11894  fi
11895
11896
11897  windows_path="$new_path"
11898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11899    unix_path=`$CYGPATH -u "$windows_path"`
11900    new_path="$unix_path"
11901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11903    new_path="$unix_path"
11904  fi
11905
11906  if test "x$path" != "x$new_path"; then
11907    BOOT_JDK="$new_path"
11908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11909$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11910  fi
11911
11912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11914
11915  else
11916    # We're on a posix platform. Hooray! :)
11917    path="$BOOT_JDK"
11918    has_space=`$ECHO "$path" | $GREP " "`
11919    if test "x$has_space" != x; then
11920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11921$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11922      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11923    fi
11924
11925    # Use eval to expand a potential ~
11926    eval path="$path"
11927    if test ! -f "$path" && test ! -d "$path"; then
11928      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11929    fi
11930
11931    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11932  fi
11933
11934              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11935$as_echo_n "checking for Boot JDK... " >&6; }
11936              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11937$as_echo "$BOOT_JDK" >&6; }
11938              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11939$as_echo_n "checking Boot JDK version... " >&6; }
11940              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11941              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11942$as_echo "$BOOT_JDK_VERSION" >&6; }
11943            fi # end check jdk version
11944          fi # end check rt.jar
11945        fi # end check javac
11946      fi # end check java
11947    fi # end check boot jdk found
11948  fi
11949
11950
11951# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11952
11953  if test "x$BOOT_JDK_FOUND" = xno; then
11954    # Now execute the test
11955
11956    # Extract the first word of "javac", so it can be a program name with args.
11957set dummy javac; ac_word=$2
11958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11959$as_echo_n "checking for $ac_word... " >&6; }
11960if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11961  $as_echo_n "(cached) " >&6
11962else
11963  case $JAVAC_CHECK in
11964  [\\/]* | ?:[\\/]*)
11965  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11966  ;;
11967  *)
11968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11969for as_dir in $PATH
11970do
11971  IFS=$as_save_IFS
11972  test -z "$as_dir" && as_dir=.
11973    for ac_exec_ext in '' $ac_executable_extensions; do
11974  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11975    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11977    break 2
11978  fi
11979done
11980  done
11981IFS=$as_save_IFS
11982
11983  ;;
11984esac
11985fi
11986JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11987if test -n "$JAVAC_CHECK"; then
11988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11989$as_echo "$JAVAC_CHECK" >&6; }
11990else
11991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11992$as_echo "no" >&6; }
11993fi
11994
11995
11996    # Extract the first word of "java", so it can be a program name with args.
11997set dummy java; ac_word=$2
11998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11999$as_echo_n "checking for $ac_word... " >&6; }
12000if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12001  $as_echo_n "(cached) " >&6
12002else
12003  case $JAVA_CHECK in
12004  [\\/]* | ?:[\\/]*)
12005  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12006  ;;
12007  *)
12008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12009for as_dir in $PATH
12010do
12011  IFS=$as_save_IFS
12012  test -z "$as_dir" && as_dir=.
12013    for ac_exec_ext in '' $ac_executable_extensions; do
12014  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12015    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12017    break 2
12018  fi
12019done
12020  done
12021IFS=$as_save_IFS
12022
12023  ;;
12024esac
12025fi
12026JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12027if test -n "$JAVA_CHECK"; then
12028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12029$as_echo "$JAVA_CHECK" >&6; }
12030else
12031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12032$as_echo "no" >&6; }
12033fi
12034
12035
12036    BINARY="$JAVAC_CHECK"
12037    if test "x$JAVAC_CHECK" = x; then
12038        BINARY="$JAVA_CHECK"
12039    fi
12040    if test "x$BINARY" != x; then
12041        # So there is a java(c) binary, it might be part of a JDK.
12042        # Lets find the JDK/JRE directory by following symbolic links.
12043        # Linux/GNU systems often have links from /usr/bin/java to
12044        # /etc/alternatives/java to the real JDK binary.
12045
12046    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12047        # Follow a chain of symbolic links. Use readlink
12048        # where it exists, else fall back to horribly
12049        # complicated shell code.
12050        if test "x$READLINK_TESTED" != yes; then
12051            # On MacOSX there is a readlink tool with a different
12052            # purpose than the GNU readlink tool. Check the found readlink.
12053            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12054            if test "x$ISGNU" = x; then
12055                 # A readlink that we do not know how to use.
12056                 # Are there other non-GNU readlinks out there?
12057                 READLINK_TESTED=yes
12058                 READLINK=
12059            fi
12060        fi
12061
12062        if test "x$READLINK" != x; then
12063            BINARY=`$READLINK -f $BINARY`
12064        else
12065            # Save the current directory for restoring afterwards
12066            STARTDIR=$PWD
12067            COUNTER=0
12068            sym_link_dir=`$DIRNAME $BINARY`
12069            sym_link_file=`$BASENAME $BINARY`
12070            cd $sym_link_dir
12071            # Use -P flag to resolve symlinks in directories.
12072            cd `$THEPWDCMD -P`
12073            sym_link_dir=`$THEPWDCMD -P`
12074            # Resolve file symlinks
12075            while test $COUNTER -lt 20; do
12076                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12077                if test "x$ISLINK" == x; then
12078                    # This is not a symbolic link! We are done!
12079                    break
12080                fi
12081                # Again resolve directory symlinks since the target of the just found
12082                # link could be in a different directory
12083                cd `$DIRNAME $ISLINK`
12084                sym_link_dir=`$THEPWDCMD -P`
12085                sym_link_file=`$BASENAME $ISLINK`
12086                let COUNTER=COUNTER+1
12087            done
12088            cd $STARTDIR
12089            BINARY=$sym_link_dir/$sym_link_file
12090        fi
12091    fi
12092
12093        BOOT_JDK=`dirname "$BINARY"`
12094        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12095        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12096            # Looks like we found ourselves an JDK
12097            BOOT_JDK_FOUND=maybe
12098            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12099$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12100        fi
12101    fi
12102
12103
12104    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12105    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12106      # Do we have a bin/java?
12107      if test ! -x "$BOOT_JDK/bin/java"; then
12108        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12110        BOOT_JDK_FOUND=no
12111      else
12112        # Do we have a bin/javac?
12113        if test ! -x "$BOOT_JDK/bin/javac"; then
12114          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12116          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12117$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12118          BOOT_JDK_FOUND=no
12119        else
12120          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12121          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12122            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12124            BOOT_JDK_FOUND=no
12125          else
12126            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12127            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12128
12129            # Extra M4 quote needed to protect [] in grep expression.
12130            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12131            if test "x$FOUND_VERSION_78" = x; then
12132              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12133$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12134              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12135$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12136              BOOT_JDK_FOUND=no
12137            else
12138              # We're done! :-)
12139              BOOT_JDK_FOUND=yes
12140
12141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12142
12143  # Input might be given as Windows format, start by converting to
12144  # unix format.
12145  path="$BOOT_JDK"
12146  new_path=`$CYGPATH -u "$path"`
12147
12148  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12149  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12150  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12151  # "foo.exe" is OK but "foo" is an error.
12152  #
12153  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12154  # It is also a way to make sure we got the proper file name for the real test later on.
12155  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12156  if test "x$test_shortpath" = x; then
12157    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12158$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12159    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12160  fi
12161
12162  # Call helper function which possibly converts this using DOS-style short mode.
12163  # If so, the updated path is stored in $new_path.
12164
12165  input_path="$new_path"
12166  # Check if we need to convert this using DOS-style short mode. If the path
12167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12168  # take no chances and rewrite it.
12169  # Note: m4 eats our [], so we need to use [ and ] instead.
12170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12171  if test "x$has_forbidden_chars" != x; then
12172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12176      # Going to short mode and back again did indeed matter. Since short mode is
12177      # case insensitive, let's make it lowercase to improve readability.
12178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12179      # Now convert it back to Unix-stile (cygpath)
12180      input_path=`$CYGPATH -u "$shortmode_path"`
12181      new_path="$input_path"
12182    fi
12183  fi
12184
12185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12186  if test "x$test_cygdrive_prefix" = x; then
12187    # As a simple fix, exclude /usr/bin since it's not a real path.
12188    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12190      # a path prefixed by /cygdrive for fixpath to work.
12191      new_path="$CYGWIN_ROOT_PATH$input_path"
12192    fi
12193  fi
12194
12195
12196  if test "x$path" != "x$new_path"; then
12197    BOOT_JDK="$new_path"
12198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12199$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12200  fi
12201
12202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12203
12204  path="$BOOT_JDK"
12205  has_colon=`$ECHO $path | $GREP ^.:`
12206  new_path="$path"
12207  if test "x$has_colon" = x; then
12208    # Not in mixed or Windows style, start by that.
12209    new_path=`cmd //c echo $path`
12210  fi
12211
12212
12213  input_path="$new_path"
12214  # Check if we need to convert this using DOS-style short mode. If the path
12215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12216  # take no chances and rewrite it.
12217  # Note: m4 eats our [], so we need to use [ and ] instead.
12218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12219  if test "x$has_forbidden_chars" != x; then
12220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12222  fi
12223
12224
12225  windows_path="$new_path"
12226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12227    unix_path=`$CYGPATH -u "$windows_path"`
12228    new_path="$unix_path"
12229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12231    new_path="$unix_path"
12232  fi
12233
12234  if test "x$path" != "x$new_path"; then
12235    BOOT_JDK="$new_path"
12236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12237$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12238  fi
12239
12240  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12241  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12242
12243  else
12244    # We're on a posix platform. Hooray! :)
12245    path="$BOOT_JDK"
12246    has_space=`$ECHO "$path" | $GREP " "`
12247    if test "x$has_space" != x; then
12248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12249$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12250      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12251    fi
12252
12253    # Use eval to expand a potential ~
12254    eval path="$path"
12255    if test ! -f "$path" && test ! -d "$path"; then
12256      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12257    fi
12258
12259    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12260  fi
12261
12262              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12263$as_echo_n "checking for Boot JDK... " >&6; }
12264              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12265$as_echo "$BOOT_JDK" >&6; }
12266              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12267$as_echo_n "checking Boot JDK version... " >&6; }
12268              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12269              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12270$as_echo "$BOOT_JDK_VERSION" >&6; }
12271            fi # end check jdk version
12272          fi # end check rt.jar
12273        fi # end check javac
12274      fi # end check java
12275    fi # end check boot jdk found
12276  fi
12277
12278
12279# Test: Is there a JDK installed in default, well-known locations?
12280
12281  if test "x$BOOT_JDK_FOUND" = xno; then
12282    # Now execute the test
12283
12284  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12285
12286  if test "x$BOOT_JDK_FOUND" = xno; then
12287    # Now execute the test
12288
12289  if test "x$ProgramW6432" != x; then
12290    VIRTUAL_DIR="$ProgramW6432/Java"
12291
12292  windows_path="$VIRTUAL_DIR"
12293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12294    unix_path=`$CYGPATH -u "$windows_path"`
12295    VIRTUAL_DIR="$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    VIRTUAL_DIR="$unix_path"
12299  fi
12300
12301
12302  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12303  BOOT_JDK_SUFFIX=""
12304  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12305  if test "x$ALL_JDKS_FOUND" != x; then
12306    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12307
12308  if test "x$BOOT_JDK_FOUND" = xno; then
12309    # Now execute the test
12310
12311        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12312        if test -d "$BOOT_JDK"; then
12313          BOOT_JDK_FOUND=maybe
12314          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12315$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12316        fi
12317
12318
12319    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12320    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12321      # Do we have a bin/java?
12322      if test ! -x "$BOOT_JDK/bin/java"; then
12323        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12325        BOOT_JDK_FOUND=no
12326      else
12327        # Do we have a bin/javac?
12328        if test ! -x "$BOOT_JDK/bin/javac"; then
12329          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12331          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12332$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12333          BOOT_JDK_FOUND=no
12334        else
12335          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12336          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12337            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12339            BOOT_JDK_FOUND=no
12340          else
12341            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12342            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12343
12344            # Extra M4 quote needed to protect [] in grep expression.
12345            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12346            if test "x$FOUND_VERSION_78" = x; then
12347              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12348$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12349              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12350$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12351              BOOT_JDK_FOUND=no
12352            else
12353              # We're done! :-)
12354              BOOT_JDK_FOUND=yes
12355
12356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12357
12358  # Input might be given as Windows format, start by converting to
12359  # unix format.
12360  path="$BOOT_JDK"
12361  new_path=`$CYGPATH -u "$path"`
12362
12363  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12364  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12365  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12366  # "foo.exe" is OK but "foo" is an error.
12367  #
12368  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12369  # It is also a way to make sure we got the proper file name for the real test later on.
12370  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12371  if test "x$test_shortpath" = x; then
12372    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12373$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12374    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12375  fi
12376
12377  # Call helper function which possibly converts this using DOS-style short mode.
12378  # If so, the updated path is stored in $new_path.
12379
12380  input_path="$new_path"
12381  # Check if we need to convert this using DOS-style short mode. If the path
12382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12383  # take no chances and rewrite it.
12384  # Note: m4 eats our [], so we need to use [ and ] instead.
12385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12386  if test "x$has_forbidden_chars" != x; then
12387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12388    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12389    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12390    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12391      # Going to short mode and back again did indeed matter. Since short mode is
12392      # case insensitive, let's make it lowercase to improve readability.
12393      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12394      # Now convert it back to Unix-stile (cygpath)
12395      input_path=`$CYGPATH -u "$shortmode_path"`
12396      new_path="$input_path"
12397    fi
12398  fi
12399
12400  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12401  if test "x$test_cygdrive_prefix" = x; then
12402    # As a simple fix, exclude /usr/bin since it's not a real path.
12403    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12404      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12405      # a path prefixed by /cygdrive for fixpath to work.
12406      new_path="$CYGWIN_ROOT_PATH$input_path"
12407    fi
12408  fi
12409
12410
12411  if test "x$path" != "x$new_path"; then
12412    BOOT_JDK="$new_path"
12413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12414$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12415  fi
12416
12417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12418
12419  path="$BOOT_JDK"
12420  has_colon=`$ECHO $path | $GREP ^.:`
12421  new_path="$path"
12422  if test "x$has_colon" = x; then
12423    # Not in mixed or Windows style, start by that.
12424    new_path=`cmd //c echo $path`
12425  fi
12426
12427
12428  input_path="$new_path"
12429  # Check if we need to convert this using DOS-style short mode. If the path
12430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12431  # take no chances and rewrite it.
12432  # Note: m4 eats our [], so we need to use [ and ] instead.
12433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12434  if test "x$has_forbidden_chars" != x; then
12435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12437  fi
12438
12439
12440  windows_path="$new_path"
12441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12442    unix_path=`$CYGPATH -u "$windows_path"`
12443    new_path="$unix_path"
12444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12446    new_path="$unix_path"
12447  fi
12448
12449  if test "x$path" != "x$new_path"; then
12450    BOOT_JDK="$new_path"
12451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12452$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12453  fi
12454
12455  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12456  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12457
12458  else
12459    # We're on a posix platform. Hooray! :)
12460    path="$BOOT_JDK"
12461    has_space=`$ECHO "$path" | $GREP " "`
12462    if test "x$has_space" != x; then
12463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12464$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12465      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12466    fi
12467
12468    # Use eval to expand a potential ~
12469    eval path="$path"
12470    if test ! -f "$path" && test ! -d "$path"; then
12471      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12472    fi
12473
12474    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12475  fi
12476
12477              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12478$as_echo_n "checking for Boot JDK... " >&6; }
12479              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12480$as_echo "$BOOT_JDK" >&6; }
12481              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12482$as_echo_n "checking Boot JDK version... " >&6; }
12483              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12484              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12485$as_echo "$BOOT_JDK_VERSION" >&6; }
12486            fi # end check jdk version
12487          fi # end check rt.jar
12488        fi # end check javac
12489      fi # end check java
12490    fi # end check boot jdk found
12491  fi
12492
12493    done
12494  fi
12495
12496  fi
12497
12498
12499    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12500    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12501      # Do we have a bin/java?
12502      if test ! -x "$BOOT_JDK/bin/java"; then
12503        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12505        BOOT_JDK_FOUND=no
12506      else
12507        # Do we have a bin/javac?
12508        if test ! -x "$BOOT_JDK/bin/javac"; then
12509          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12511          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12512$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12513          BOOT_JDK_FOUND=no
12514        else
12515          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12516          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12517            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12519            BOOT_JDK_FOUND=no
12520          else
12521            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12522            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12523
12524            # Extra M4 quote needed to protect [] in grep expression.
12525            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12526            if test "x$FOUND_VERSION_78" = x; then
12527              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12529              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12530$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12531              BOOT_JDK_FOUND=no
12532            else
12533              # We're done! :-)
12534              BOOT_JDK_FOUND=yes
12535
12536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12537
12538  # Input might be given as Windows format, start by converting to
12539  # unix format.
12540  path="$BOOT_JDK"
12541  new_path=`$CYGPATH -u "$path"`
12542
12543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12546  # "foo.exe" is OK but "foo" is an error.
12547  #
12548  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12549  # It is also a way to make sure we got the proper file name for the real test later on.
12550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12551  if test "x$test_shortpath" = x; then
12552    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12553$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12554    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12555  fi
12556
12557  # Call helper function which possibly converts this using DOS-style short mode.
12558  # If so, the updated path is stored in $new_path.
12559
12560  input_path="$new_path"
12561  # Check if we need to convert this using DOS-style short mode. If the path
12562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12563  # take no chances and rewrite it.
12564  # Note: m4 eats our [], so we need to use [ and ] instead.
12565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12566  if test "x$has_forbidden_chars" != x; then
12567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12571      # Going to short mode and back again did indeed matter. Since short mode is
12572      # case insensitive, let's make it lowercase to improve readability.
12573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12574      # Now convert it back to Unix-stile (cygpath)
12575      input_path=`$CYGPATH -u "$shortmode_path"`
12576      new_path="$input_path"
12577    fi
12578  fi
12579
12580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12581  if test "x$test_cygdrive_prefix" = x; then
12582    # As a simple fix, exclude /usr/bin since it's not a real path.
12583    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12585      # a path prefixed by /cygdrive for fixpath to work.
12586      new_path="$CYGWIN_ROOT_PATH$input_path"
12587    fi
12588  fi
12589
12590
12591  if test "x$path" != "x$new_path"; then
12592    BOOT_JDK="$new_path"
12593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12594$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12595  fi
12596
12597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12598
12599  path="$BOOT_JDK"
12600  has_colon=`$ECHO $path | $GREP ^.:`
12601  new_path="$path"
12602  if test "x$has_colon" = x; then
12603    # Not in mixed or Windows style, start by that.
12604    new_path=`cmd //c echo $path`
12605  fi
12606
12607
12608  input_path="$new_path"
12609  # Check if we need to convert this using DOS-style short mode. If the path
12610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12611  # take no chances and rewrite it.
12612  # Note: m4 eats our [], so we need to use [ and ] instead.
12613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12614  if test "x$has_forbidden_chars" != x; then
12615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12617  fi
12618
12619
12620  windows_path="$new_path"
12621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12622    unix_path=`$CYGPATH -u "$windows_path"`
12623    new_path="$unix_path"
12624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12626    new_path="$unix_path"
12627  fi
12628
12629  if test "x$path" != "x$new_path"; then
12630    BOOT_JDK="$new_path"
12631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12632$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12633  fi
12634
12635  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12636  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12637
12638  else
12639    # We're on a posix platform. Hooray! :)
12640    path="$BOOT_JDK"
12641    has_space=`$ECHO "$path" | $GREP " "`
12642    if test "x$has_space" != x; then
12643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12645      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12646    fi
12647
12648    # Use eval to expand a potential ~
12649    eval path="$path"
12650    if test ! -f "$path" && test ! -d "$path"; then
12651      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12652    fi
12653
12654    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12655  fi
12656
12657              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12658$as_echo_n "checking for Boot JDK... " >&6; }
12659              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12660$as_echo "$BOOT_JDK" >&6; }
12661              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12662$as_echo_n "checking Boot JDK version... " >&6; }
12663              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12664              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12665$as_echo "$BOOT_JDK_VERSION" >&6; }
12666            fi # end check jdk version
12667          fi # end check rt.jar
12668        fi # end check javac
12669      fi # end check java
12670    fi # end check boot jdk found
12671  fi
12672
12673
12674  if test "x$BOOT_JDK_FOUND" = xno; then
12675    # Now execute the test
12676
12677  if test "x$PROGRAMW6432" != x; then
12678    VIRTUAL_DIR="$PROGRAMW6432/Java"
12679
12680  windows_path="$VIRTUAL_DIR"
12681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12682    unix_path=`$CYGPATH -u "$windows_path"`
12683    VIRTUAL_DIR="$unix_path"
12684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12686    VIRTUAL_DIR="$unix_path"
12687  fi
12688
12689
12690  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12691  BOOT_JDK_SUFFIX=""
12692  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12693  if test "x$ALL_JDKS_FOUND" != x; then
12694    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12695
12696  if test "x$BOOT_JDK_FOUND" = xno; then
12697    # Now execute the test
12698
12699        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12700        if test -d "$BOOT_JDK"; then
12701          BOOT_JDK_FOUND=maybe
12702          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12703$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12704        fi
12705
12706
12707    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12708    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12709      # Do we have a bin/java?
12710      if test ! -x "$BOOT_JDK/bin/java"; then
12711        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12713        BOOT_JDK_FOUND=no
12714      else
12715        # Do we have a bin/javac?
12716        if test ! -x "$BOOT_JDK/bin/javac"; then
12717          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12719          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12720$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12721          BOOT_JDK_FOUND=no
12722        else
12723          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12724          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12725            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12727            BOOT_JDK_FOUND=no
12728          else
12729            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12730            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12731
12732            # Extra M4 quote needed to protect [] in grep expression.
12733            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12734            if test "x$FOUND_VERSION_78" = x; then
12735              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12736$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12737              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12738$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12739              BOOT_JDK_FOUND=no
12740            else
12741              # We're done! :-)
12742              BOOT_JDK_FOUND=yes
12743
12744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12745
12746  # Input might be given as Windows format, start by converting to
12747  # unix format.
12748  path="$BOOT_JDK"
12749  new_path=`$CYGPATH -u "$path"`
12750
12751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12754  # "foo.exe" is OK but "foo" is an error.
12755  #
12756  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12757  # It is also a way to make sure we got the proper file name for the real test later on.
12758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12759  if test "x$test_shortpath" = x; then
12760    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12761$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12762    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12763  fi
12764
12765  # Call helper function which possibly converts this using DOS-style short mode.
12766  # If so, the updated path is stored in $new_path.
12767
12768  input_path="$new_path"
12769  # Check if we need to convert this using DOS-style short mode. If the path
12770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12771  # take no chances and rewrite it.
12772  # Note: m4 eats our [], so we need to use [ and ] instead.
12773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12774  if test "x$has_forbidden_chars" != x; then
12775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12776    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12777    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12778    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12779      # Going to short mode and back again did indeed matter. Since short mode is
12780      # case insensitive, let's make it lowercase to improve readability.
12781      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12782      # Now convert it back to Unix-stile (cygpath)
12783      input_path=`$CYGPATH -u "$shortmode_path"`
12784      new_path="$input_path"
12785    fi
12786  fi
12787
12788  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12789  if test "x$test_cygdrive_prefix" = x; then
12790    # As a simple fix, exclude /usr/bin since it's not a real path.
12791    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12792      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12793      # a path prefixed by /cygdrive for fixpath to work.
12794      new_path="$CYGWIN_ROOT_PATH$input_path"
12795    fi
12796  fi
12797
12798
12799  if test "x$path" != "x$new_path"; then
12800    BOOT_JDK="$new_path"
12801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12802$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12803  fi
12804
12805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12806
12807  path="$BOOT_JDK"
12808  has_colon=`$ECHO $path | $GREP ^.:`
12809  new_path="$path"
12810  if test "x$has_colon" = x; then
12811    # Not in mixed or Windows style, start by that.
12812    new_path=`cmd //c echo $path`
12813  fi
12814
12815
12816  input_path="$new_path"
12817  # Check if we need to convert this using DOS-style short mode. If the path
12818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12819  # take no chances and rewrite it.
12820  # Note: m4 eats our [], so we need to use [ and ] instead.
12821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12822  if test "x$has_forbidden_chars" != x; then
12823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12825  fi
12826
12827
12828  windows_path="$new_path"
12829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12830    unix_path=`$CYGPATH -u "$windows_path"`
12831    new_path="$unix_path"
12832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12834    new_path="$unix_path"
12835  fi
12836
12837  if test "x$path" != "x$new_path"; then
12838    BOOT_JDK="$new_path"
12839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12840$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12841  fi
12842
12843  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12844  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12845
12846  else
12847    # We're on a posix platform. Hooray! :)
12848    path="$BOOT_JDK"
12849    has_space=`$ECHO "$path" | $GREP " "`
12850    if test "x$has_space" != x; then
12851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12852$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12853      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12854    fi
12855
12856    # Use eval to expand a potential ~
12857    eval path="$path"
12858    if test ! -f "$path" && test ! -d "$path"; then
12859      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12860    fi
12861
12862    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12863  fi
12864
12865              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12866$as_echo_n "checking for Boot JDK... " >&6; }
12867              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12868$as_echo "$BOOT_JDK" >&6; }
12869              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12870$as_echo_n "checking Boot JDK version... " >&6; }
12871              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12872              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12873$as_echo "$BOOT_JDK_VERSION" >&6; }
12874            fi # end check jdk version
12875          fi # end check rt.jar
12876        fi # end check javac
12877      fi # end check java
12878    fi # end check boot jdk found
12879  fi
12880
12881    done
12882  fi
12883
12884  fi
12885
12886
12887    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12888    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12889      # Do we have a bin/java?
12890      if test ! -x "$BOOT_JDK/bin/java"; then
12891        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12893        BOOT_JDK_FOUND=no
12894      else
12895        # Do we have a bin/javac?
12896        if test ! -x "$BOOT_JDK/bin/javac"; then
12897          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12899          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12900$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12901          BOOT_JDK_FOUND=no
12902        else
12903          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12904          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12905            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12906$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12907            BOOT_JDK_FOUND=no
12908          else
12909            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12910            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12911
12912            # Extra M4 quote needed to protect [] in grep expression.
12913            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12914            if test "x$FOUND_VERSION_78" = x; then
12915              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12917              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12918$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12919              BOOT_JDK_FOUND=no
12920            else
12921              # We're done! :-)
12922              BOOT_JDK_FOUND=yes
12923
12924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12925
12926  # Input might be given as Windows format, start by converting to
12927  # unix format.
12928  path="$BOOT_JDK"
12929  new_path=`$CYGPATH -u "$path"`
12930
12931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12934  # "foo.exe" is OK but "foo" is an error.
12935  #
12936  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12937  # It is also a way to make sure we got the proper file name for the real test later on.
12938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12939  if test "x$test_shortpath" = x; then
12940    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12941$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12942    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12943  fi
12944
12945  # Call helper function which possibly converts this using DOS-style short mode.
12946  # If so, the updated path is stored in $new_path.
12947
12948  input_path="$new_path"
12949  # Check if we need to convert this using DOS-style short mode. If the path
12950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12951  # take no chances and rewrite it.
12952  # Note: m4 eats our [], so we need to use [ and ] instead.
12953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12954  if test "x$has_forbidden_chars" != x; then
12955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12959      # Going to short mode and back again did indeed matter. Since short mode is
12960      # case insensitive, let's make it lowercase to improve readability.
12961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12962      # Now convert it back to Unix-stile (cygpath)
12963      input_path=`$CYGPATH -u "$shortmode_path"`
12964      new_path="$input_path"
12965    fi
12966  fi
12967
12968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12969  if test "x$test_cygdrive_prefix" = x; then
12970    # As a simple fix, exclude /usr/bin since it's not a real path.
12971    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12973      # a path prefixed by /cygdrive for fixpath to work.
12974      new_path="$CYGWIN_ROOT_PATH$input_path"
12975    fi
12976  fi
12977
12978
12979  if test "x$path" != "x$new_path"; then
12980    BOOT_JDK="$new_path"
12981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12982$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12983  fi
12984
12985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12986
12987  path="$BOOT_JDK"
12988  has_colon=`$ECHO $path | $GREP ^.:`
12989  new_path="$path"
12990  if test "x$has_colon" = x; then
12991    # Not in mixed or Windows style, start by that.
12992    new_path=`cmd //c echo $path`
12993  fi
12994
12995
12996  input_path="$new_path"
12997  # Check if we need to convert this using DOS-style short mode. If the path
12998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12999  # take no chances and rewrite it.
13000  # Note: m4 eats our [], so we need to use [ and ] instead.
13001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13002  if test "x$has_forbidden_chars" != x; then
13003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13005  fi
13006
13007
13008  windows_path="$new_path"
13009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13010    unix_path=`$CYGPATH -u "$windows_path"`
13011    new_path="$unix_path"
13012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13014    new_path="$unix_path"
13015  fi
13016
13017  if test "x$path" != "x$new_path"; then
13018    BOOT_JDK="$new_path"
13019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13020$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13021  fi
13022
13023  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13024  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13025
13026  else
13027    # We're on a posix platform. Hooray! :)
13028    path="$BOOT_JDK"
13029    has_space=`$ECHO "$path" | $GREP " "`
13030    if test "x$has_space" != x; then
13031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13032$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13033      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13034    fi
13035
13036    # Use eval to expand a potential ~
13037    eval path="$path"
13038    if test ! -f "$path" && test ! -d "$path"; then
13039      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13040    fi
13041
13042    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13043  fi
13044
13045              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13046$as_echo_n "checking for Boot JDK... " >&6; }
13047              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13048$as_echo "$BOOT_JDK" >&6; }
13049              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13050$as_echo_n "checking Boot JDK version... " >&6; }
13051              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13052              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13053$as_echo "$BOOT_JDK_VERSION" >&6; }
13054            fi # end check jdk version
13055          fi # end check rt.jar
13056        fi # end check javac
13057      fi # end check java
13058    fi # end check boot jdk found
13059  fi
13060
13061
13062  if test "x$BOOT_JDK_FOUND" = xno; then
13063    # Now execute the test
13064
13065  if test "x$PROGRAMFILES" != x; then
13066    VIRTUAL_DIR="$PROGRAMFILES/Java"
13067
13068  windows_path="$VIRTUAL_DIR"
13069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13070    unix_path=`$CYGPATH -u "$windows_path"`
13071    VIRTUAL_DIR="$unix_path"
13072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13074    VIRTUAL_DIR="$unix_path"
13075  fi
13076
13077
13078  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13079  BOOT_JDK_SUFFIX=""
13080  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13081  if test "x$ALL_JDKS_FOUND" != x; then
13082    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13083
13084  if test "x$BOOT_JDK_FOUND" = xno; then
13085    # Now execute the test
13086
13087        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13088        if test -d "$BOOT_JDK"; then
13089          BOOT_JDK_FOUND=maybe
13090          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13091$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13092        fi
13093
13094
13095    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13096    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13097      # Do we have a bin/java?
13098      if test ! -x "$BOOT_JDK/bin/java"; then
13099        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13101        BOOT_JDK_FOUND=no
13102      else
13103        # Do we have a bin/javac?
13104        if test ! -x "$BOOT_JDK/bin/javac"; then
13105          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13107          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13108$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13109          BOOT_JDK_FOUND=no
13110        else
13111          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13112          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13113            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13114$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13115            BOOT_JDK_FOUND=no
13116          else
13117            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13118            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13119
13120            # Extra M4 quote needed to protect [] in grep expression.
13121            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13122            if test "x$FOUND_VERSION_78" = x; then
13123              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13124$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13125              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13126$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13127              BOOT_JDK_FOUND=no
13128            else
13129              # We're done! :-)
13130              BOOT_JDK_FOUND=yes
13131
13132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13133
13134  # Input might be given as Windows format, start by converting to
13135  # unix format.
13136  path="$BOOT_JDK"
13137  new_path=`$CYGPATH -u "$path"`
13138
13139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13142  # "foo.exe" is OK but "foo" is an error.
13143  #
13144  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13145  # It is also a way to make sure we got the proper file name for the real test later on.
13146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13147  if test "x$test_shortpath" = x; then
13148    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13149$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13150    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13151  fi
13152
13153  # Call helper function which possibly converts this using DOS-style short mode.
13154  # If so, the updated path is stored in $new_path.
13155
13156  input_path="$new_path"
13157  # Check if we need to convert this using DOS-style short mode. If the path
13158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13159  # take no chances and rewrite it.
13160  # Note: m4 eats our [], so we need to use [ and ] instead.
13161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13162  if test "x$has_forbidden_chars" != x; then
13163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13167      # Going to short mode and back again did indeed matter. Since short mode is
13168      # case insensitive, let's make it lowercase to improve readability.
13169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13170      # Now convert it back to Unix-stile (cygpath)
13171      input_path=`$CYGPATH -u "$shortmode_path"`
13172      new_path="$input_path"
13173    fi
13174  fi
13175
13176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13177  if test "x$test_cygdrive_prefix" = x; then
13178    # As a simple fix, exclude /usr/bin since it's not a real path.
13179    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13181      # a path prefixed by /cygdrive for fixpath to work.
13182      new_path="$CYGWIN_ROOT_PATH$input_path"
13183    fi
13184  fi
13185
13186
13187  if test "x$path" != "x$new_path"; then
13188    BOOT_JDK="$new_path"
13189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13190$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13191  fi
13192
13193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13194
13195  path="$BOOT_JDK"
13196  has_colon=`$ECHO $path | $GREP ^.:`
13197  new_path="$path"
13198  if test "x$has_colon" = x; then
13199    # Not in mixed or Windows style, start by that.
13200    new_path=`cmd //c echo $path`
13201  fi
13202
13203
13204  input_path="$new_path"
13205  # Check if we need to convert this using DOS-style short mode. If the path
13206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13207  # take no chances and rewrite it.
13208  # Note: m4 eats our [], so we need to use [ and ] instead.
13209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13210  if test "x$has_forbidden_chars" != x; then
13211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13213  fi
13214
13215
13216  windows_path="$new_path"
13217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13218    unix_path=`$CYGPATH -u "$windows_path"`
13219    new_path="$unix_path"
13220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13222    new_path="$unix_path"
13223  fi
13224
13225  if test "x$path" != "x$new_path"; then
13226    BOOT_JDK="$new_path"
13227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13228$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13229  fi
13230
13231  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13232  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13233
13234  else
13235    # We're on a posix platform. Hooray! :)
13236    path="$BOOT_JDK"
13237    has_space=`$ECHO "$path" | $GREP " "`
13238    if test "x$has_space" != x; then
13239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13240$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13241      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13242    fi
13243
13244    # Use eval to expand a potential ~
13245    eval path="$path"
13246    if test ! -f "$path" && test ! -d "$path"; then
13247      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13248    fi
13249
13250    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13251  fi
13252
13253              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13254$as_echo_n "checking for Boot JDK... " >&6; }
13255              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13256$as_echo "$BOOT_JDK" >&6; }
13257              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13258$as_echo_n "checking Boot JDK version... " >&6; }
13259              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13260              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13261$as_echo "$BOOT_JDK_VERSION" >&6; }
13262            fi # end check jdk version
13263          fi # end check rt.jar
13264        fi # end check javac
13265      fi # end check java
13266    fi # end check boot jdk found
13267  fi
13268
13269    done
13270  fi
13271
13272  fi
13273
13274
13275    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13276    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13277      # Do we have a bin/java?
13278      if test ! -x "$BOOT_JDK/bin/java"; then
13279        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13281        BOOT_JDK_FOUND=no
13282      else
13283        # Do we have a bin/javac?
13284        if test ! -x "$BOOT_JDK/bin/javac"; then
13285          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13286$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13287          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13288$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13289          BOOT_JDK_FOUND=no
13290        else
13291          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13292          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13293            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13294$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13295            BOOT_JDK_FOUND=no
13296          else
13297            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13298            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13299
13300            # Extra M4 quote needed to protect [] in grep expression.
13301            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13302            if test "x$FOUND_VERSION_78" = x; then
13303              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13304$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13305              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13306$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13307              BOOT_JDK_FOUND=no
13308            else
13309              # We're done! :-)
13310              BOOT_JDK_FOUND=yes
13311
13312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13313
13314  # Input might be given as Windows format, start by converting to
13315  # unix format.
13316  path="$BOOT_JDK"
13317  new_path=`$CYGPATH -u "$path"`
13318
13319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13322  # "foo.exe" is OK but "foo" is an error.
13323  #
13324  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13325  # It is also a way to make sure we got the proper file name for the real test later on.
13326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13327  if test "x$test_shortpath" = x; then
13328    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13329$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13330    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13331  fi
13332
13333  # Call helper function which possibly converts this using DOS-style short mode.
13334  # If so, the updated path is stored in $new_path.
13335
13336  input_path="$new_path"
13337  # Check if we need to convert this using DOS-style short mode. If the path
13338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13339  # take no chances and rewrite it.
13340  # Note: m4 eats our [], so we need to use [ and ] instead.
13341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13342  if test "x$has_forbidden_chars" != x; then
13343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13347      # Going to short mode and back again did indeed matter. Since short mode is
13348      # case insensitive, let's make it lowercase to improve readability.
13349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13350      # Now convert it back to Unix-stile (cygpath)
13351      input_path=`$CYGPATH -u "$shortmode_path"`
13352      new_path="$input_path"
13353    fi
13354  fi
13355
13356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13357  if test "x$test_cygdrive_prefix" = x; then
13358    # As a simple fix, exclude /usr/bin since it's not a real path.
13359    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13361      # a path prefixed by /cygdrive for fixpath to work.
13362      new_path="$CYGWIN_ROOT_PATH$input_path"
13363    fi
13364  fi
13365
13366
13367  if test "x$path" != "x$new_path"; then
13368    BOOT_JDK="$new_path"
13369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13370$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13371  fi
13372
13373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13374
13375  path="$BOOT_JDK"
13376  has_colon=`$ECHO $path | $GREP ^.:`
13377  new_path="$path"
13378  if test "x$has_colon" = x; then
13379    # Not in mixed or Windows style, start by that.
13380    new_path=`cmd //c echo $path`
13381  fi
13382
13383
13384  input_path="$new_path"
13385  # Check if we need to convert this using DOS-style short mode. If the path
13386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13387  # take no chances and rewrite it.
13388  # Note: m4 eats our [], so we need to use [ and ] instead.
13389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13390  if test "x$has_forbidden_chars" != x; then
13391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13393  fi
13394
13395
13396  windows_path="$new_path"
13397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13398    unix_path=`$CYGPATH -u "$windows_path"`
13399    new_path="$unix_path"
13400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13402    new_path="$unix_path"
13403  fi
13404
13405  if test "x$path" != "x$new_path"; then
13406    BOOT_JDK="$new_path"
13407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13408$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13409  fi
13410
13411  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13412  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13413
13414  else
13415    # We're on a posix platform. Hooray! :)
13416    path="$BOOT_JDK"
13417    has_space=`$ECHO "$path" | $GREP " "`
13418    if test "x$has_space" != x; then
13419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13420$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13421      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13422    fi
13423
13424    # Use eval to expand a potential ~
13425    eval path="$path"
13426    if test ! -f "$path" && test ! -d "$path"; then
13427      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13428    fi
13429
13430    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13431  fi
13432
13433              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13434$as_echo_n "checking for Boot JDK... " >&6; }
13435              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13436$as_echo "$BOOT_JDK" >&6; }
13437              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13438$as_echo_n "checking Boot JDK version... " >&6; }
13439              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13440              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13441$as_echo "$BOOT_JDK_VERSION" >&6; }
13442            fi # end check jdk version
13443          fi # end check rt.jar
13444        fi # end check javac
13445      fi # end check java
13446    fi # end check boot jdk found
13447  fi
13448
13449
13450  if test "x$BOOT_JDK_FOUND" = xno; then
13451    # Now execute the test
13452
13453  if test "x$ProgramFiles" != x; then
13454    VIRTUAL_DIR="$ProgramFiles/Java"
13455
13456  windows_path="$VIRTUAL_DIR"
13457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13458    unix_path=`$CYGPATH -u "$windows_path"`
13459    VIRTUAL_DIR="$unix_path"
13460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13462    VIRTUAL_DIR="$unix_path"
13463  fi
13464
13465
13466  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13467  BOOT_JDK_SUFFIX=""
13468  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13469  if test "x$ALL_JDKS_FOUND" != x; then
13470    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13471
13472  if test "x$BOOT_JDK_FOUND" = xno; then
13473    # Now execute the test
13474
13475        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13476        if test -d "$BOOT_JDK"; then
13477          BOOT_JDK_FOUND=maybe
13478          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13479$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13480        fi
13481
13482
13483    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13484    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13485      # Do we have a bin/java?
13486      if test ! -x "$BOOT_JDK/bin/java"; then
13487        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13489        BOOT_JDK_FOUND=no
13490      else
13491        # Do we have a bin/javac?
13492        if test ! -x "$BOOT_JDK/bin/javac"; then
13493          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13495          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13496$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13497          BOOT_JDK_FOUND=no
13498        else
13499          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13500          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13501            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13503            BOOT_JDK_FOUND=no
13504          else
13505            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13506            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13507
13508            # Extra M4 quote needed to protect [] in grep expression.
13509            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13510            if test "x$FOUND_VERSION_78" = x; then
13511              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13513              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13514$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13515              BOOT_JDK_FOUND=no
13516            else
13517              # We're done! :-)
13518              BOOT_JDK_FOUND=yes
13519
13520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13521
13522  # Input might be given as Windows format, start by converting to
13523  # unix format.
13524  path="$BOOT_JDK"
13525  new_path=`$CYGPATH -u "$path"`
13526
13527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13530  # "foo.exe" is OK but "foo" is an error.
13531  #
13532  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13533  # It is also a way to make sure we got the proper file name for the real test later on.
13534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13535  if test "x$test_shortpath" = x; then
13536    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13537$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13538    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13539  fi
13540
13541  # Call helper function which possibly converts this using DOS-style short mode.
13542  # If so, the updated path is stored in $new_path.
13543
13544  input_path="$new_path"
13545  # Check if we need to convert this using DOS-style short mode. If the path
13546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13547  # take no chances and rewrite it.
13548  # Note: m4 eats our [], so we need to use [ and ] instead.
13549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13550  if test "x$has_forbidden_chars" != x; then
13551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13555      # Going to short mode and back again did indeed matter. Since short mode is
13556      # case insensitive, let's make it lowercase to improve readability.
13557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13558      # Now convert it back to Unix-stile (cygpath)
13559      input_path=`$CYGPATH -u "$shortmode_path"`
13560      new_path="$input_path"
13561    fi
13562  fi
13563
13564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13565  if test "x$test_cygdrive_prefix" = x; then
13566    # As a simple fix, exclude /usr/bin since it's not a real path.
13567    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13569      # a path prefixed by /cygdrive for fixpath to work.
13570      new_path="$CYGWIN_ROOT_PATH$input_path"
13571    fi
13572  fi
13573
13574
13575  if test "x$path" != "x$new_path"; then
13576    BOOT_JDK="$new_path"
13577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13578$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13579  fi
13580
13581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13582
13583  path="$BOOT_JDK"
13584  has_colon=`$ECHO $path | $GREP ^.:`
13585  new_path="$path"
13586  if test "x$has_colon" = x; then
13587    # Not in mixed or Windows style, start by that.
13588    new_path=`cmd //c echo $path`
13589  fi
13590
13591
13592  input_path="$new_path"
13593  # Check if we need to convert this using DOS-style short mode. If the path
13594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13595  # take no chances and rewrite it.
13596  # Note: m4 eats our [], so we need to use [ and ] instead.
13597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13598  if test "x$has_forbidden_chars" != x; then
13599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13601  fi
13602
13603
13604  windows_path="$new_path"
13605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13606    unix_path=`$CYGPATH -u "$windows_path"`
13607    new_path="$unix_path"
13608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13610    new_path="$unix_path"
13611  fi
13612
13613  if test "x$path" != "x$new_path"; then
13614    BOOT_JDK="$new_path"
13615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13617  fi
13618
13619  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13620  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13621
13622  else
13623    # We're on a posix platform. Hooray! :)
13624    path="$BOOT_JDK"
13625    has_space=`$ECHO "$path" | $GREP " "`
13626    if test "x$has_space" != x; then
13627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13628$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13629      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13630    fi
13631
13632    # Use eval to expand a potential ~
13633    eval path="$path"
13634    if test ! -f "$path" && test ! -d "$path"; then
13635      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13636    fi
13637
13638    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13639  fi
13640
13641              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13642$as_echo_n "checking for Boot JDK... " >&6; }
13643              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13644$as_echo "$BOOT_JDK" >&6; }
13645              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13646$as_echo_n "checking Boot JDK version... " >&6; }
13647              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13648              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13649$as_echo "$BOOT_JDK_VERSION" >&6; }
13650            fi # end check jdk version
13651          fi # end check rt.jar
13652        fi # end check javac
13653      fi # end check java
13654    fi # end check boot jdk found
13655  fi
13656
13657    done
13658  fi
13659
13660  fi
13661
13662
13663    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13664    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13665      # Do we have a bin/java?
13666      if test ! -x "$BOOT_JDK/bin/java"; then
13667        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13668$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13669        BOOT_JDK_FOUND=no
13670      else
13671        # Do we have a bin/javac?
13672        if test ! -x "$BOOT_JDK/bin/javac"; then
13673          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13675          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13676$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13677          BOOT_JDK_FOUND=no
13678        else
13679          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13680          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13681            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13683            BOOT_JDK_FOUND=no
13684          else
13685            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13686            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13687
13688            # Extra M4 quote needed to protect [] in grep expression.
13689            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13690            if test "x$FOUND_VERSION_78" = x; then
13691              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13693              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13694$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13695              BOOT_JDK_FOUND=no
13696            else
13697              # We're done! :-)
13698              BOOT_JDK_FOUND=yes
13699
13700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13701
13702  # Input might be given as Windows format, start by converting to
13703  # unix format.
13704  path="$BOOT_JDK"
13705  new_path=`$CYGPATH -u "$path"`
13706
13707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13710  # "foo.exe" is OK but "foo" is an error.
13711  #
13712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13713  # It is also a way to make sure we got the proper file name for the real test later on.
13714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13715  if test "x$test_shortpath" = x; then
13716    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13717$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13718    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13719  fi
13720
13721  # Call helper function which possibly converts this using DOS-style short mode.
13722  # If so, the updated path is stored in $new_path.
13723
13724  input_path="$new_path"
13725  # Check if we need to convert this using DOS-style short mode. If the path
13726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13727  # take no chances and rewrite it.
13728  # Note: m4 eats our [], so we need to use [ and ] instead.
13729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13730  if test "x$has_forbidden_chars" != x; then
13731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13735      # Going to short mode and back again did indeed matter. Since short mode is
13736      # case insensitive, let's make it lowercase to improve readability.
13737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13738      # Now convert it back to Unix-stile (cygpath)
13739      input_path=`$CYGPATH -u "$shortmode_path"`
13740      new_path="$input_path"
13741    fi
13742  fi
13743
13744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13745  if test "x$test_cygdrive_prefix" = x; then
13746    # As a simple fix, exclude /usr/bin since it's not a real path.
13747    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13749      # a path prefixed by /cygdrive for fixpath to work.
13750      new_path="$CYGWIN_ROOT_PATH$input_path"
13751    fi
13752  fi
13753
13754
13755  if test "x$path" != "x$new_path"; then
13756    BOOT_JDK="$new_path"
13757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13758$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13759  fi
13760
13761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13762
13763  path="$BOOT_JDK"
13764  has_colon=`$ECHO $path | $GREP ^.:`
13765  new_path="$path"
13766  if test "x$has_colon" = x; then
13767    # Not in mixed or Windows style, start by that.
13768    new_path=`cmd //c echo $path`
13769  fi
13770
13771
13772  input_path="$new_path"
13773  # Check if we need to convert this using DOS-style short mode. If the path
13774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13775  # take no chances and rewrite it.
13776  # Note: m4 eats our [], so we need to use [ and ] instead.
13777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13778  if test "x$has_forbidden_chars" != x; then
13779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13781  fi
13782
13783
13784  windows_path="$new_path"
13785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13786    unix_path=`$CYGPATH -u "$windows_path"`
13787    new_path="$unix_path"
13788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13790    new_path="$unix_path"
13791  fi
13792
13793  if test "x$path" != "x$new_path"; then
13794    BOOT_JDK="$new_path"
13795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13797  fi
13798
13799  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13800  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13801
13802  else
13803    # We're on a posix platform. Hooray! :)
13804    path="$BOOT_JDK"
13805    has_space=`$ECHO "$path" | $GREP " "`
13806    if test "x$has_space" != x; then
13807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13808$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13809      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13810    fi
13811
13812    # Use eval to expand a potential ~
13813    eval path="$path"
13814    if test ! -f "$path" && test ! -d "$path"; then
13815      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13816    fi
13817
13818    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13819  fi
13820
13821              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13822$as_echo_n "checking for Boot JDK... " >&6; }
13823              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13824$as_echo "$BOOT_JDK" >&6; }
13825              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13826$as_echo_n "checking Boot JDK version... " >&6; }
13827              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13828              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13829$as_echo "$BOOT_JDK_VERSION" >&6; }
13830            fi # end check jdk version
13831          fi # end check rt.jar
13832        fi # end check javac
13833      fi # end check java
13834    fi # end check boot jdk found
13835  fi
13836
13837
13838  if test "x$BOOT_JDK_FOUND" = xno; then
13839    # Now execute the test
13840
13841  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13842  BOOT_JDK_SUFFIX=""
13843  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13844  if test "x$ALL_JDKS_FOUND" != x; then
13845    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13846
13847  if test "x$BOOT_JDK_FOUND" = xno; then
13848    # Now execute the test
13849
13850        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13851        if test -d "$BOOT_JDK"; then
13852          BOOT_JDK_FOUND=maybe
13853          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13854$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13855        fi
13856
13857
13858    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13859    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13860      # Do we have a bin/java?
13861      if test ! -x "$BOOT_JDK/bin/java"; then
13862        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13864        BOOT_JDK_FOUND=no
13865      else
13866        # Do we have a bin/javac?
13867        if test ! -x "$BOOT_JDK/bin/javac"; then
13868          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13870          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13871$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13872          BOOT_JDK_FOUND=no
13873        else
13874          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13875          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13876            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13878            BOOT_JDK_FOUND=no
13879          else
13880            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13881            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13882
13883            # Extra M4 quote needed to protect [] in grep expression.
13884            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13885            if test "x$FOUND_VERSION_78" = x; then
13886              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13887$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13888              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13889$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13890              BOOT_JDK_FOUND=no
13891            else
13892              # We're done! :-)
13893              BOOT_JDK_FOUND=yes
13894
13895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13896
13897  # Input might be given as Windows format, start by converting to
13898  # unix format.
13899  path="$BOOT_JDK"
13900  new_path=`$CYGPATH -u "$path"`
13901
13902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13905  # "foo.exe" is OK but "foo" is an error.
13906  #
13907  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13908  # It is also a way to make sure we got the proper file name for the real test later on.
13909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13910  if test "x$test_shortpath" = x; then
13911    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13912$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13913    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13914  fi
13915
13916  # Call helper function which possibly converts this using DOS-style short mode.
13917  # If so, the updated path is stored in $new_path.
13918
13919  input_path="$new_path"
13920  # Check if we need to convert this using DOS-style short mode. If the path
13921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13922  # take no chances and rewrite it.
13923  # Note: m4 eats our [], so we need to use [ and ] instead.
13924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13925  if test "x$has_forbidden_chars" != x; then
13926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13930      # Going to short mode and back again did indeed matter. Since short mode is
13931      # case insensitive, let's make it lowercase to improve readability.
13932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13933      # Now convert it back to Unix-stile (cygpath)
13934      input_path=`$CYGPATH -u "$shortmode_path"`
13935      new_path="$input_path"
13936    fi
13937  fi
13938
13939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13940  if test "x$test_cygdrive_prefix" = x; then
13941    # As a simple fix, exclude /usr/bin since it's not a real path.
13942    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13944      # a path prefixed by /cygdrive for fixpath to work.
13945      new_path="$CYGWIN_ROOT_PATH$input_path"
13946    fi
13947  fi
13948
13949
13950  if test "x$path" != "x$new_path"; then
13951    BOOT_JDK="$new_path"
13952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13953$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13954  fi
13955
13956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13957
13958  path="$BOOT_JDK"
13959  has_colon=`$ECHO $path | $GREP ^.:`
13960  new_path="$path"
13961  if test "x$has_colon" = x; then
13962    # Not in mixed or Windows style, start by that.
13963    new_path=`cmd //c echo $path`
13964  fi
13965
13966
13967  input_path="$new_path"
13968  # Check if we need to convert this using DOS-style short mode. If the path
13969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13970  # take no chances and rewrite it.
13971  # Note: m4 eats our [], so we need to use [ and ] instead.
13972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13973  if test "x$has_forbidden_chars" != x; then
13974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13976  fi
13977
13978
13979  windows_path="$new_path"
13980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13981    unix_path=`$CYGPATH -u "$windows_path"`
13982    new_path="$unix_path"
13983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13985    new_path="$unix_path"
13986  fi
13987
13988  if test "x$path" != "x$new_path"; then
13989    BOOT_JDK="$new_path"
13990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13991$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13992  fi
13993
13994  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13995  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13996
13997  else
13998    # We're on a posix platform. Hooray! :)
13999    path="$BOOT_JDK"
14000    has_space=`$ECHO "$path" | $GREP " "`
14001    if test "x$has_space" != x; then
14002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14003$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14004      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14005    fi
14006
14007    # Use eval to expand a potential ~
14008    eval path="$path"
14009    if test ! -f "$path" && test ! -d "$path"; then
14010      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14011    fi
14012
14013    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14014  fi
14015
14016              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14017$as_echo_n "checking for Boot JDK... " >&6; }
14018              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14019$as_echo "$BOOT_JDK" >&6; }
14020              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14021$as_echo_n "checking Boot JDK version... " >&6; }
14022              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14023              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14024$as_echo "$BOOT_JDK_VERSION" >&6; }
14025            fi # end check jdk version
14026          fi # end check rt.jar
14027        fi # end check javac
14028      fi # end check java
14029    fi # end check boot jdk found
14030  fi
14031
14032    done
14033  fi
14034
14035
14036    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14037    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14038      # Do we have a bin/java?
14039      if test ! -x "$BOOT_JDK/bin/java"; then
14040        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14041$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14042        BOOT_JDK_FOUND=no
14043      else
14044        # Do we have a bin/javac?
14045        if test ! -x "$BOOT_JDK/bin/javac"; then
14046          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14048          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14049$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14050          BOOT_JDK_FOUND=no
14051        else
14052          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14053          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14054            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14056            BOOT_JDK_FOUND=no
14057          else
14058            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14059            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14060
14061            # Extra M4 quote needed to protect [] in grep expression.
14062            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14063            if test "x$FOUND_VERSION_78" = x; then
14064              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14066              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14067$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14068              BOOT_JDK_FOUND=no
14069            else
14070              # We're done! :-)
14071              BOOT_JDK_FOUND=yes
14072
14073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14074
14075  # Input might be given as Windows format, start by converting to
14076  # unix format.
14077  path="$BOOT_JDK"
14078  new_path=`$CYGPATH -u "$path"`
14079
14080  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14081  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14082  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14083  # "foo.exe" is OK but "foo" is an error.
14084  #
14085  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14086  # It is also a way to make sure we got the proper file name for the real test later on.
14087  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14088  if test "x$test_shortpath" = x; then
14089    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14090$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14091    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14092  fi
14093
14094  # Call helper function which possibly converts this using DOS-style short mode.
14095  # If so, the updated path is stored in $new_path.
14096
14097  input_path="$new_path"
14098  # Check if we need to convert this using DOS-style short mode. If the path
14099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14100  # take no chances and rewrite it.
14101  # Note: m4 eats our [], so we need to use [ and ] instead.
14102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14103  if test "x$has_forbidden_chars" != x; then
14104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14108      # Going to short mode and back again did indeed matter. Since short mode is
14109      # case insensitive, let's make it lowercase to improve readability.
14110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14111      # Now convert it back to Unix-stile (cygpath)
14112      input_path=`$CYGPATH -u "$shortmode_path"`
14113      new_path="$input_path"
14114    fi
14115  fi
14116
14117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14118  if test "x$test_cygdrive_prefix" = x; then
14119    # As a simple fix, exclude /usr/bin since it's not a real path.
14120    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14122      # a path prefixed by /cygdrive for fixpath to work.
14123      new_path="$CYGWIN_ROOT_PATH$input_path"
14124    fi
14125  fi
14126
14127
14128  if test "x$path" != "x$new_path"; then
14129    BOOT_JDK="$new_path"
14130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14131$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14132  fi
14133
14134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14135
14136  path="$BOOT_JDK"
14137  has_colon=`$ECHO $path | $GREP ^.:`
14138  new_path="$path"
14139  if test "x$has_colon" = x; then
14140    # Not in mixed or Windows style, start by that.
14141    new_path=`cmd //c echo $path`
14142  fi
14143
14144
14145  input_path="$new_path"
14146  # Check if we need to convert this using DOS-style short mode. If the path
14147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14148  # take no chances and rewrite it.
14149  # Note: m4 eats our [], so we need to use [ and ] instead.
14150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14151  if test "x$has_forbidden_chars" != x; then
14152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14154  fi
14155
14156
14157  windows_path="$new_path"
14158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14159    unix_path=`$CYGPATH -u "$windows_path"`
14160    new_path="$unix_path"
14161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14163    new_path="$unix_path"
14164  fi
14165
14166  if test "x$path" != "x$new_path"; then
14167    BOOT_JDK="$new_path"
14168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14169$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14170  fi
14171
14172  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14173  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14174
14175  else
14176    # We're on a posix platform. Hooray! :)
14177    path="$BOOT_JDK"
14178    has_space=`$ECHO "$path" | $GREP " "`
14179    if test "x$has_space" != x; then
14180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14182      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14183    fi
14184
14185    # Use eval to expand a potential ~
14186    eval path="$path"
14187    if test ! -f "$path" && test ! -d "$path"; then
14188      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14189    fi
14190
14191    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14192  fi
14193
14194              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14195$as_echo_n "checking for Boot JDK... " >&6; }
14196              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14197$as_echo "$BOOT_JDK" >&6; }
14198              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14199$as_echo_n "checking Boot JDK version... " >&6; }
14200              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14201              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14202$as_echo "$BOOT_JDK_VERSION" >&6; }
14203            fi # end check jdk version
14204          fi # end check rt.jar
14205        fi # end check javac
14206      fi # end check java
14207    fi # end check boot jdk found
14208  fi
14209
14210  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14211
14212  if test "x$BOOT_JDK_FOUND" = xno; then
14213    # Now execute the test
14214
14215  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14216  BOOT_JDK_SUFFIX="/Contents/Home"
14217  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14218  if test "x$ALL_JDKS_FOUND" != x; then
14219    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14220
14221  if test "x$BOOT_JDK_FOUND" = xno; then
14222    # Now execute the test
14223
14224        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14225        if test -d "$BOOT_JDK"; then
14226          BOOT_JDK_FOUND=maybe
14227          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14228$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14229        fi
14230
14231
14232    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14233    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14234      # Do we have a bin/java?
14235      if test ! -x "$BOOT_JDK/bin/java"; then
14236        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14238        BOOT_JDK_FOUND=no
14239      else
14240        # Do we have a bin/javac?
14241        if test ! -x "$BOOT_JDK/bin/javac"; then
14242          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14243$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14244          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14245$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14246          BOOT_JDK_FOUND=no
14247        else
14248          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14249          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14250            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14252            BOOT_JDK_FOUND=no
14253          else
14254            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14255            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14256
14257            # Extra M4 quote needed to protect [] in grep expression.
14258            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14259            if test "x$FOUND_VERSION_78" = x; then
14260              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14262              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14263$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14264              BOOT_JDK_FOUND=no
14265            else
14266              # We're done! :-)
14267              BOOT_JDK_FOUND=yes
14268
14269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14270
14271  # Input might be given as Windows format, start by converting to
14272  # unix format.
14273  path="$BOOT_JDK"
14274  new_path=`$CYGPATH -u "$path"`
14275
14276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14279  # "foo.exe" is OK but "foo" is an error.
14280  #
14281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14282  # It is also a way to make sure we got the proper file name for the real test later on.
14283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14284  if test "x$test_shortpath" = x; then
14285    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14286$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14287    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14288  fi
14289
14290  # Call helper function which possibly converts this using DOS-style short mode.
14291  # If so, the updated path is stored in $new_path.
14292
14293  input_path="$new_path"
14294  # Check if we need to convert this using DOS-style short mode. If the path
14295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14296  # take no chances and rewrite it.
14297  # Note: m4 eats our [], so we need to use [ and ] instead.
14298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14299  if test "x$has_forbidden_chars" != x; then
14300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14304      # Going to short mode and back again did indeed matter. Since short mode is
14305      # case insensitive, let's make it lowercase to improve readability.
14306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14307      # Now convert it back to Unix-stile (cygpath)
14308      input_path=`$CYGPATH -u "$shortmode_path"`
14309      new_path="$input_path"
14310    fi
14311  fi
14312
14313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14314  if test "x$test_cygdrive_prefix" = x; then
14315    # As a simple fix, exclude /usr/bin since it's not a real path.
14316    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14318      # a path prefixed by /cygdrive for fixpath to work.
14319      new_path="$CYGWIN_ROOT_PATH$input_path"
14320    fi
14321  fi
14322
14323
14324  if test "x$path" != "x$new_path"; then
14325    BOOT_JDK="$new_path"
14326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14327$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14328  fi
14329
14330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14331
14332  path="$BOOT_JDK"
14333  has_colon=`$ECHO $path | $GREP ^.:`
14334  new_path="$path"
14335  if test "x$has_colon" = x; then
14336    # Not in mixed or Windows style, start by that.
14337    new_path=`cmd //c echo $path`
14338  fi
14339
14340
14341  input_path="$new_path"
14342  # Check if we need to convert this using DOS-style short mode. If the path
14343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14344  # take no chances and rewrite it.
14345  # Note: m4 eats our [], so we need to use [ and ] instead.
14346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14347  if test "x$has_forbidden_chars" != x; then
14348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14350  fi
14351
14352
14353  windows_path="$new_path"
14354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14355    unix_path=`$CYGPATH -u "$windows_path"`
14356    new_path="$unix_path"
14357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14359    new_path="$unix_path"
14360  fi
14361
14362  if test "x$path" != "x$new_path"; then
14363    BOOT_JDK="$new_path"
14364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14365$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14366  fi
14367
14368  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14369  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14370
14371  else
14372    # We're on a posix platform. Hooray! :)
14373    path="$BOOT_JDK"
14374    has_space=`$ECHO "$path" | $GREP " "`
14375    if test "x$has_space" != x; then
14376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14377$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14378      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14379    fi
14380
14381    # Use eval to expand a potential ~
14382    eval path="$path"
14383    if test ! -f "$path" && test ! -d "$path"; then
14384      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14385    fi
14386
14387    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14388  fi
14389
14390              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14391$as_echo_n "checking for Boot JDK... " >&6; }
14392              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14393$as_echo "$BOOT_JDK" >&6; }
14394              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14395$as_echo_n "checking Boot JDK version... " >&6; }
14396              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14397              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14398$as_echo "$BOOT_JDK_VERSION" >&6; }
14399            fi # end check jdk version
14400          fi # end check rt.jar
14401        fi # end check javac
14402      fi # end check java
14403    fi # end check boot jdk found
14404  fi
14405
14406    done
14407  fi
14408
14409
14410    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14411    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14412      # Do we have a bin/java?
14413      if test ! -x "$BOOT_JDK/bin/java"; then
14414        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14416        BOOT_JDK_FOUND=no
14417      else
14418        # Do we have a bin/javac?
14419        if test ! -x "$BOOT_JDK/bin/javac"; then
14420          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14422          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14423$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14424          BOOT_JDK_FOUND=no
14425        else
14426          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14427          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14428            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14429$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14430            BOOT_JDK_FOUND=no
14431          else
14432            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14433            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14434
14435            # Extra M4 quote needed to protect [] in grep expression.
14436            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14437            if test "x$FOUND_VERSION_78" = x; then
14438              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14439$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14440              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14441$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14442              BOOT_JDK_FOUND=no
14443            else
14444              # We're done! :-)
14445              BOOT_JDK_FOUND=yes
14446
14447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14448
14449  # Input might be given as Windows format, start by converting to
14450  # unix format.
14451  path="$BOOT_JDK"
14452  new_path=`$CYGPATH -u "$path"`
14453
14454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14457  # "foo.exe" is OK but "foo" is an error.
14458  #
14459  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14460  # It is also a way to make sure we got the proper file name for the real test later on.
14461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14462  if test "x$test_shortpath" = x; then
14463    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14464$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14465    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14466  fi
14467
14468  # Call helper function which possibly converts this using DOS-style short mode.
14469  # If so, the updated path is stored in $new_path.
14470
14471  input_path="$new_path"
14472  # Check if we need to convert this using DOS-style short mode. If the path
14473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14474  # take no chances and rewrite it.
14475  # Note: m4 eats our [], so we need to use [ and ] instead.
14476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14477  if test "x$has_forbidden_chars" != x; then
14478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14482      # Going to short mode and back again did indeed matter. Since short mode is
14483      # case insensitive, let's make it lowercase to improve readability.
14484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14485      # Now convert it back to Unix-stile (cygpath)
14486      input_path=`$CYGPATH -u "$shortmode_path"`
14487      new_path="$input_path"
14488    fi
14489  fi
14490
14491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14492  if test "x$test_cygdrive_prefix" = x; then
14493    # As a simple fix, exclude /usr/bin since it's not a real path.
14494    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14496      # a path prefixed by /cygdrive for fixpath to work.
14497      new_path="$CYGWIN_ROOT_PATH$input_path"
14498    fi
14499  fi
14500
14501
14502  if test "x$path" != "x$new_path"; then
14503    BOOT_JDK="$new_path"
14504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14505$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14506  fi
14507
14508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14509
14510  path="$BOOT_JDK"
14511  has_colon=`$ECHO $path | $GREP ^.:`
14512  new_path="$path"
14513  if test "x$has_colon" = x; then
14514    # Not in mixed or Windows style, start by that.
14515    new_path=`cmd //c echo $path`
14516  fi
14517
14518
14519  input_path="$new_path"
14520  # Check if we need to convert this using DOS-style short mode. If the path
14521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14522  # take no chances and rewrite it.
14523  # Note: m4 eats our [], so we need to use [ and ] instead.
14524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14525  if test "x$has_forbidden_chars" != x; then
14526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14528  fi
14529
14530
14531  windows_path="$new_path"
14532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14533    unix_path=`$CYGPATH -u "$windows_path"`
14534    new_path="$unix_path"
14535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14537    new_path="$unix_path"
14538  fi
14539
14540  if test "x$path" != "x$new_path"; then
14541    BOOT_JDK="$new_path"
14542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14543$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14544  fi
14545
14546  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14547  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14548
14549  else
14550    # We're on a posix platform. Hooray! :)
14551    path="$BOOT_JDK"
14552    has_space=`$ECHO "$path" | $GREP " "`
14553    if test "x$has_space" != x; then
14554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14555$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14556      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14557    fi
14558
14559    # Use eval to expand a potential ~
14560    eval path="$path"
14561    if test ! -f "$path" && test ! -d "$path"; then
14562      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14563    fi
14564
14565    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14566  fi
14567
14568              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14569$as_echo_n "checking for Boot JDK... " >&6; }
14570              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14571$as_echo "$BOOT_JDK" >&6; }
14572              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14573$as_echo_n "checking Boot JDK version... " >&6; }
14574              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14575              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14576$as_echo "$BOOT_JDK_VERSION" >&6; }
14577            fi # end check jdk version
14578          fi # end check rt.jar
14579        fi # end check javac
14580      fi # end check java
14581    fi # end check boot jdk found
14582  fi
14583
14584
14585  if test "x$BOOT_JDK_FOUND" = xno; then
14586    # Now execute the test
14587
14588  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14589  BOOT_JDK_SUFFIX="/Contents/Home"
14590  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14591  if test "x$ALL_JDKS_FOUND" != x; then
14592    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14593
14594  if test "x$BOOT_JDK_FOUND" = xno; then
14595    # Now execute the test
14596
14597        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14598        if test -d "$BOOT_JDK"; then
14599          BOOT_JDK_FOUND=maybe
14600          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14601$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14602        fi
14603
14604
14605    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14606    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14607      # Do we have a bin/java?
14608      if test ! -x "$BOOT_JDK/bin/java"; then
14609        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14610$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14611        BOOT_JDK_FOUND=no
14612      else
14613        # Do we have a bin/javac?
14614        if test ! -x "$BOOT_JDK/bin/javac"; then
14615          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14617          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14618$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14619          BOOT_JDK_FOUND=no
14620        else
14621          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14622          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14623            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14625            BOOT_JDK_FOUND=no
14626          else
14627            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14628            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14629
14630            # Extra M4 quote needed to protect [] in grep expression.
14631            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14632            if test "x$FOUND_VERSION_78" = x; then
14633              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14634$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14635              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14636$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14637              BOOT_JDK_FOUND=no
14638            else
14639              # We're done! :-)
14640              BOOT_JDK_FOUND=yes
14641
14642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14643
14644  # Input might be given as Windows format, start by converting to
14645  # unix format.
14646  path="$BOOT_JDK"
14647  new_path=`$CYGPATH -u "$path"`
14648
14649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14652  # "foo.exe" is OK but "foo" is an error.
14653  #
14654  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14655  # It is also a way to make sure we got the proper file name for the real test later on.
14656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14657  if test "x$test_shortpath" = x; then
14658    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14659$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14660    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14661  fi
14662
14663  # Call helper function which possibly converts this using DOS-style short mode.
14664  # If so, the updated path is stored in $new_path.
14665
14666  input_path="$new_path"
14667  # Check if we need to convert this using DOS-style short mode. If the path
14668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14669  # take no chances and rewrite it.
14670  # Note: m4 eats our [], so we need to use [ and ] instead.
14671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14672  if test "x$has_forbidden_chars" != x; then
14673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14677      # Going to short mode and back again did indeed matter. Since short mode is
14678      # case insensitive, let's make it lowercase to improve readability.
14679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14680      # Now convert it back to Unix-stile (cygpath)
14681      input_path=`$CYGPATH -u "$shortmode_path"`
14682      new_path="$input_path"
14683    fi
14684  fi
14685
14686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14687  if test "x$test_cygdrive_prefix" = x; then
14688    # As a simple fix, exclude /usr/bin since it's not a real path.
14689    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14691      # a path prefixed by /cygdrive for fixpath to work.
14692      new_path="$CYGWIN_ROOT_PATH$input_path"
14693    fi
14694  fi
14695
14696
14697  if test "x$path" != "x$new_path"; then
14698    BOOT_JDK="$new_path"
14699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14700$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14701  fi
14702
14703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14704
14705  path="$BOOT_JDK"
14706  has_colon=`$ECHO $path | $GREP ^.:`
14707  new_path="$path"
14708  if test "x$has_colon" = x; then
14709    # Not in mixed or Windows style, start by that.
14710    new_path=`cmd //c echo $path`
14711  fi
14712
14713
14714  input_path="$new_path"
14715  # Check if we need to convert this using DOS-style short mode. If the path
14716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14717  # take no chances and rewrite it.
14718  # Note: m4 eats our [], so we need to use [ and ] instead.
14719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14720  if test "x$has_forbidden_chars" != x; then
14721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14723  fi
14724
14725
14726  windows_path="$new_path"
14727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14728    unix_path=`$CYGPATH -u "$windows_path"`
14729    new_path="$unix_path"
14730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14732    new_path="$unix_path"
14733  fi
14734
14735  if test "x$path" != "x$new_path"; then
14736    BOOT_JDK="$new_path"
14737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14738$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14739  fi
14740
14741  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14742  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14743
14744  else
14745    # We're on a posix platform. Hooray! :)
14746    path="$BOOT_JDK"
14747    has_space=`$ECHO "$path" | $GREP " "`
14748    if test "x$has_space" != x; then
14749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14750$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14751      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14752    fi
14753
14754    # Use eval to expand a potential ~
14755    eval path="$path"
14756    if test ! -f "$path" && test ! -d "$path"; then
14757      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14758    fi
14759
14760    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14761  fi
14762
14763              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14764$as_echo_n "checking for Boot JDK... " >&6; }
14765              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14766$as_echo "$BOOT_JDK" >&6; }
14767              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14768$as_echo_n "checking Boot JDK version... " >&6; }
14769              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14770              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14771$as_echo "$BOOT_JDK_VERSION" >&6; }
14772            fi # end check jdk version
14773          fi # end check rt.jar
14774        fi # end check javac
14775      fi # end check java
14776    fi # end check boot jdk found
14777  fi
14778
14779    done
14780  fi
14781
14782
14783    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14784    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14785      # Do we have a bin/java?
14786      if test ! -x "$BOOT_JDK/bin/java"; then
14787        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14789        BOOT_JDK_FOUND=no
14790      else
14791        # Do we have a bin/javac?
14792        if test ! -x "$BOOT_JDK/bin/javac"; then
14793          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14795          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14796$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14797          BOOT_JDK_FOUND=no
14798        else
14799          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14800          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14801            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14803            BOOT_JDK_FOUND=no
14804          else
14805            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14806            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14807
14808            # Extra M4 quote needed to protect [] in grep expression.
14809            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14810            if test "x$FOUND_VERSION_78" = x; then
14811              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14812$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14813              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14814$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14815              BOOT_JDK_FOUND=no
14816            else
14817              # We're done! :-)
14818              BOOT_JDK_FOUND=yes
14819
14820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14821
14822  # Input might be given as Windows format, start by converting to
14823  # unix format.
14824  path="$BOOT_JDK"
14825  new_path=`$CYGPATH -u "$path"`
14826
14827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14830  # "foo.exe" is OK but "foo" is an error.
14831  #
14832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14833  # It is also a way to make sure we got the proper file name for the real test later on.
14834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14835  if test "x$test_shortpath" = x; then
14836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14838    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14839  fi
14840
14841  # Call helper function which possibly converts this using DOS-style short mode.
14842  # If so, the updated path is stored in $new_path.
14843
14844  input_path="$new_path"
14845  # Check if we need to convert this using DOS-style short mode. If the path
14846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14847  # take no chances and rewrite it.
14848  # Note: m4 eats our [], so we need to use [ and ] instead.
14849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14850  if test "x$has_forbidden_chars" != x; then
14851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14855      # Going to short mode and back again did indeed matter. Since short mode is
14856      # case insensitive, let's make it lowercase to improve readability.
14857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14858      # Now convert it back to Unix-stile (cygpath)
14859      input_path=`$CYGPATH -u "$shortmode_path"`
14860      new_path="$input_path"
14861    fi
14862  fi
14863
14864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14865  if test "x$test_cygdrive_prefix" = x; then
14866    # As a simple fix, exclude /usr/bin since it's not a real path.
14867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14869      # a path prefixed by /cygdrive for fixpath to work.
14870      new_path="$CYGWIN_ROOT_PATH$input_path"
14871    fi
14872  fi
14873
14874
14875  if test "x$path" != "x$new_path"; then
14876    BOOT_JDK="$new_path"
14877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14879  fi
14880
14881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14882
14883  path="$BOOT_JDK"
14884  has_colon=`$ECHO $path | $GREP ^.:`
14885  new_path="$path"
14886  if test "x$has_colon" = x; then
14887    # Not in mixed or Windows style, start by that.
14888    new_path=`cmd //c echo $path`
14889  fi
14890
14891
14892  input_path="$new_path"
14893  # Check if we need to convert this using DOS-style short mode. If the path
14894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14895  # take no chances and rewrite it.
14896  # Note: m4 eats our [], so we need to use [ and ] instead.
14897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14898  if test "x$has_forbidden_chars" != x; then
14899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14901  fi
14902
14903
14904  windows_path="$new_path"
14905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14906    unix_path=`$CYGPATH -u "$windows_path"`
14907    new_path="$unix_path"
14908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14910    new_path="$unix_path"
14911  fi
14912
14913  if test "x$path" != "x$new_path"; then
14914    BOOT_JDK="$new_path"
14915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14917  fi
14918
14919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14921
14922  else
14923    # We're on a posix platform. Hooray! :)
14924    path="$BOOT_JDK"
14925    has_space=`$ECHO "$path" | $GREP " "`
14926    if test "x$has_space" != x; then
14927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14929      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14930    fi
14931
14932    # Use eval to expand a potential ~
14933    eval path="$path"
14934    if test ! -f "$path" && test ! -d "$path"; then
14935      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14936    fi
14937
14938    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14939  fi
14940
14941              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14942$as_echo_n "checking for Boot JDK... " >&6; }
14943              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14944$as_echo "$BOOT_JDK" >&6; }
14945              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14946$as_echo_n "checking Boot JDK version... " >&6; }
14947              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14948              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14949$as_echo "$BOOT_JDK_VERSION" >&6; }
14950            fi # end check jdk version
14951          fi # end check rt.jar
14952        fi # end check javac
14953      fi # end check java
14954    fi # end check boot jdk found
14955  fi
14956
14957  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14958
14959  if test "x$BOOT_JDK_FOUND" = xno; then
14960    # Now execute the test
14961
14962  BOOT_JDK_PREFIX="/usr/lib/jvm"
14963  BOOT_JDK_SUFFIX=""
14964  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14965  if test "x$ALL_JDKS_FOUND" != x; then
14966    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14967
14968  if test "x$BOOT_JDK_FOUND" = xno; then
14969    # Now execute the test
14970
14971        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14972        if test -d "$BOOT_JDK"; then
14973          BOOT_JDK_FOUND=maybe
14974          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14975$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14976        fi
14977
14978
14979    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14980    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14981      # Do we have a bin/java?
14982      if test ! -x "$BOOT_JDK/bin/java"; then
14983        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14985        BOOT_JDK_FOUND=no
14986      else
14987        # Do we have a bin/javac?
14988        if test ! -x "$BOOT_JDK/bin/javac"; then
14989          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14991          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14992$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14993          BOOT_JDK_FOUND=no
14994        else
14995          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14996          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14997            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14999            BOOT_JDK_FOUND=no
15000          else
15001            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15002            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15003
15004            # Extra M4 quote needed to protect [] in grep expression.
15005            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15006            if test "x$FOUND_VERSION_78" = x; then
15007              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15009              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15010$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15011              BOOT_JDK_FOUND=no
15012            else
15013              # We're done! :-)
15014              BOOT_JDK_FOUND=yes
15015
15016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15017
15018  # Input might be given as Windows format, start by converting to
15019  # unix format.
15020  path="$BOOT_JDK"
15021  new_path=`$CYGPATH -u "$path"`
15022
15023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15026  # "foo.exe" is OK but "foo" is an error.
15027  #
15028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15029  # It is also a way to make sure we got the proper file name for the real test later on.
15030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15031  if test "x$test_shortpath" = x; then
15032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15033$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15034    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15035  fi
15036
15037  # Call helper function which possibly converts this using DOS-style short mode.
15038  # If so, the updated path is stored in $new_path.
15039
15040  input_path="$new_path"
15041  # Check if we need to convert this using DOS-style short mode. If the path
15042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15043  # take no chances and rewrite it.
15044  # Note: m4 eats our [], so we need to use [ and ] instead.
15045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15046  if test "x$has_forbidden_chars" != x; then
15047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15051      # Going to short mode and back again did indeed matter. Since short mode is
15052      # case insensitive, let's make it lowercase to improve readability.
15053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15054      # Now convert it back to Unix-stile (cygpath)
15055      input_path=`$CYGPATH -u "$shortmode_path"`
15056      new_path="$input_path"
15057    fi
15058  fi
15059
15060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15061  if test "x$test_cygdrive_prefix" = x; then
15062    # As a simple fix, exclude /usr/bin since it's not a real path.
15063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15065      # a path prefixed by /cygdrive for fixpath to work.
15066      new_path="$CYGWIN_ROOT_PATH$input_path"
15067    fi
15068  fi
15069
15070
15071  if test "x$path" != "x$new_path"; then
15072    BOOT_JDK="$new_path"
15073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15074$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15075  fi
15076
15077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15078
15079  path="$BOOT_JDK"
15080  has_colon=`$ECHO $path | $GREP ^.:`
15081  new_path="$path"
15082  if test "x$has_colon" = x; then
15083    # Not in mixed or Windows style, start by that.
15084    new_path=`cmd //c echo $path`
15085  fi
15086
15087
15088  input_path="$new_path"
15089  # Check if we need to convert this using DOS-style short mode. If the path
15090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15091  # take no chances and rewrite it.
15092  # Note: m4 eats our [], so we need to use [ and ] instead.
15093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15094  if test "x$has_forbidden_chars" != x; then
15095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15097  fi
15098
15099
15100  windows_path="$new_path"
15101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15102    unix_path=`$CYGPATH -u "$windows_path"`
15103    new_path="$unix_path"
15104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15106    new_path="$unix_path"
15107  fi
15108
15109  if test "x$path" != "x$new_path"; then
15110    BOOT_JDK="$new_path"
15111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15112$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15113  fi
15114
15115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15117
15118  else
15119    # We're on a posix platform. Hooray! :)
15120    path="$BOOT_JDK"
15121    has_space=`$ECHO "$path" | $GREP " "`
15122    if test "x$has_space" != x; then
15123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15124$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15125      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15126    fi
15127
15128    # Use eval to expand a potential ~
15129    eval path="$path"
15130    if test ! -f "$path" && test ! -d "$path"; then
15131      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15132    fi
15133
15134    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15135  fi
15136
15137              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15138$as_echo_n "checking for Boot JDK... " >&6; }
15139              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15140$as_echo "$BOOT_JDK" >&6; }
15141              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15142$as_echo_n "checking Boot JDK version... " >&6; }
15143              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15144              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15145$as_echo "$BOOT_JDK_VERSION" >&6; }
15146            fi # end check jdk version
15147          fi # end check rt.jar
15148        fi # end check javac
15149      fi # end check java
15150    fi # end check boot jdk found
15151  fi
15152
15153    done
15154  fi
15155
15156
15157    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15158    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15159      # Do we have a bin/java?
15160      if test ! -x "$BOOT_JDK/bin/java"; then
15161        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15163        BOOT_JDK_FOUND=no
15164      else
15165        # Do we have a bin/javac?
15166        if test ! -x "$BOOT_JDK/bin/javac"; then
15167          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15168$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15169          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15170$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15171          BOOT_JDK_FOUND=no
15172        else
15173          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15174          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15175            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15177            BOOT_JDK_FOUND=no
15178          else
15179            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15180            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15181
15182            # Extra M4 quote needed to protect [] in grep expression.
15183            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15184            if test "x$FOUND_VERSION_78" = x; then
15185              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15187              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15188$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15189              BOOT_JDK_FOUND=no
15190            else
15191              # We're done! :-)
15192              BOOT_JDK_FOUND=yes
15193
15194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15195
15196  # Input might be given as Windows format, start by converting to
15197  # unix format.
15198  path="$BOOT_JDK"
15199  new_path=`$CYGPATH -u "$path"`
15200
15201  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15202  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15203  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15204  # "foo.exe" is OK but "foo" is an error.
15205  #
15206  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15207  # It is also a way to make sure we got the proper file name for the real test later on.
15208  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15209  if test "x$test_shortpath" = x; then
15210    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15211$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15212    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15213  fi
15214
15215  # Call helper function which possibly converts this using DOS-style short mode.
15216  # If so, the updated path is stored in $new_path.
15217
15218  input_path="$new_path"
15219  # Check if we need to convert this using DOS-style short mode. If the path
15220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15221  # take no chances and rewrite it.
15222  # Note: m4 eats our [], so we need to use [ and ] instead.
15223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15224  if test "x$has_forbidden_chars" != x; then
15225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15229      # Going to short mode and back again did indeed matter. Since short mode is
15230      # case insensitive, let's make it lowercase to improve readability.
15231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15232      # Now convert it back to Unix-stile (cygpath)
15233      input_path=`$CYGPATH -u "$shortmode_path"`
15234      new_path="$input_path"
15235    fi
15236  fi
15237
15238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15239  if test "x$test_cygdrive_prefix" = x; then
15240    # As a simple fix, exclude /usr/bin since it's not a real path.
15241    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15243      # a path prefixed by /cygdrive for fixpath to work.
15244      new_path="$CYGWIN_ROOT_PATH$input_path"
15245    fi
15246  fi
15247
15248
15249  if test "x$path" != "x$new_path"; then
15250    BOOT_JDK="$new_path"
15251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15252$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15253  fi
15254
15255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15256
15257  path="$BOOT_JDK"
15258  has_colon=`$ECHO $path | $GREP ^.:`
15259  new_path="$path"
15260  if test "x$has_colon" = x; then
15261    # Not in mixed or Windows style, start by that.
15262    new_path=`cmd //c echo $path`
15263  fi
15264
15265
15266  input_path="$new_path"
15267  # Check if we need to convert this using DOS-style short mode. If the path
15268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15269  # take no chances and rewrite it.
15270  # Note: m4 eats our [], so we need to use [ and ] instead.
15271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15272  if test "x$has_forbidden_chars" != x; then
15273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15274    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15275  fi
15276
15277
15278  windows_path="$new_path"
15279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15280    unix_path=`$CYGPATH -u "$windows_path"`
15281    new_path="$unix_path"
15282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15284    new_path="$unix_path"
15285  fi
15286
15287  if test "x$path" != "x$new_path"; then
15288    BOOT_JDK="$new_path"
15289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15290$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15291  fi
15292
15293  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15294  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15295
15296  else
15297    # We're on a posix platform. Hooray! :)
15298    path="$BOOT_JDK"
15299    has_space=`$ECHO "$path" | $GREP " "`
15300    if test "x$has_space" != x; then
15301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15302$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15303      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15304    fi
15305
15306    # Use eval to expand a potential ~
15307    eval path="$path"
15308    if test ! -f "$path" && test ! -d "$path"; then
15309      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15310    fi
15311
15312    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15313  fi
15314
15315              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15316$as_echo_n "checking for Boot JDK... " >&6; }
15317              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15318$as_echo "$BOOT_JDK" >&6; }
15319              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15320$as_echo_n "checking Boot JDK version... " >&6; }
15321              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15322              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15323$as_echo "$BOOT_JDK_VERSION" >&6; }
15324            fi # end check jdk version
15325          fi # end check rt.jar
15326        fi # end check javac
15327      fi # end check java
15328    fi # end check boot jdk found
15329  fi
15330
15331  fi
15332
15333
15334    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15335    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15336      # Do we have a bin/java?
15337      if test ! -x "$BOOT_JDK/bin/java"; then
15338        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15340        BOOT_JDK_FOUND=no
15341      else
15342        # Do we have a bin/javac?
15343        if test ! -x "$BOOT_JDK/bin/javac"; then
15344          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15345$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15346          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15347$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15348          BOOT_JDK_FOUND=no
15349        else
15350          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15351          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15352            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15353$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15354            BOOT_JDK_FOUND=no
15355          else
15356            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15357            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15358
15359            # Extra M4 quote needed to protect [] in grep expression.
15360            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15361            if test "x$FOUND_VERSION_78" = x; then
15362              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15363$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15364              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15365$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15366              BOOT_JDK_FOUND=no
15367            else
15368              # We're done! :-)
15369              BOOT_JDK_FOUND=yes
15370
15371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15372
15373  # Input might be given as Windows format, start by converting to
15374  # unix format.
15375  path="$BOOT_JDK"
15376  new_path=`$CYGPATH -u "$path"`
15377
15378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15381  # "foo.exe" is OK but "foo" is an error.
15382  #
15383  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15384  # It is also a way to make sure we got the proper file name for the real test later on.
15385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15386  if test "x$test_shortpath" = x; then
15387    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15388$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15389    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15390  fi
15391
15392  # Call helper function which possibly converts this using DOS-style short mode.
15393  # If so, the updated path is stored in $new_path.
15394
15395  input_path="$new_path"
15396  # Check if we need to convert this using DOS-style short mode. If the path
15397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15398  # take no chances and rewrite it.
15399  # Note: m4 eats our [], so we need to use [ and ] instead.
15400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15401  if test "x$has_forbidden_chars" != x; then
15402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15406      # Going to short mode and back again did indeed matter. Since short mode is
15407      # case insensitive, let's make it lowercase to improve readability.
15408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15409      # Now convert it back to Unix-stile (cygpath)
15410      input_path=`$CYGPATH -u "$shortmode_path"`
15411      new_path="$input_path"
15412    fi
15413  fi
15414
15415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15416  if test "x$test_cygdrive_prefix" = x; then
15417    # As a simple fix, exclude /usr/bin since it's not a real path.
15418    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15420      # a path prefixed by /cygdrive for fixpath to work.
15421      new_path="$CYGWIN_ROOT_PATH$input_path"
15422    fi
15423  fi
15424
15425
15426  if test "x$path" != "x$new_path"; then
15427    BOOT_JDK="$new_path"
15428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15429$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15430  fi
15431
15432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15433
15434  path="$BOOT_JDK"
15435  has_colon=`$ECHO $path | $GREP ^.:`
15436  new_path="$path"
15437  if test "x$has_colon" = x; then
15438    # Not in mixed or Windows style, start by that.
15439    new_path=`cmd //c echo $path`
15440  fi
15441
15442
15443  input_path="$new_path"
15444  # Check if we need to convert this using DOS-style short mode. If the path
15445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15446  # take no chances and rewrite it.
15447  # Note: m4 eats our [], so we need to use [ and ] instead.
15448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15449  if test "x$has_forbidden_chars" != x; then
15450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15452  fi
15453
15454
15455  windows_path="$new_path"
15456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15457    unix_path=`$CYGPATH -u "$windows_path"`
15458    new_path="$unix_path"
15459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15461    new_path="$unix_path"
15462  fi
15463
15464  if test "x$path" != "x$new_path"; then
15465    BOOT_JDK="$new_path"
15466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15467$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15468  fi
15469
15470  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15471  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15472
15473  else
15474    # We're on a posix platform. Hooray! :)
15475    path="$BOOT_JDK"
15476    has_space=`$ECHO "$path" | $GREP " "`
15477    if test "x$has_space" != x; then
15478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15479$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15480      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15481    fi
15482
15483    # Use eval to expand a potential ~
15484    eval path="$path"
15485    if test ! -f "$path" && test ! -d "$path"; then
15486      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15487    fi
15488
15489    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15490  fi
15491
15492              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15493$as_echo_n "checking for Boot JDK... " >&6; }
15494              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15495$as_echo "$BOOT_JDK" >&6; }
15496              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15497$as_echo_n "checking Boot JDK version... " >&6; }
15498              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15499              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15500$as_echo "$BOOT_JDK_VERSION" >&6; }
15501            fi # end check jdk version
15502          fi # end check rt.jar
15503        fi # end check javac
15504      fi # end check java
15505    fi # end check boot jdk found
15506  fi
15507
15508
15509# If we haven't found anything yet, we've truly lost. Give up.
15510if test "x$BOOT_JDK_FOUND" = xno; then
15511
15512    # Print a helpful message on how to acquire the necessary build dependency.
15513    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15514    MISSING_DEPENDENCY=openjdk
15515    PKGHANDLER_COMMAND=
15516
15517    case $PKGHANDLER in
15518	apt-get)
15519                apt_help     $MISSING_DEPENDENCY ;;
15520    yum)
15521                yum_help     $MISSING_DEPENDENCY ;;
15522	port)
15523                port_help    $MISSING_DEPENDENCY ;;
15524	pkgutil)
15525                pkgutil_help $MISSING_DEPENDENCY ;;
15526	pkgadd)
15527                pkgadd_help  $MISSING_DEPENDENCY ;;
15528    * )
15529      break ;;
15530    esac
15531
15532    if test "x$PKGHANDLER_COMMAND" != x; then
15533        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15534    fi
15535
15536  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15537$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15538  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15539$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15540  as_fn_error $? "Cannot continue" "$LINENO" 5
15541fi
15542
15543# Setup proper paths for what we found
15544BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15545if test ! -f "$BOOT_RTJAR"; then
15546    # On MacOSX it is called classes.jar
15547    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15548    if test -f "$BOOT_RTJAR"; then
15549      # Remove the ..
15550      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15551    fi
15552fi
15553BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15554BOOT_JDK="$BOOT_JDK"
15555
15556
15557
15558
15559# Setup tools from the Boot JDK.
15560
15561  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15562$as_echo_n "checking for java in Boot JDK... " >&6; }
15563  JAVA=$BOOT_JDK/bin/java
15564  if test ! -x $JAVA; then
15565      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15566$as_echo "not found" >&6; }
15567      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15568$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15569      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15570  fi
15571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15572$as_echo "ok" >&6; }
15573
15574
15575  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15576$as_echo_n "checking for javac in Boot JDK... " >&6; }
15577  JAVAC=$BOOT_JDK/bin/javac
15578  if test ! -x $JAVAC; then
15579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15580$as_echo "not found" >&6; }
15581      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15582$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15583      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15584  fi
15585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15586$as_echo "ok" >&6; }
15587
15588
15589  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15590$as_echo_n "checking for javah in Boot JDK... " >&6; }
15591  JAVAH=$BOOT_JDK/bin/javah
15592  if test ! -x $JAVAH; then
15593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15594$as_echo "not found" >&6; }
15595      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15596$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15597      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15598  fi
15599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15600$as_echo "ok" >&6; }
15601
15602
15603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15604$as_echo_n "checking for javap in Boot JDK... " >&6; }
15605  JAVAP=$BOOT_JDK/bin/javap
15606  if test ! -x $JAVAP; then
15607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15608$as_echo "not found" >&6; }
15609      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15610$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15611      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15612  fi
15613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15614$as_echo "ok" >&6; }
15615
15616
15617  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15618$as_echo_n "checking for jar in Boot JDK... " >&6; }
15619  JAR=$BOOT_JDK/bin/jar
15620  if test ! -x $JAR; then
15621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15622$as_echo "not found" >&6; }
15623      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15624$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15625      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15626  fi
15627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15628$as_echo "ok" >&6; }
15629
15630
15631  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15632$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15633  RMIC=$BOOT_JDK/bin/rmic
15634  if test ! -x $RMIC; then
15635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15636$as_echo "not found" >&6; }
15637      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15638$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15639      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15640  fi
15641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15642$as_echo "ok" >&6; }
15643
15644
15645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15646$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15647  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15648  if test ! -x $NATIVE2ASCII; then
15649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15650$as_echo "not found" >&6; }
15651      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15652$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15653      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15654  fi
15655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15656$as_echo "ok" >&6; }
15657
15658
15659# Finally, set some other options...
15660
15661# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15662BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15663
15664
15665
15666
15667##############################################################################
15668#
15669# Specify options for anything that is run with the Boot JDK.
15670#
15671
15672# Check whether --with-boot-jdk-jvmargs was given.
15673if test "${with_boot_jdk_jvmargs+set}" = set; then :
15674  withval=$with_boot_jdk_jvmargs;
15675fi
15676
15677
15678if test "x$with_boot_jdk_jvmargs" = x; then
15679    # Not all JVM:s accept the same arguments on the command line.
15680    # OpenJDK specific increase in thread stack for JDK build,
15681    # well more specifically, when running javac.
15682    if test "x$BUILD_NUM_BITS" = x32; then
15683       STACK_SIZE=768
15684    else
15685       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15686       # since 64-bit pointers are pushed on the stach. Apparently, we need
15687       # to increase the stack space when javacing the JDK....
15688       STACK_SIZE=1536
15689    fi
15690
15691    # Minimum amount of heap memory.
15692
15693    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15694    $ECHO "Command: $JAVA -Xms64M -version" >&5
15695    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15696    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15697    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15698    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15699        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15700	JVM_ARG_OK=true
15701    else
15702	$ECHO "Arg failed:" >&5
15703	$ECHO "$OUTPUT" >&5
15704	JVM_ARG_OK=false
15705    fi
15706
15707    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15708        # Why does macosx need more heap? Its the huge JDK batch.
15709
15710    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15711    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15712    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15713    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15714    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15715    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15716        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15717	JVM_ARG_OK=true
15718    else
15719	$ECHO "Arg failed:" >&5
15720	$ECHO "$OUTPUT" >&5
15721	JVM_ARG_OK=false
15722    fi
15723
15724    else
15725
15726    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15727    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15728    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15729    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15730    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15731    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15732        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15733	JVM_ARG_OK=true
15734    else
15735	$ECHO "Arg failed:" >&5
15736	$ECHO "$OUTPUT" >&5
15737	JVM_ARG_OK=false
15738    fi
15739
15740    fi
15741    # When is adding -client something that speeds up the JVM?
15742    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15743
15744    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15745    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15746    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15747    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15748    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15749    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15750        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15751	JVM_ARG_OK=true
15752    else
15753	$ECHO "Arg failed:" >&5
15754	$ECHO "$OUTPUT" >&5
15755	JVM_ARG_OK=false
15756    fi
15757
15758
15759    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15760    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15761    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15762    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15763    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15764    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15765        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15766	JVM_ARG_OK=true
15767    else
15768	$ECHO "Arg failed:" >&5
15769	$ECHO "$OUTPUT" >&5
15770	JVM_ARG_OK=false
15771    fi
15772
15773
15774    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15775    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15776    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15777    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15778    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15779    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15780        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15781	JVM_ARG_OK=true
15782    else
15783	$ECHO "Arg failed:" >&5
15784	$ECHO "$OUTPUT" >&5
15785	JVM_ARG_OK=false
15786    fi
15787
15788    # Disable special log output when a debug build is used as Boot JDK...
15789
15790    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15791    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15792    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15793    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15794    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15795    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15796        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15797	JVM_ARG_OK=true
15798    else
15799	$ECHO "Arg failed:" >&5
15800	$ECHO "$OUTPUT" >&5
15801	JVM_ARG_OK=false
15802    fi
15803
15804fi
15805
15806BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15807
15808
15809
15810###############################################################################
15811#
15812# Configure the sources to use. We can add or override individual directories.
15813#
15814###############################################################################
15815
15816
15817
15818# Where are the sources. Any of these can be overridden
15819# using --with-override-corba and the likes.
15820LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15821CORBA_TOPDIR="$SRC_ROOT/corba"
15822JAXP_TOPDIR="$SRC_ROOT/jaxp"
15823JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15824HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15825NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15826JDK_TOPDIR="$SRC_ROOT/jdk"
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837###############################################################################
15838#
15839# Pickup additional source for a component from outside of the source root
15840# or override source for a component.
15841#
15842
15843# Check whether --with-add-source-root was given.
15844if test "${with_add_source_root+set}" = set; then :
15845  withval=$with_add_source_root;
15846fi
15847
15848
15849
15850# Check whether --with-override-source-root was given.
15851if test "${with_override_source_root+set}" = set; then :
15852  withval=$with_override_source_root;
15853fi
15854
15855
15856
15857# Check whether --with-adds-and-overrides was given.
15858if test "${with_adds_and_overrides+set}" = set; then :
15859  withval=$with_adds_and_overrides;
15860fi
15861
15862
15863if test "x$with_adds_and_overrides" != x; then
15864    with_add_source_root="$with_adds_and_overrides/adds"
15865    with_override_source_root="$with_adds_and_overrides/overrides"
15866fi
15867
15868if test "x$with_add_source_root" != x; then
15869    if ! test -d $with_add_source_root; then
15870       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15871    fi
15872    CURDIR="$PWD"
15873    cd "$with_add_source_root"
15874    ADD_SRC_ROOT="`pwd`"
15875    cd "$CURDIR"
15876    # Verify that the addon source root does not have any root makefiles.
15877    # If it does, then it is usually an error, prevent this.
15878    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15879       test -f $with_add_source_root/langtools/make/Makefile; then
15880        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
15881    fi
15882    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15883       test -f $with_add_source_root/corba/make/Makefile; then
15884        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
15885    fi
15886    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15887       test -f $with_add_source_root/jaxp/make/Makefile; then
15888        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
15889    fi
15890    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15891       test -f $with_add_source_root/jaxws/make/Makefile; then
15892        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
15893    fi
15894    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15895       test -f $with_add_source_root/hotspot/make/Makefile; then
15896        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
15897    fi
15898    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15899       test -f $with_add_source_root/jdk/make/Makefile; then
15900        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
15901    fi
15902fi
15903
15904
15905if test "x$with_override_source_root" != x; then
15906    if ! test -d $with_override_source_root; then
15907       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15908    fi
15909    CURDIR="$PWD"
15910    cd "$with_override_source_root"
15911    OVERRIDE_SRC_ROOT="`pwd`"
15912    cd "$CURDIR"
15913    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15914       test -f $with_override_source_root/langtools/make/Makefile; then
15915        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
15916    fi
15917    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15918       test -f $with_override_source_root/corba/make/Makefile; then
15919        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
15920    fi
15921    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15922       test -f $with_override_source_root/jaxp/make/Makefile; then
15923        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
15924    fi
15925    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15926       test -f $with_override_source_root/jaxws/make/Makefile; then
15927        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
15928    fi
15929    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15930       test -f $with_override_source_root/hotspot/make/Makefile; then
15931        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
15932    fi
15933    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15934       test -f $with_override_source_root/jdk/make/Makefile; then
15935        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
15936    fi
15937fi
15938
15939
15940###############################################################################
15941#
15942# Override a repo completely, this is used for example when you have 3 small
15943# development sandboxes of the langtools sources and want to avoid having 3 full
15944# OpenJDK sources checked out on disk.
15945#
15946# Assuming that the 3 langtools sandboxes are located here:
15947# /home/fredrik/sandbox1/langtools
15948# /home/fredrik/sandbox2/langtools
15949# /home/fredrik/sandbox3/langtools
15950#
15951# From the source root you create build subdirs manually:
15952#     mkdir -p build1 build2 build3
15953# in each build directory run:
15954#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15955#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15956#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15957#
15958
15959
15960# Check whether --with-override-langtools was given.
15961if test "${with_override_langtools+set}" = set; then :
15962  withval=$with_override_langtools;
15963fi
15964
15965
15966
15967# Check whether --with-override-corba was given.
15968if test "${with_override_corba+set}" = set; then :
15969  withval=$with_override_corba;
15970fi
15971
15972
15973
15974# Check whether --with-override-jaxp was given.
15975if test "${with_override_jaxp+set}" = set; then :
15976  withval=$with_override_jaxp;
15977fi
15978
15979
15980
15981# Check whether --with-override-jaxws was given.
15982if test "${with_override_jaxws+set}" = set; then :
15983  withval=$with_override_jaxws;
15984fi
15985
15986
15987
15988# Check whether --with-override-hotspot was given.
15989if test "${with_override_hotspot+set}" = set; then :
15990  withval=$with_override_hotspot;
15991fi
15992
15993
15994
15995# Check whether --with-override-jdk was given.
15996if test "${with_override_jdk+set}" = set; then :
15997  withval=$with_override_jdk;
15998fi
15999
16000
16001if test "x$with_override_langtools" != x; then
16002    CURDIR="$PWD"
16003    cd "$with_override_langtools"
16004    LANGTOOLS_TOPDIR="`pwd`"
16005    cd "$CURDIR"
16006    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16007        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16008    fi
16009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16010$as_echo_n "checking if langtools should be overridden... " >&6; }
16011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16012$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16013fi
16014if test "x$with_override_corba" != x; then
16015    CURDIR="$PWD"
16016    cd "$with_override_corba"
16017    CORBA_TOPDIR="`pwd`"
16018    cd "$CURDIR"
16019    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16020        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16021    fi
16022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16023$as_echo_n "checking if corba should be overridden... " >&6; }
16024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16025$as_echo "yes with $CORBA_TOPDIR" >&6; }
16026fi
16027if test "x$with_override_jaxp" != x; then
16028    CURDIR="$PWD"
16029    cd "$with_override_jaxp"
16030    JAXP_TOPDIR="`pwd`"
16031    cd "$CURDIR"
16032    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16033        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16034    fi
16035    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16036$as_echo_n "checking if jaxp should be overridden... " >&6; }
16037    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16038$as_echo "yes with $JAXP_TOPDIR" >&6; }
16039fi
16040if test "x$with_override_jaxws" != x; then
16041    CURDIR="$PWD"
16042    cd "$with_override_jaxws"
16043    JAXWS_TOPDIR="`pwd`"
16044    cd "$CURDIR"
16045    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16046        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16047    fi
16048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16049$as_echo_n "checking if jaxws should be overridden... " >&6; }
16050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16051$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16052fi
16053if test "x$with_override_hotspot" != x; then
16054    CURDIR="$PWD"
16055    cd "$with_override_hotspot"
16056    HOTSPOT_TOPDIR="`pwd`"
16057    cd "$CURDIR"
16058    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16059       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16060        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16061    fi
16062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16063$as_echo_n "checking if hotspot should be overridden... " >&6; }
16064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16065$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16066fi
16067if test "x$with_override_nashorn" != x; then
16068    CURDIR="$PWD"
16069    cd "$with_override_nashorn"
16070    NASHORN_TOPDIR="`pwd`"
16071    cd "$CURDIR"
16072    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16073        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16074    fi
16075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16076$as_echo_n "checking if nashorn should be overridden... " >&6; }
16077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16078$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16079fi
16080if test "x$with_override_jdk" != x; then
16081    CURDIR="$PWD"
16082    cd "$with_override_jdk"
16083    JDK_TOPDIR="`pwd`"
16084    cd "$CURDIR"
16085    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16086        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16087    fi
16088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16089$as_echo_n "checking if JDK should be overridden... " >&6; }
16090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16091$as_echo "yes with $JDK_TOPDIR" >&6; }
16092fi
16093
16094
16095
16096BUILD_OUTPUT="$OUTPUT_ROOT"
16097
16098
16099HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16100BUILD_HOTSPOT=true
16101
16102
16103
16104# Check whether --with-import-hotspot was given.
16105if test "${with_import_hotspot+set}" = set; then :
16106  withval=$with_import_hotspot;
16107fi
16108
16109if test "x$with_import_hotspot" != x; then
16110    CURDIR="$PWD"
16111    cd "$with_import_hotspot"
16112    HOTSPOT_DIST="`pwd`"
16113    cd "$CURDIR"
16114    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16115        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16116    fi
16117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16118$as_echo_n "checking if hotspot should be imported... " >&6; }
16119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16120$as_echo "yes from $HOTSPOT_DIST" >&6; }
16121    BUILD_HOTSPOT=false
16122fi
16123
16124JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16125
16126
16127###############################################################################
16128#
16129# Setup the toolchain (compilers etc), i.e. the tools that need to be
16130# cross-compilation aware.
16131#
16132###############################################################################
16133
16134
16135###############################################################################
16136#
16137# Configure the development tool paths and potential sysroot.
16138#
16139ac_ext=cpp
16140ac_cpp='$CXXCPP $CPPFLAGS'
16141ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16142ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16143ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16144
16145
16146# The option used to specify the target .o,.a or .so file.
16147# When compiling, how to specify the to be created object file.
16148CC_OUT_OPTION='-o$(SPACE)'
16149# When linking, how to specify the to be created executable.
16150EXE_OUT_OPTION='-o$(SPACE)'
16151# When linking, how to specify the to be created dynamically linkable library.
16152LD_OUT_OPTION='-o$(SPACE)'
16153# When archiving, how to specify the to be create static archive for object files.
16154AR_OUT_OPTION='rcs$(SPACE)'
16155
16156
16157
16158
16159
16160# Locate the actual tools
16161
16162
16163# Check whether --with-jtreg was given.
16164if test "${with_jtreg+set}" = set; then :
16165  withval=$with_jtreg;
16166fi
16167
16168
16169  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTReg Regression Test Harness" >&5
16170$as_echo_n "checking for JTReg Regression Test Harness... " >&6; }
16171
16172  if test "x$with_jtreg" != x; then
16173    JT_HOME="$with_jtreg"
16174
16175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16176
16177  # Input might be given as Windows format, start by converting to
16178  # unix format.
16179  path="$JT_HOME"
16180  new_path=`$CYGPATH -u "$path"`
16181
16182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16185  # "foo.exe" is OK but "foo" is an error.
16186  #
16187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16188  # It is also a way to make sure we got the proper file name for the real test later on.
16189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16190  if test "x$test_shortpath" = x; then
16191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16192$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16193    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16194  fi
16195
16196  # Call helper function which possibly converts this using DOS-style short mode.
16197  # If so, the updated path is stored in $new_path.
16198
16199  input_path="$new_path"
16200  # Check if we need to convert this using DOS-style short mode. If the path
16201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16202  # take no chances and rewrite it.
16203  # Note: m4 eats our [], so we need to use [ and ] instead.
16204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16205  if test "x$has_forbidden_chars" != x; then
16206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16210      # Going to short mode and back again did indeed matter. Since short mode is
16211      # case insensitive, let's make it lowercase to improve readability.
16212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16213      # Now convert it back to Unix-stile (cygpath)
16214      input_path=`$CYGPATH -u "$shortmode_path"`
16215      new_path="$input_path"
16216    fi
16217  fi
16218
16219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16220  if test "x$test_cygdrive_prefix" = x; then
16221    # As a simple fix, exclude /usr/bin since it's not a real path.
16222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16224      # a path prefixed by /cygdrive for fixpath to work.
16225      new_path="$CYGWIN_ROOT_PATH$input_path"
16226    fi
16227  fi
16228
16229
16230  if test "x$path" != "x$new_path"; then
16231    JT_HOME="$new_path"
16232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16233$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16234  fi
16235
16236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16237
16238  path="$JT_HOME"
16239  has_colon=`$ECHO $path | $GREP ^.:`
16240  new_path="$path"
16241  if test "x$has_colon" = x; then
16242    # Not in mixed or Windows style, start by that.
16243    new_path=`cmd //c echo $path`
16244  fi
16245
16246
16247  input_path="$new_path"
16248  # Check if we need to convert this using DOS-style short mode. If the path
16249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16250  # take no chances and rewrite it.
16251  # Note: m4 eats our [], so we need to use [ and ] instead.
16252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16253  if test "x$has_forbidden_chars" != x; then
16254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16256  fi
16257
16258
16259  windows_path="$new_path"
16260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16261    unix_path=`$CYGPATH -u "$windows_path"`
16262    new_path="$unix_path"
16263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16265    new_path="$unix_path"
16266  fi
16267
16268  if test "x$path" != "x$new_path"; then
16269    JT_HOME="$new_path"
16270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16271$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16272  fi
16273
16274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16276
16277  else
16278    # We're on a posix platform. Hooray! :)
16279    path="$JT_HOME"
16280    has_space=`$ECHO "$path" | $GREP " "`
16281    if test "x$has_space" != x; then
16282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16283$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16284      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16285    fi
16286
16287    # Use eval to expand a potential ~
16288    eval path="$path"
16289    if test ! -f "$path" && test ! -d "$path"; then
16290      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16291    fi
16292
16293    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16294  fi
16295
16296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
16297$as_echo "$JT_HOME" >&6; }
16298
16299    # jtreg win32 script works for everybody
16300    JTREGEXE="$JT_HOME/win32/bin/jtreg"
16301    if test ! -f "$JTREGEXE"; then
16302      as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16303    fi
16304  else
16305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16306$as_echo "no" >&6; }
16307  fi
16308
16309
16310
16311
16312
16313if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16314
16315  # Store path to cygwin link.exe to help excluding it when searching for
16316  # VS linker. This must be done before changing the PATH when looking for VS.
16317  # Extract the first word of "link", so it can be a program name with args.
16318set dummy link; ac_word=$2
16319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16320$as_echo_n "checking for $ac_word... " >&6; }
16321if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16322  $as_echo_n "(cached) " >&6
16323else
16324  case $CYGWIN_LINK in
16325  [\\/]* | ?:[\\/]*)
16326  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16327  ;;
16328  *)
16329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16330for as_dir in $PATH
16331do
16332  IFS=$as_save_IFS
16333  test -z "$as_dir" && as_dir=.
16334    for ac_exec_ext in '' $ac_executable_extensions; do
16335  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16336    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16338    break 2
16339  fi
16340done
16341  done
16342IFS=$as_save_IFS
16343
16344  ;;
16345esac
16346fi
16347CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16348if test -n "$CYGWIN_LINK"; then
16349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16350$as_echo "$CYGWIN_LINK" >&6; }
16351else
16352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16353$as_echo "no" >&6; }
16354fi
16355
16356
16357  if test "x$CYGWIN_LINK" != x; then
16358    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16359$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16360    "$CYGWIN_LINK" --version > /dev/null
16361    if test $? -eq 0 ; then
16362      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16363$as_echo "yes" >&6; }
16364    else
16365      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16366$as_echo "no" >&6; }
16367      # This might be the VS linker. Don't exclude it later on.
16368      CYGWIN_LINK=""
16369    fi
16370  fi
16371
16372  # First-hand choice is to locate and run the vsvars bat file.
16373
16374  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16375    VCVARSFILE="vc/bin/vcvars32.bat"
16376  else
16377    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16378  fi
16379
16380  VS_ENV_CMD=""
16381  VS_ENV_ARGS=""
16382  if test "x$with_toolsdir" != x; then
16383
16384  if test "x$VS_ENV_CMD" = x; then
16385    VS100BASE="$with_toolsdir/../.."
16386    METHOD="--with-tools-dir"
16387
16388  windows_path="$VS100BASE"
16389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16390    unix_path=`$CYGPATH -u "$windows_path"`
16391    VS100BASE="$unix_path"
16392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16394    VS100BASE="$unix_path"
16395  fi
16396
16397    if test -d "$VS100BASE"; then
16398      if test -f "$VS100BASE/$VCVARSFILE"; then
16399        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16400$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16401        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16402      else
16403        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16404$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16405        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16406$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16407      fi
16408    fi
16409  fi
16410
16411  fi
16412
16413  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16414    # Having specified an argument which is incorrect will produce an instant failure;
16415    # we should not go on looking
16416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16417$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16418    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16419$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16420    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16421  fi
16422
16423  if test "x$ProgramW6432" != x; then
16424
16425  if test "x$VS_ENV_CMD" = x; then
16426    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16427    METHOD="well-known name"
16428
16429  windows_path="$WIN_SDK_BASE"
16430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16431    unix_path=`$CYGPATH -u "$windows_path"`
16432    WIN_SDK_BASE="$unix_path"
16433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16435    WIN_SDK_BASE="$unix_path"
16436  fi
16437
16438    if test -d "$WIN_SDK_BASE"; then
16439      # There have been cases of partial or broken SDK installations. A missing
16440      # lib dir is not going to work.
16441      if test ! -d "$WIN_SDK_BASE/../lib"; then
16442        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16443$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16444        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16445$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16446      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16447        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16448$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16449        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16450        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16451          VS_ENV_ARGS="/x86"
16452        else
16453          VS_ENV_ARGS="/x64"
16454        fi
16455      else
16456        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16457$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16458        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16459$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16460      fi
16461    fi
16462  fi
16463
16464  fi
16465  if test "x$PROGRAMW6432" != x; then
16466
16467  if test "x$VS_ENV_CMD" = x; then
16468    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16469    METHOD="well-known name"
16470
16471  windows_path="$WIN_SDK_BASE"
16472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16473    unix_path=`$CYGPATH -u "$windows_path"`
16474    WIN_SDK_BASE="$unix_path"
16475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16477    WIN_SDK_BASE="$unix_path"
16478  fi
16479
16480    if test -d "$WIN_SDK_BASE"; then
16481      # There have been cases of partial or broken SDK installations. A missing
16482      # lib dir is not going to work.
16483      if test ! -d "$WIN_SDK_BASE/../lib"; then
16484        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16485$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16486        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16487$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16488      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16489        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16490$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16491        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16492        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16493          VS_ENV_ARGS="/x86"
16494        else
16495          VS_ENV_ARGS="/x64"
16496        fi
16497      else
16498        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16499$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16500        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16501$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16502      fi
16503    fi
16504  fi
16505
16506  fi
16507  if test "x$PROGRAMFILES" != x; then
16508
16509  if test "x$VS_ENV_CMD" = x; then
16510    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16511    METHOD="well-known name"
16512
16513  windows_path="$WIN_SDK_BASE"
16514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16515    unix_path=`$CYGPATH -u "$windows_path"`
16516    WIN_SDK_BASE="$unix_path"
16517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16519    WIN_SDK_BASE="$unix_path"
16520  fi
16521
16522    if test -d "$WIN_SDK_BASE"; then
16523      # There have been cases of partial or broken SDK installations. A missing
16524      # lib dir is not going to work.
16525      if test ! -d "$WIN_SDK_BASE/../lib"; then
16526        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16527$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16528        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16529$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16530      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16531        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16532$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16533        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16534        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16535          VS_ENV_ARGS="/x86"
16536        else
16537          VS_ENV_ARGS="/x64"
16538        fi
16539      else
16540        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16541$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16542        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16543$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16544      fi
16545    fi
16546  fi
16547
16548  fi
16549
16550  if test "x$VS_ENV_CMD" = x; then
16551    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16552    METHOD="well-known name"
16553
16554  windows_path="$WIN_SDK_BASE"
16555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16556    unix_path=`$CYGPATH -u "$windows_path"`
16557    WIN_SDK_BASE="$unix_path"
16558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16560    WIN_SDK_BASE="$unix_path"
16561  fi
16562
16563    if test -d "$WIN_SDK_BASE"; then
16564      # There have been cases of partial or broken SDK installations. A missing
16565      # lib dir is not going to work.
16566      if test ! -d "$WIN_SDK_BASE/../lib"; then
16567        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16568$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16569        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16570$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16571      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16572        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16573$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16574        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16575        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16576          VS_ENV_ARGS="/x86"
16577        else
16578          VS_ENV_ARGS="/x64"
16579        fi
16580      else
16581        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16582$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16583        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16584$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16585      fi
16586    fi
16587  fi
16588
16589
16590  if test "x$VS_ENV_CMD" = x; then
16591    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16592    METHOD="well-known name"
16593
16594  windows_path="$WIN_SDK_BASE"
16595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16596    unix_path=`$CYGPATH -u "$windows_path"`
16597    WIN_SDK_BASE="$unix_path"
16598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16600    WIN_SDK_BASE="$unix_path"
16601  fi
16602
16603    if test -d "$WIN_SDK_BASE"; then
16604      # There have been cases of partial or broken SDK installations. A missing
16605      # lib dir is not going to work.
16606      if test ! -d "$WIN_SDK_BASE/../lib"; then
16607        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16608$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16609        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16610$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16611      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16612        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16613$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16614        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16615        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16616          VS_ENV_ARGS="/x86"
16617        else
16618          VS_ENV_ARGS="/x64"
16619        fi
16620      else
16621        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16622$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16623        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16624$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16625      fi
16626    fi
16627  fi
16628
16629
16630  if test "x$VS100COMNTOOLS" != x; then
16631
16632  if test "x$VS_ENV_CMD" = x; then
16633    VS100BASE="$VS100COMNTOOLS/../.."
16634    METHOD="VS100COMNTOOLS variable"
16635
16636  windows_path="$VS100BASE"
16637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16638    unix_path=`$CYGPATH -u "$windows_path"`
16639    VS100BASE="$unix_path"
16640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16642    VS100BASE="$unix_path"
16643  fi
16644
16645    if test -d "$VS100BASE"; then
16646      if test -f "$VS100BASE/$VCVARSFILE"; then
16647        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16648$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16649        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16650      else
16651        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16652$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16653        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16654$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16655      fi
16656    fi
16657  fi
16658
16659  fi
16660  if test "x$PROGRAMFILES" != x; then
16661
16662  if test "x$VS_ENV_CMD" = x; then
16663    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16664    METHOD="well-known name"
16665
16666  windows_path="$VS100BASE"
16667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16668    unix_path=`$CYGPATH -u "$windows_path"`
16669    VS100BASE="$unix_path"
16670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16672    VS100BASE="$unix_path"
16673  fi
16674
16675    if test -d "$VS100BASE"; then
16676      if test -f "$VS100BASE/$VCVARSFILE"; then
16677        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16678$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16679        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16680      else
16681        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16682$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16683        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16684$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16685      fi
16686    fi
16687  fi
16688
16689  fi
16690
16691  if test "x$VS_ENV_CMD" = x; then
16692    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16693    METHOD="well-known name"
16694
16695  windows_path="$VS100BASE"
16696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16697    unix_path=`$CYGPATH -u "$windows_path"`
16698    VS100BASE="$unix_path"
16699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16701    VS100BASE="$unix_path"
16702  fi
16703
16704    if test -d "$VS100BASE"; then
16705      if test -f "$VS100BASE/$VCVARSFILE"; then
16706        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16707$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16708        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16709      else
16710        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16711$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16712        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16713$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16714      fi
16715    fi
16716  fi
16717
16718
16719  if test "x$VS_ENV_CMD" = x; then
16720    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16721    METHOD="well-known name"
16722
16723  windows_path="$VS100BASE"
16724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16725    unix_path=`$CYGPATH -u "$windows_path"`
16726    VS100BASE="$unix_path"
16727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16729    VS100BASE="$unix_path"
16730  fi
16731
16732    if test -d "$VS100BASE"; then
16733      if test -f "$VS100BASE/$VCVARSFILE"; then
16734        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16735$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16736        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16737      else
16738        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16739$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16740        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16741$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16742      fi
16743    fi
16744  fi
16745
16746
16747  if test "x$VS_ENV_CMD" != x; then
16748    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16749
16750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16751
16752  # First separate the path from the arguments. This will split at the first
16753  # space.
16754  complete="$VS_ENV_CMD"
16755  path="${complete%% *}"
16756  tmp="$complete EOL"
16757  arguments="${tmp#* }"
16758
16759  # Input might be given as Windows format, start by converting to
16760  # unix format.
16761  new_path=`$CYGPATH -u "$path"`
16762
16763  # Now try to locate executable using which
16764  new_path=`$WHICH "$new_path" 2> /dev/null`
16765  # bat and cmd files are not always considered executable in cygwin causing which
16766  # to not find them
16767  if test "x$new_path" = x \
16768           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16769           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16770    new_path=`$CYGPATH -u "$path"`
16771  fi
16772  if test "x$new_path" = x; then
16773    # Oops. Which didn't find the executable.
16774    # The splitting of arguments from the executable at a space might have been incorrect,
16775    # since paths with space are more likely in Windows. Give it another try with the whole
16776    # argument.
16777    path="$complete"
16778    arguments="EOL"
16779    new_path=`$CYGPATH -u "$path"`
16780    new_path=`$WHICH "$new_path" 2> /dev/null`
16781    # bat and cmd files are not always considered executable in cygwin causing which
16782    # to not find them
16783    if test "x$new_path" = x \
16784             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16785             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16786      new_path=`$CYGPATH -u "$path"`
16787    fi
16788    if test "x$new_path" = x; then
16789      # It's still not found. Now this is an unrecoverable error.
16790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16791$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16792      has_space=`$ECHO "$complete" | $GREP " "`
16793      if test "x$has_space" != x; then
16794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16796      fi
16797      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16798    fi
16799  fi
16800
16801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16804  # "foo.exe" is OK but "foo" is an error.
16805  #
16806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16807  # It is also a way to make sure we got the proper file name for the real test later on.
16808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16809  if test "x$test_shortpath" = x; then
16810    # Short path failed, file does not exist as specified.
16811    # Try adding .exe or .cmd
16812    if test -f "${new_path}.exe"; then
16813       input_to_shortpath="${new_path}.exe"
16814    elif test -f "${new_path}.cmd"; then
16815       input_to_shortpath="${new_path}.cmd"
16816    else
16817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16818$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16819      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16820$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16821      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16822    fi
16823  else
16824    input_to_shortpath="$new_path"
16825  fi
16826
16827  # Call helper function which possibly converts this using DOS-style short mode.
16828  # If so, the updated path is stored in $new_path.
16829  new_path="$input_to_shortpath"
16830
16831  input_path="$input_to_shortpath"
16832  # Check if we need to convert this using DOS-style short mode. If the path
16833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16834  # take no chances and rewrite it.
16835  # Note: m4 eats our [], so we need to use [ and ] instead.
16836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16837  if test "x$has_forbidden_chars" != x; then
16838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16842      # Going to short mode and back again did indeed matter. Since short mode is
16843      # case insensitive, let's make it lowercase to improve readability.
16844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16845      # Now convert it back to Unix-stile (cygpath)
16846      input_path=`$CYGPATH -u "$shortmode_path"`
16847      new_path="$input_path"
16848    fi
16849  fi
16850
16851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16852  if test "x$test_cygdrive_prefix" = x; then
16853    # As a simple fix, exclude /usr/bin since it's not a real path.
16854    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16856      # a path prefixed by /cygdrive for fixpath to work.
16857      new_path="$CYGWIN_ROOT_PATH$input_path"
16858    fi
16859  fi
16860
16861  # remove trailing .exe if any
16862  new_path="${new_path/%.exe/}"
16863
16864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16865
16866  # First separate the path from the arguments. This will split at the first
16867  # space.
16868  complete="$VS_ENV_CMD"
16869  path="${complete%% *}"
16870  tmp="$complete EOL"
16871  arguments="${tmp#* }"
16872
16873  # Input might be given as Windows format, start by converting to
16874  # unix format.
16875  new_path="$path"
16876
16877  windows_path="$new_path"
16878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16879    unix_path=`$CYGPATH -u "$windows_path"`
16880    new_path="$unix_path"
16881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16883    new_path="$unix_path"
16884  fi
16885
16886
16887  # Now try to locate executable using which
16888  new_path=`$WHICH "$new_path" 2> /dev/null`
16889
16890  if test "x$new_path" = x; then
16891    # Oops. Which didn't find the executable.
16892    # The splitting of arguments from the executable at a space might have been incorrect,
16893    # since paths with space are more likely in Windows. Give it another try with the whole
16894    # argument.
16895    path="$complete"
16896    arguments="EOL"
16897    new_path="$path"
16898
16899  windows_path="$new_path"
16900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16901    unix_path=`$CYGPATH -u "$windows_path"`
16902    new_path="$unix_path"
16903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16905    new_path="$unix_path"
16906  fi
16907
16908
16909    new_path=`$WHICH "$new_path" 2> /dev/null`
16910
16911    if test "x$new_path" = x; then
16912      # It's still not found. Now this is an unrecoverable error.
16913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16914$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16915      has_space=`$ECHO "$complete" | $GREP " "`
16916      if test "x$has_space" != x; then
16917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16919      fi
16920      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16921    fi
16922  fi
16923
16924  # Now new_path has a complete unix path to the binary
16925  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16926    # Keep paths in /bin as-is, but remove trailing .exe if any
16927    new_path="${new_path/%.exe/}"
16928    # Do not save /bin paths to all_fixpath_prefixes!
16929  else
16930    # Not in mixed or Windows style, start by that.
16931    new_path=`cmd //c echo $new_path`
16932
16933  input_path="$new_path"
16934  # Check if we need to convert this using DOS-style short mode. If the path
16935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16936  # take no chances and rewrite it.
16937  # Note: m4 eats our [], so we need to use [ and ] instead.
16938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16939  if test "x$has_forbidden_chars" != x; then
16940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16942  fi
16943
16944    # Output is in $new_path
16945
16946  windows_path="$new_path"
16947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16948    unix_path=`$CYGPATH -u "$windows_path"`
16949    new_path="$unix_path"
16950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16952    new_path="$unix_path"
16953  fi
16954
16955    # remove trailing .exe if any
16956    new_path="${new_path/%.exe/}"
16957
16958    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16959    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16960  fi
16961
16962  else
16963    # We're on a posix platform. Hooray! :)
16964    # First separate the path from the arguments. This will split at the first
16965    # space.
16966    complete="$VS_ENV_CMD"
16967    path="${complete%% *}"
16968    tmp="$complete EOL"
16969    arguments="${tmp#* }"
16970
16971    # Cannot rely on the command "which" here since it doesn't always work.
16972    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16973    if test -z "$is_absolute_path"; then
16974      # Path to executable is not absolute. Find it.
16975      IFS_save="$IFS"
16976      IFS=:
16977      for p in $PATH; do
16978        if test -f "$p/$path" && test -x "$p/$path"; then
16979          new_path="$p/$path"
16980          break
16981        fi
16982      done
16983      IFS="$IFS_save"
16984    else
16985      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16986$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16987      new_path="$path"
16988    fi
16989
16990    if test "x$new_path" = x; then
16991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16992$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16993        has_space=`$ECHO "$complete" | $GREP " "`
16994        if test "x$has_space" != x; then
16995          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16997        fi
16998        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16999      fi
17000  fi
17001
17002      # Now join together the path and the arguments once again
17003      if test "x$arguments" != xEOL; then
17004        new_complete="$new_path ${arguments% *}"
17005      else
17006        new_complete="$new_path"
17007      fi
17008
17009  if test "x$complete" != "x$new_complete"; then
17010      VS_ENV_CMD="$new_complete"
17011      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17012$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17013    fi
17014
17015
17016    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17017    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17018$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17019    cd $OUTPUT_ROOT
17020    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17021    # to autoconf standards.
17022
17023    #----
17024
17025    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17026    # but calculate the difference in Cygwin environment before/after running it and then
17027    # apply the diff.
17028
17029    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17030      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17031      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17032      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17033    else
17034      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17035      _dosbash=`cmd //c echo \`which bash\``
17036    fi
17037
17038    # generate the set of exported vars before/after the vs10 setup
17039    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17040    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17041    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17042    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17043
17044    # Now execute the newly created bat file.
17045    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17046    cmd /c localdevenvtmp.bat | cat
17047
17048    # apply the diff (less some non-vs10 vars named by "!")
17049    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17050    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17051    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17052
17053    # cleanup
17054    $RM localdevenvtmp*
17055    #----
17056    cd $CURDIR
17057    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17058      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17059$as_echo "no" >&6; }
17060      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17061$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17062      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17063$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17064      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17065$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17066      as_fn_error $? "Cannot continue" "$LINENO" 5
17067    fi
17068
17069    # Now set all paths and other env variables. This will allow the rest of
17070    # the configure script to find and run the compiler in the proper way.
17071    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17072$as_echo "$as_me: Setting extracted environment variables" >&6;}
17073    . $OUTPUT_ROOT/localdevenv.sh
17074  else
17075    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17076    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17077$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17078  fi
17079
17080  # At this point, we should have corrent variables in the environment, or we can't continue.
17081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17082$as_echo_n "checking for Visual Studio variables... " >&6; }
17083
17084  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17085    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17086      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17087$as_echo "present but broken" >&6; }
17088      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17089    else
17090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17091$as_echo "ok" >&6; }
17092      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17093      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17094      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17095      VS_PATH="$PATH"
17096
17097
17098
17099    fi
17100  else
17101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17102$as_echo "not found" >&6; }
17103
17104    if test "x$VS_ENV_CMD" = x; then
17105      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17106$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17107      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17108$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17109    else
17110      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17111$as_echo "$as_me: Running the extraction script failed." >&6;}
17112    fi
17113    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17114$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17115    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17116$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17117    as_fn_error $? "Cannot continue" "$LINENO" 5
17118  fi
17119
17120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17121$as_echo_n "checking for msvcr100.dll... " >&6; }
17122
17123# Check whether --with-msvcr-dll was given.
17124if test "${with_msvcr_dll+set}" = set; then :
17125  withval=$with_msvcr_dll;
17126fi
17127
17128  if test "x$with_msvcr_dll" != x; then
17129    MSVCR_DLL="$with_msvcr_dll"
17130  else
17131    if test "x$VCINSTALLDIR" != x; then
17132      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17133        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17134      else
17135        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17136        if test "x$MSVCR_DLL" = x; then
17137          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17138        fi
17139      fi
17140      if test "x$MSVCR_DLL" != x; then
17141        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17142$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17143      else
17144        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17145$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17146      fi
17147    fi
17148    if test "x$MSVCR_DLL" = x; then
17149      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17150        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17151$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17152        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17153      fi
17154    fi
17155  fi
17156  if test "x$MSVCR_DLL" = x; then
17157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17158$as_echo "no" >&6; }
17159    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17160  fi
17161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17162$as_echo "$MSVCR_DLL" >&6; }
17163
17164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17165
17166  # Input might be given as Windows format, start by converting to
17167  # unix format.
17168  path="$MSVCR_DLL"
17169  new_path=`$CYGPATH -u "$path"`
17170
17171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17174  # "foo.exe" is OK but "foo" is an error.
17175  #
17176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17177  # It is also a way to make sure we got the proper file name for the real test later on.
17178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17179  if test "x$test_shortpath" = x; then
17180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17181$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17182    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17183  fi
17184
17185  # Call helper function which possibly converts this using DOS-style short mode.
17186  # If so, the updated path is stored in $new_path.
17187
17188  input_path="$new_path"
17189  # Check if we need to convert this using DOS-style short mode. If the path
17190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17191  # take no chances and rewrite it.
17192  # Note: m4 eats our [], so we need to use [ and ] instead.
17193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17194  if test "x$has_forbidden_chars" != x; then
17195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17199      # Going to short mode and back again did indeed matter. Since short mode is
17200      # case insensitive, let's make it lowercase to improve readability.
17201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17202      # Now convert it back to Unix-stile (cygpath)
17203      input_path=`$CYGPATH -u "$shortmode_path"`
17204      new_path="$input_path"
17205    fi
17206  fi
17207
17208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17209  if test "x$test_cygdrive_prefix" = x; then
17210    # As a simple fix, exclude /usr/bin since it's not a real path.
17211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17213      # a path prefixed by /cygdrive for fixpath to work.
17214      new_path="$CYGWIN_ROOT_PATH$input_path"
17215    fi
17216  fi
17217
17218
17219  if test "x$path" != "x$new_path"; then
17220    MSVCR_DLL="$new_path"
17221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17222$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17223  fi
17224
17225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17226
17227  path="$MSVCR_DLL"
17228  has_colon=`$ECHO $path | $GREP ^.:`
17229  new_path="$path"
17230  if test "x$has_colon" = x; then
17231    # Not in mixed or Windows style, start by that.
17232    new_path=`cmd //c echo $path`
17233  fi
17234
17235
17236  input_path="$new_path"
17237  # Check if we need to convert this using DOS-style short mode. If the path
17238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17239  # take no chances and rewrite it.
17240  # Note: m4 eats our [], so we need to use [ and ] instead.
17241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17242  if test "x$has_forbidden_chars" != x; then
17243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17245  fi
17246
17247
17248  windows_path="$new_path"
17249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17250    unix_path=`$CYGPATH -u "$windows_path"`
17251    new_path="$unix_path"
17252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17254    new_path="$unix_path"
17255  fi
17256
17257  if test "x$path" != "x$new_path"; then
17258    MSVCR_DLL="$new_path"
17259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17260$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17261  fi
17262
17263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17265
17266  else
17267    # We're on a posix platform. Hooray! :)
17268    path="$MSVCR_DLL"
17269    has_space=`$ECHO "$path" | $GREP " "`
17270    if test "x$has_space" != x; then
17271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17272$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17273      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17274    fi
17275
17276    # Use eval to expand a potential ~
17277    eval path="$path"
17278    if test ! -f "$path" && test ! -d "$path"; then
17279      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17280    fi
17281
17282    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17283  fi
17284
17285
17286
17287
17288# Check whether --with-dxsdk was given.
17289if test "${with_dxsdk+set}" = set; then :
17290  withval=$with_dxsdk;
17291fi
17292
17293
17294# Check whether --with-dxsdk-lib was given.
17295if test "${with_dxsdk_lib+set}" = set; then :
17296  withval=$with_dxsdk_lib;
17297fi
17298
17299
17300# Check whether --with-dxsdk-include was given.
17301if test "${with_dxsdk_include+set}" = set; then :
17302  withval=$with_dxsdk_include;
17303fi
17304
17305
17306  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17307$as_echo_n "checking for DirectX SDK... " >&6; }
17308
17309  if test "x$with_dxsdk" != x; then
17310    dxsdk_path="$with_dxsdk"
17311  elif test "x$DXSDK_DIR" != x; then
17312    dxsdk_path="$DXSDK_DIR"
17313  elif test -d "C:/DXSDK"; then
17314    dxsdk_path="C:/DXSDK"
17315  else
17316    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17317  fi
17318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17319$as_echo "$dxsdk_path" >&6; }
17320
17321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17322
17323  # Input might be given as Windows format, start by converting to
17324  # unix format.
17325  path="$dxsdk_path"
17326  new_path=`$CYGPATH -u "$path"`
17327
17328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17331  # "foo.exe" is OK but "foo" is an error.
17332  #
17333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17334  # It is also a way to make sure we got the proper file name for the real test later on.
17335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17336  if test "x$test_shortpath" = x; then
17337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17338$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17339    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17340  fi
17341
17342  # Call helper function which possibly converts this using DOS-style short mode.
17343  # If so, the updated path is stored in $new_path.
17344
17345  input_path="$new_path"
17346  # Check if we need to convert this using DOS-style short mode. If the path
17347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17348  # take no chances and rewrite it.
17349  # Note: m4 eats our [], so we need to use [ and ] instead.
17350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17351  if test "x$has_forbidden_chars" != x; then
17352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17356      # Going to short mode and back again did indeed matter. Since short mode is
17357      # case insensitive, let's make it lowercase to improve readability.
17358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17359      # Now convert it back to Unix-stile (cygpath)
17360      input_path=`$CYGPATH -u "$shortmode_path"`
17361      new_path="$input_path"
17362    fi
17363  fi
17364
17365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17366  if test "x$test_cygdrive_prefix" = x; then
17367    # As a simple fix, exclude /usr/bin since it's not a real path.
17368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17370      # a path prefixed by /cygdrive for fixpath to work.
17371      new_path="$CYGWIN_ROOT_PATH$input_path"
17372    fi
17373  fi
17374
17375
17376  if test "x$path" != "x$new_path"; then
17377    dxsdk_path="$new_path"
17378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17379$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17380  fi
17381
17382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17383
17384  path="$dxsdk_path"
17385  has_colon=`$ECHO $path | $GREP ^.:`
17386  new_path="$path"
17387  if test "x$has_colon" = x; then
17388    # Not in mixed or Windows style, start by that.
17389    new_path=`cmd //c echo $path`
17390  fi
17391
17392
17393  input_path="$new_path"
17394  # Check if we need to convert this using DOS-style short mode. If the path
17395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17396  # take no chances and rewrite it.
17397  # Note: m4 eats our [], so we need to use [ and ] instead.
17398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17399  if test "x$has_forbidden_chars" != x; then
17400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17402  fi
17403
17404
17405  windows_path="$new_path"
17406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17407    unix_path=`$CYGPATH -u "$windows_path"`
17408    new_path="$unix_path"
17409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17411    new_path="$unix_path"
17412  fi
17413
17414  if test "x$path" != "x$new_path"; then
17415    dxsdk_path="$new_path"
17416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17417$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17418  fi
17419
17420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17422
17423  else
17424    # We're on a posix platform. Hooray! :)
17425    path="$dxsdk_path"
17426    has_space=`$ECHO "$path" | $GREP " "`
17427    if test "x$has_space" != x; then
17428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17429$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17430      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17431    fi
17432
17433    # Use eval to expand a potential ~
17434    eval path="$path"
17435    if test ! -f "$path" && test ! -d "$path"; then
17436      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17437    fi
17438
17439    dxsdk_path="`cd "$path"; $THEPWDCMD -L`"
17440  fi
17441
17442
17443  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17444$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17445  if test "x$with_dxsdk_lib" != x; then
17446    DXSDK_LIB_PATH="$with_dxsdk_lib"
17447  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17448    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17449  else
17450    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17451  fi
17452  # dsound.lib is linked to in jsoundds
17453  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17454    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17455  fi
17456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17457$as_echo "$DXSDK_LIB_PATH" >&6; }
17458
17459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17460
17461  # Input might be given as Windows format, start by converting to
17462  # unix format.
17463  path="$DXSDK_LIB_PATH"
17464  new_path=`$CYGPATH -u "$path"`
17465
17466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17469  # "foo.exe" is OK but "foo" is an error.
17470  #
17471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17472  # It is also a way to make sure we got the proper file name for the real test later on.
17473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17474  if test "x$test_shortpath" = x; then
17475    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17476$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17477    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17478  fi
17479
17480  # Call helper function which possibly converts this using DOS-style short mode.
17481  # If so, the updated path is stored in $new_path.
17482
17483  input_path="$new_path"
17484  # Check if we need to convert this using DOS-style short mode. If the path
17485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17486  # take no chances and rewrite it.
17487  # Note: m4 eats our [], so we need to use [ and ] instead.
17488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17489  if test "x$has_forbidden_chars" != x; then
17490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17494      # Going to short mode and back again did indeed matter. Since short mode is
17495      # case insensitive, let's make it lowercase to improve readability.
17496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17497      # Now convert it back to Unix-stile (cygpath)
17498      input_path=`$CYGPATH -u "$shortmode_path"`
17499      new_path="$input_path"
17500    fi
17501  fi
17502
17503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17504  if test "x$test_cygdrive_prefix" = x; then
17505    # As a simple fix, exclude /usr/bin since it's not a real path.
17506    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17508      # a path prefixed by /cygdrive for fixpath to work.
17509      new_path="$CYGWIN_ROOT_PATH$input_path"
17510    fi
17511  fi
17512
17513
17514  if test "x$path" != "x$new_path"; then
17515    DXSDK_LIB_PATH="$new_path"
17516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17517$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17518  fi
17519
17520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17521
17522  path="$DXSDK_LIB_PATH"
17523  has_colon=`$ECHO $path | $GREP ^.:`
17524  new_path="$path"
17525  if test "x$has_colon" = x; then
17526    # Not in mixed or Windows style, start by that.
17527    new_path=`cmd //c echo $path`
17528  fi
17529
17530
17531  input_path="$new_path"
17532  # Check if we need to convert this using DOS-style short mode. If the path
17533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17534  # take no chances and rewrite it.
17535  # Note: m4 eats our [], so we need to use [ and ] instead.
17536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17537  if test "x$has_forbidden_chars" != x; then
17538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17540  fi
17541
17542
17543  windows_path="$new_path"
17544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17545    unix_path=`$CYGPATH -u "$windows_path"`
17546    new_path="$unix_path"
17547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17549    new_path="$unix_path"
17550  fi
17551
17552  if test "x$path" != "x$new_path"; then
17553    DXSDK_LIB_PATH="$new_path"
17554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17555$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17556  fi
17557
17558  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17559  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17560
17561  else
17562    # We're on a posix platform. Hooray! :)
17563    path="$DXSDK_LIB_PATH"
17564    has_space=`$ECHO "$path" | $GREP " "`
17565    if test "x$has_space" != x; then
17566      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17567$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17568      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17569    fi
17570
17571    # Use eval to expand a potential ~
17572    eval path="$path"
17573    if test ! -f "$path" && test ! -d "$path"; then
17574      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17575    fi
17576
17577    DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
17578  fi
17579
17580
17581  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17582$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17583  if test "x$with_dxsdk_include" != x; then
17584    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17585  else
17586    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17587  fi
17588  # dsound.h is included in jsoundds
17589  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17590    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17591  fi
17592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17593$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17594
17595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17596
17597  # Input might be given as Windows format, start by converting to
17598  # unix format.
17599  path="$DXSDK_INCLUDE_PATH"
17600  new_path=`$CYGPATH -u "$path"`
17601
17602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17605  # "foo.exe" is OK but "foo" is an error.
17606  #
17607  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17608  # It is also a way to make sure we got the proper file name for the real test later on.
17609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17610  if test "x$test_shortpath" = x; then
17611    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17612$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17613    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17614  fi
17615
17616  # Call helper function which possibly converts this using DOS-style short mode.
17617  # If so, the updated path is stored in $new_path.
17618
17619  input_path="$new_path"
17620  # Check if we need to convert this using DOS-style short mode. If the path
17621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17622  # take no chances and rewrite it.
17623  # Note: m4 eats our [], so we need to use [ and ] instead.
17624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17625  if test "x$has_forbidden_chars" != x; then
17626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17630      # Going to short mode and back again did indeed matter. Since short mode is
17631      # case insensitive, let's make it lowercase to improve readability.
17632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17633      # Now convert it back to Unix-stile (cygpath)
17634      input_path=`$CYGPATH -u "$shortmode_path"`
17635      new_path="$input_path"
17636    fi
17637  fi
17638
17639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17640  if test "x$test_cygdrive_prefix" = x; then
17641    # As a simple fix, exclude /usr/bin since it's not a real path.
17642    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17644      # a path prefixed by /cygdrive for fixpath to work.
17645      new_path="$CYGWIN_ROOT_PATH$input_path"
17646    fi
17647  fi
17648
17649
17650  if test "x$path" != "x$new_path"; then
17651    DXSDK_INCLUDE_PATH="$new_path"
17652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17653$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17654  fi
17655
17656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17657
17658  path="$DXSDK_INCLUDE_PATH"
17659  has_colon=`$ECHO $path | $GREP ^.:`
17660  new_path="$path"
17661  if test "x$has_colon" = x; then
17662    # Not in mixed or Windows style, start by that.
17663    new_path=`cmd //c echo $path`
17664  fi
17665
17666
17667  input_path="$new_path"
17668  # Check if we need to convert this using DOS-style short mode. If the path
17669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17670  # take no chances and rewrite it.
17671  # Note: m4 eats our [], so we need to use [ and ] instead.
17672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17673  if test "x$has_forbidden_chars" != x; then
17674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17676  fi
17677
17678
17679  windows_path="$new_path"
17680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17681    unix_path=`$CYGPATH -u "$windows_path"`
17682    new_path="$unix_path"
17683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17685    new_path="$unix_path"
17686  fi
17687
17688  if test "x$path" != "x$new_path"; then
17689    DXSDK_INCLUDE_PATH="$new_path"
17690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17691$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17692  fi
17693
17694  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17695  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17696
17697  else
17698    # We're on a posix platform. Hooray! :)
17699    path="$DXSDK_INCLUDE_PATH"
17700    has_space=`$ECHO "$path" | $GREP " "`
17701    if test "x$has_space" != x; then
17702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17703$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17704      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17705    fi
17706
17707    # Use eval to expand a potential ~
17708    eval path="$path"
17709    if test ! -f "$path" && test ! -d "$path"; then
17710      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17711    fi
17712
17713    DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
17714  fi
17715
17716
17717
17718
17719  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17720
17721fi
17722
17723
17724
17725# If --build AND --host is set, then the configure script will find any
17726# cross compilation tools in the PATH. Cross compilation tools
17727# follows the cross compilation standard where they are prefixed with ${host}.
17728# For example the binary i686-sun-solaris2.10-gcc
17729# will cross compile for i686-sun-solaris2.10
17730# If neither of build and host is not set, then build=host and the
17731# default compiler found in the path will be used.
17732# Setting only --host, does not seem to be really supported.
17733# Please set both --build and --host if you want to cross compile.
17734
17735if test "x$COMPILE_TYPE" = "xcross"; then
17736    # Now we to find a C/C++ compiler that can build executables for the build
17737    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17738    # once. Also, we need to do this before adding a tools dir to the path,
17739    # otherwise we might pick up cross-compilers which don't use standard naming.
17740    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17741    # to wait until they are properly discovered.
17742    for ac_prog in cl cc gcc
17743do
17744  # Extract the first word of "$ac_prog", so it can be a program name with args.
17745set dummy $ac_prog; ac_word=$2
17746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17747$as_echo_n "checking for $ac_word... " >&6; }
17748if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17749  $as_echo_n "(cached) " >&6
17750else
17751  case $BUILD_CC in
17752  [\\/]* | ?:[\\/]*)
17753  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17754  ;;
17755  *)
17756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17757for as_dir in $PATH
17758do
17759  IFS=$as_save_IFS
17760  test -z "$as_dir" && as_dir=.
17761    for ac_exec_ext in '' $ac_executable_extensions; do
17762  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17763    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17765    break 2
17766  fi
17767done
17768  done
17769IFS=$as_save_IFS
17770
17771  ;;
17772esac
17773fi
17774BUILD_CC=$ac_cv_path_BUILD_CC
17775if test -n "$BUILD_CC"; then
17776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17777$as_echo "$BUILD_CC" >&6; }
17778else
17779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17780$as_echo "no" >&6; }
17781fi
17782
17783
17784  test -n "$BUILD_CC" && break
17785done
17786
17787
17788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17789
17790  # First separate the path from the arguments. This will split at the first
17791  # space.
17792  complete="$BUILD_CC"
17793  path="${complete%% *}"
17794  tmp="$complete EOL"
17795  arguments="${tmp#* }"
17796
17797  # Input might be given as Windows format, start by converting to
17798  # unix format.
17799  new_path=`$CYGPATH -u "$path"`
17800
17801  # Now try to locate executable using which
17802  new_path=`$WHICH "$new_path" 2> /dev/null`
17803  # bat and cmd files are not always considered executable in cygwin causing which
17804  # to not find them
17805  if test "x$new_path" = x \
17806           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17807           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17808    new_path=`$CYGPATH -u "$path"`
17809  fi
17810  if test "x$new_path" = x; then
17811    # Oops. Which didn't find the executable.
17812    # The splitting of arguments from the executable at a space might have been incorrect,
17813    # since paths with space are more likely in Windows. Give it another try with the whole
17814    # argument.
17815    path="$complete"
17816    arguments="EOL"
17817    new_path=`$CYGPATH -u "$path"`
17818    new_path=`$WHICH "$new_path" 2> /dev/null`
17819    # bat and cmd files are not always considered executable in cygwin causing which
17820    # to not find them
17821    if test "x$new_path" = x \
17822             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17823             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17824      new_path=`$CYGPATH -u "$path"`
17825    fi
17826    if test "x$new_path" = x; then
17827      # It's still not found. Now this is an unrecoverable error.
17828      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17829$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17830      has_space=`$ECHO "$complete" | $GREP " "`
17831      if test "x$has_space" != x; then
17832        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17833$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17834      fi
17835      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17836    fi
17837  fi
17838
17839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17842  # "foo.exe" is OK but "foo" is an error.
17843  #
17844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17845  # It is also a way to make sure we got the proper file name for the real test later on.
17846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17847  if test "x$test_shortpath" = x; then
17848    # Short path failed, file does not exist as specified.
17849    # Try adding .exe or .cmd
17850    if test -f "${new_path}.exe"; then
17851       input_to_shortpath="${new_path}.exe"
17852    elif test -f "${new_path}.cmd"; then
17853       input_to_shortpath="${new_path}.cmd"
17854    else
17855      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17856$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17857      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17858$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17859      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17860    fi
17861  else
17862    input_to_shortpath="$new_path"
17863  fi
17864
17865  # Call helper function which possibly converts this using DOS-style short mode.
17866  # If so, the updated path is stored in $new_path.
17867  new_path="$input_to_shortpath"
17868
17869  input_path="$input_to_shortpath"
17870  # Check if we need to convert this using DOS-style short mode. If the path
17871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17872  # take no chances and rewrite it.
17873  # Note: m4 eats our [], so we need to use [ and ] instead.
17874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17875  if test "x$has_forbidden_chars" != x; then
17876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17880      # Going to short mode and back again did indeed matter. Since short mode is
17881      # case insensitive, let's make it lowercase to improve readability.
17882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17883      # Now convert it back to Unix-stile (cygpath)
17884      input_path=`$CYGPATH -u "$shortmode_path"`
17885      new_path="$input_path"
17886    fi
17887  fi
17888
17889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17890  if test "x$test_cygdrive_prefix" = x; then
17891    # As a simple fix, exclude /usr/bin since it's not a real path.
17892    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17894      # a path prefixed by /cygdrive for fixpath to work.
17895      new_path="$CYGWIN_ROOT_PATH$input_path"
17896    fi
17897  fi
17898
17899  # remove trailing .exe if any
17900  new_path="${new_path/%.exe/}"
17901
17902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17903
17904  # First separate the path from the arguments. This will split at the first
17905  # space.
17906  complete="$BUILD_CC"
17907  path="${complete%% *}"
17908  tmp="$complete EOL"
17909  arguments="${tmp#* }"
17910
17911  # Input might be given as Windows format, start by converting to
17912  # unix format.
17913  new_path="$path"
17914
17915  windows_path="$new_path"
17916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17917    unix_path=`$CYGPATH -u "$windows_path"`
17918    new_path="$unix_path"
17919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17921    new_path="$unix_path"
17922  fi
17923
17924
17925  # Now try to locate executable using which
17926  new_path=`$WHICH "$new_path" 2> /dev/null`
17927
17928  if test "x$new_path" = x; then
17929    # Oops. Which didn't find the executable.
17930    # The splitting of arguments from the executable at a space might have been incorrect,
17931    # since paths with space are more likely in Windows. Give it another try with the whole
17932    # argument.
17933    path="$complete"
17934    arguments="EOL"
17935    new_path="$path"
17936
17937  windows_path="$new_path"
17938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17939    unix_path=`$CYGPATH -u "$windows_path"`
17940    new_path="$unix_path"
17941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17943    new_path="$unix_path"
17944  fi
17945
17946
17947    new_path=`$WHICH "$new_path" 2> /dev/null`
17948
17949    if test "x$new_path" = x; then
17950      # It's still not found. Now this is an unrecoverable error.
17951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17952$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17953      has_space=`$ECHO "$complete" | $GREP " "`
17954      if test "x$has_space" != x; then
17955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17957      fi
17958      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17959    fi
17960  fi
17961
17962  # Now new_path has a complete unix path to the binary
17963  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17964    # Keep paths in /bin as-is, but remove trailing .exe if any
17965    new_path="${new_path/%.exe/}"
17966    # Do not save /bin paths to all_fixpath_prefixes!
17967  else
17968    # Not in mixed or Windows style, start by that.
17969    new_path=`cmd //c echo $new_path`
17970
17971  input_path="$new_path"
17972  # Check if we need to convert this using DOS-style short mode. If the path
17973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17974  # take no chances and rewrite it.
17975  # Note: m4 eats our [], so we need to use [ and ] instead.
17976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17977  if test "x$has_forbidden_chars" != x; then
17978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17980  fi
17981
17982    # Output is in $new_path
17983
17984  windows_path="$new_path"
17985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17986    unix_path=`$CYGPATH -u "$windows_path"`
17987    new_path="$unix_path"
17988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17990    new_path="$unix_path"
17991  fi
17992
17993    # remove trailing .exe if any
17994    new_path="${new_path/%.exe/}"
17995
17996    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17997    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17998  fi
17999
18000  else
18001    # We're on a posix platform. Hooray! :)
18002    # First separate the path from the arguments. This will split at the first
18003    # space.
18004    complete="$BUILD_CC"
18005    path="${complete%% *}"
18006    tmp="$complete EOL"
18007    arguments="${tmp#* }"
18008
18009    # Cannot rely on the command "which" here since it doesn't always work.
18010    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18011    if test -z "$is_absolute_path"; then
18012      # Path to executable is not absolute. Find it.
18013      IFS_save="$IFS"
18014      IFS=:
18015      for p in $PATH; do
18016        if test -f "$p/$path" && test -x "$p/$path"; then
18017          new_path="$p/$path"
18018          break
18019        fi
18020      done
18021      IFS="$IFS_save"
18022    else
18023      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18024$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18025      new_path="$path"
18026    fi
18027
18028    if test "x$new_path" = x; then
18029        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18030$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18031        has_space=`$ECHO "$complete" | $GREP " "`
18032        if test "x$has_space" != x; then
18033          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18034$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18035        fi
18036        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18037      fi
18038  fi
18039
18040      # Now join together the path and the arguments once again
18041      if test "x$arguments" != xEOL; then
18042        new_complete="$new_path ${arguments% *}"
18043      else
18044        new_complete="$new_path"
18045      fi
18046
18047  if test "x$complete" != "x$new_complete"; then
18048      BUILD_CC="$new_complete"
18049      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18050$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18051    fi
18052
18053    for ac_prog in cl CC g++
18054do
18055  # Extract the first word of "$ac_prog", so it can be a program name with args.
18056set dummy $ac_prog; ac_word=$2
18057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18058$as_echo_n "checking for $ac_word... " >&6; }
18059if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
18060  $as_echo_n "(cached) " >&6
18061else
18062  case $BUILD_CXX in
18063  [\\/]* | ?:[\\/]*)
18064  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18065  ;;
18066  *)
18067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18068for as_dir in $PATH
18069do
18070  IFS=$as_save_IFS
18071  test -z "$as_dir" && as_dir=.
18072    for ac_exec_ext in '' $ac_executable_extensions; do
18073  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18074    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18076    break 2
18077  fi
18078done
18079  done
18080IFS=$as_save_IFS
18081
18082  ;;
18083esac
18084fi
18085BUILD_CXX=$ac_cv_path_BUILD_CXX
18086if test -n "$BUILD_CXX"; then
18087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18088$as_echo "$BUILD_CXX" >&6; }
18089else
18090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18091$as_echo "no" >&6; }
18092fi
18093
18094
18095  test -n "$BUILD_CXX" && break
18096done
18097
18098
18099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18100
18101  # First separate the path from the arguments. This will split at the first
18102  # space.
18103  complete="$BUILD_CXX"
18104  path="${complete%% *}"
18105  tmp="$complete EOL"
18106  arguments="${tmp#* }"
18107
18108  # Input might be given as Windows format, start by converting to
18109  # unix format.
18110  new_path=`$CYGPATH -u "$path"`
18111
18112  # Now try to locate executable using which
18113  new_path=`$WHICH "$new_path" 2> /dev/null`
18114  # bat and cmd files are not always considered executable in cygwin causing which
18115  # to not find them
18116  if test "x$new_path" = x \
18117           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18118           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18119    new_path=`$CYGPATH -u "$path"`
18120  fi
18121  if test "x$new_path" = x; then
18122    # Oops. Which didn't find the executable.
18123    # The splitting of arguments from the executable at a space might have been incorrect,
18124    # since paths with space are more likely in Windows. Give it another try with the whole
18125    # argument.
18126    path="$complete"
18127    arguments="EOL"
18128    new_path=`$CYGPATH -u "$path"`
18129    new_path=`$WHICH "$new_path" 2> /dev/null`
18130    # bat and cmd files are not always considered executable in cygwin causing which
18131    # to not find them
18132    if test "x$new_path" = x \
18133             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18134             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18135      new_path=`$CYGPATH -u "$path"`
18136    fi
18137    if test "x$new_path" = x; then
18138      # It's still not found. Now this is an unrecoverable error.
18139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18140$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18141      has_space=`$ECHO "$complete" | $GREP " "`
18142      if test "x$has_space" != x; then
18143        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18144$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18145      fi
18146      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18147    fi
18148  fi
18149
18150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18153  # "foo.exe" is OK but "foo" is an error.
18154  #
18155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18156  # It is also a way to make sure we got the proper file name for the real test later on.
18157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18158  if test "x$test_shortpath" = x; then
18159    # Short path failed, file does not exist as specified.
18160    # Try adding .exe or .cmd
18161    if test -f "${new_path}.exe"; then
18162       input_to_shortpath="${new_path}.exe"
18163    elif test -f "${new_path}.cmd"; then
18164       input_to_shortpath="${new_path}.cmd"
18165    else
18166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18167$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18168      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18169$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18170      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18171    fi
18172  else
18173    input_to_shortpath="$new_path"
18174  fi
18175
18176  # Call helper function which possibly converts this using DOS-style short mode.
18177  # If so, the updated path is stored in $new_path.
18178  new_path="$input_to_shortpath"
18179
18180  input_path="$input_to_shortpath"
18181  # Check if we need to convert this using DOS-style short mode. If the path
18182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18183  # take no chances and rewrite it.
18184  # Note: m4 eats our [], so we need to use [ and ] instead.
18185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18186  if test "x$has_forbidden_chars" != x; then
18187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18191      # Going to short mode and back again did indeed matter. Since short mode is
18192      # case insensitive, let's make it lowercase to improve readability.
18193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18194      # Now convert it back to Unix-stile (cygpath)
18195      input_path=`$CYGPATH -u "$shortmode_path"`
18196      new_path="$input_path"
18197    fi
18198  fi
18199
18200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18201  if test "x$test_cygdrive_prefix" = x; then
18202    # As a simple fix, exclude /usr/bin since it's not a real path.
18203    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18205      # a path prefixed by /cygdrive for fixpath to work.
18206      new_path="$CYGWIN_ROOT_PATH$input_path"
18207    fi
18208  fi
18209
18210  # remove trailing .exe if any
18211  new_path="${new_path/%.exe/}"
18212
18213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18214
18215  # First separate the path from the arguments. This will split at the first
18216  # space.
18217  complete="$BUILD_CXX"
18218  path="${complete%% *}"
18219  tmp="$complete EOL"
18220  arguments="${tmp#* }"
18221
18222  # Input might be given as Windows format, start by converting to
18223  # unix format.
18224  new_path="$path"
18225
18226  windows_path="$new_path"
18227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18228    unix_path=`$CYGPATH -u "$windows_path"`
18229    new_path="$unix_path"
18230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18232    new_path="$unix_path"
18233  fi
18234
18235
18236  # Now try to locate executable using which
18237  new_path=`$WHICH "$new_path" 2> /dev/null`
18238
18239  if test "x$new_path" = x; then
18240    # Oops. Which didn't find the executable.
18241    # The splitting of arguments from the executable at a space might have been incorrect,
18242    # since paths with space are more likely in Windows. Give it another try with the whole
18243    # argument.
18244    path="$complete"
18245    arguments="EOL"
18246    new_path="$path"
18247
18248  windows_path="$new_path"
18249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18250    unix_path=`$CYGPATH -u "$windows_path"`
18251    new_path="$unix_path"
18252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18254    new_path="$unix_path"
18255  fi
18256
18257
18258    new_path=`$WHICH "$new_path" 2> /dev/null`
18259
18260    if test "x$new_path" = x; then
18261      # It's still not found. Now this is an unrecoverable error.
18262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18263$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18264      has_space=`$ECHO "$complete" | $GREP " "`
18265      if test "x$has_space" != x; then
18266        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18267$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18268      fi
18269      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18270    fi
18271  fi
18272
18273  # Now new_path has a complete unix path to the binary
18274  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18275    # Keep paths in /bin as-is, but remove trailing .exe if any
18276    new_path="${new_path/%.exe/}"
18277    # Do not save /bin paths to all_fixpath_prefixes!
18278  else
18279    # Not in mixed or Windows style, start by that.
18280    new_path=`cmd //c echo $new_path`
18281
18282  input_path="$new_path"
18283  # Check if we need to convert this using DOS-style short mode. If the path
18284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18285  # take no chances and rewrite it.
18286  # Note: m4 eats our [], so we need to use [ and ] instead.
18287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18288  if test "x$has_forbidden_chars" != x; then
18289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18291  fi
18292
18293    # Output is in $new_path
18294
18295  windows_path="$new_path"
18296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18297    unix_path=`$CYGPATH -u "$windows_path"`
18298    new_path="$unix_path"
18299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18301    new_path="$unix_path"
18302  fi
18303
18304    # remove trailing .exe if any
18305    new_path="${new_path/%.exe/}"
18306
18307    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18308    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18309  fi
18310
18311  else
18312    # We're on a posix platform. Hooray! :)
18313    # First separate the path from the arguments. This will split at the first
18314    # space.
18315    complete="$BUILD_CXX"
18316    path="${complete%% *}"
18317    tmp="$complete EOL"
18318    arguments="${tmp#* }"
18319
18320    # Cannot rely on the command "which" here since it doesn't always work.
18321    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18322    if test -z "$is_absolute_path"; then
18323      # Path to executable is not absolute. Find it.
18324      IFS_save="$IFS"
18325      IFS=:
18326      for p in $PATH; do
18327        if test -f "$p/$path" && test -x "$p/$path"; then
18328          new_path="$p/$path"
18329          break
18330        fi
18331      done
18332      IFS="$IFS_save"
18333    else
18334      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18335$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18336      new_path="$path"
18337    fi
18338
18339    if test "x$new_path" = x; then
18340        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18341$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18342        has_space=`$ECHO "$complete" | $GREP " "`
18343        if test "x$has_space" != x; then
18344          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18345$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18346        fi
18347        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18348      fi
18349  fi
18350
18351      # Now join together the path and the arguments once again
18352      if test "x$arguments" != xEOL; then
18353        new_complete="$new_path ${arguments% *}"
18354      else
18355        new_complete="$new_path"
18356      fi
18357
18358  if test "x$complete" != "x$new_complete"; then
18359      BUILD_CXX="$new_complete"
18360      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18361$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18362    fi
18363
18364    # Extract the first word of "ld", so it can be a program name with args.
18365set dummy ld; ac_word=$2
18366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18367$as_echo_n "checking for $ac_word... " >&6; }
18368if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18369  $as_echo_n "(cached) " >&6
18370else
18371  case $BUILD_LD in
18372  [\\/]* | ?:[\\/]*)
18373  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18374  ;;
18375  *)
18376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18377for as_dir in $PATH
18378do
18379  IFS=$as_save_IFS
18380  test -z "$as_dir" && as_dir=.
18381    for ac_exec_ext in '' $ac_executable_extensions; do
18382  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18383    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18385    break 2
18386  fi
18387done
18388  done
18389IFS=$as_save_IFS
18390
18391  ;;
18392esac
18393fi
18394BUILD_LD=$ac_cv_path_BUILD_LD
18395if test -n "$BUILD_LD"; then
18396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18397$as_echo "$BUILD_LD" >&6; }
18398else
18399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18400$as_echo "no" >&6; }
18401fi
18402
18403
18404
18405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18406
18407  # First separate the path from the arguments. This will split at the first
18408  # space.
18409  complete="$BUILD_LD"
18410  path="${complete%% *}"
18411  tmp="$complete EOL"
18412  arguments="${tmp#* }"
18413
18414  # Input might be given as Windows format, start by converting to
18415  # unix format.
18416  new_path=`$CYGPATH -u "$path"`
18417
18418  # Now try to locate executable using which
18419  new_path=`$WHICH "$new_path" 2> /dev/null`
18420  # bat and cmd files are not always considered executable in cygwin causing which
18421  # to not find them
18422  if test "x$new_path" = x \
18423           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18424           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18425    new_path=`$CYGPATH -u "$path"`
18426  fi
18427  if test "x$new_path" = x; then
18428    # Oops. Which didn't find the executable.
18429    # The splitting of arguments from the executable at a space might have been incorrect,
18430    # since paths with space are more likely in Windows. Give it another try with the whole
18431    # argument.
18432    path="$complete"
18433    arguments="EOL"
18434    new_path=`$CYGPATH -u "$path"`
18435    new_path=`$WHICH "$new_path" 2> /dev/null`
18436    # bat and cmd files are not always considered executable in cygwin causing which
18437    # to not find them
18438    if test "x$new_path" = x \
18439             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18440             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18441      new_path=`$CYGPATH -u "$path"`
18442    fi
18443    if test "x$new_path" = x; then
18444      # It's still not found. Now this is an unrecoverable error.
18445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18446$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18447      has_space=`$ECHO "$complete" | $GREP " "`
18448      if test "x$has_space" != x; then
18449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18451      fi
18452      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18453    fi
18454  fi
18455
18456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18459  # "foo.exe" is OK but "foo" is an error.
18460  #
18461  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18462  # It is also a way to make sure we got the proper file name for the real test later on.
18463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18464  if test "x$test_shortpath" = x; then
18465    # Short path failed, file does not exist as specified.
18466    # Try adding .exe or .cmd
18467    if test -f "${new_path}.exe"; then
18468       input_to_shortpath="${new_path}.exe"
18469    elif test -f "${new_path}.cmd"; then
18470       input_to_shortpath="${new_path}.cmd"
18471    else
18472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18473$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18474      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18475$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18476      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18477    fi
18478  else
18479    input_to_shortpath="$new_path"
18480  fi
18481
18482  # Call helper function which possibly converts this using DOS-style short mode.
18483  # If so, the updated path is stored in $new_path.
18484  new_path="$input_to_shortpath"
18485
18486  input_path="$input_to_shortpath"
18487  # Check if we need to convert this using DOS-style short mode. If the path
18488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18489  # take no chances and rewrite it.
18490  # Note: m4 eats our [], so we need to use [ and ] instead.
18491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18492  if test "x$has_forbidden_chars" != x; then
18493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18497      # Going to short mode and back again did indeed matter. Since short mode is
18498      # case insensitive, let's make it lowercase to improve readability.
18499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18500      # Now convert it back to Unix-stile (cygpath)
18501      input_path=`$CYGPATH -u "$shortmode_path"`
18502      new_path="$input_path"
18503    fi
18504  fi
18505
18506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18507  if test "x$test_cygdrive_prefix" = x; then
18508    # As a simple fix, exclude /usr/bin since it's not a real path.
18509    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18511      # a path prefixed by /cygdrive for fixpath to work.
18512      new_path="$CYGWIN_ROOT_PATH$input_path"
18513    fi
18514  fi
18515
18516  # remove trailing .exe if any
18517  new_path="${new_path/%.exe/}"
18518
18519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18520
18521  # First separate the path from the arguments. This will split at the first
18522  # space.
18523  complete="$BUILD_LD"
18524  path="${complete%% *}"
18525  tmp="$complete EOL"
18526  arguments="${tmp#* }"
18527
18528  # Input might be given as Windows format, start by converting to
18529  # unix format.
18530  new_path="$path"
18531
18532  windows_path="$new_path"
18533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18534    unix_path=`$CYGPATH -u "$windows_path"`
18535    new_path="$unix_path"
18536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18538    new_path="$unix_path"
18539  fi
18540
18541
18542  # Now try to locate executable using which
18543  new_path=`$WHICH "$new_path" 2> /dev/null`
18544
18545  if test "x$new_path" = x; then
18546    # Oops. Which didn't find the executable.
18547    # The splitting of arguments from the executable at a space might have been incorrect,
18548    # since paths with space are more likely in Windows. Give it another try with the whole
18549    # argument.
18550    path="$complete"
18551    arguments="EOL"
18552    new_path="$path"
18553
18554  windows_path="$new_path"
18555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18556    unix_path=`$CYGPATH -u "$windows_path"`
18557    new_path="$unix_path"
18558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18560    new_path="$unix_path"
18561  fi
18562
18563
18564    new_path=`$WHICH "$new_path" 2> /dev/null`
18565
18566    if test "x$new_path" = x; then
18567      # It's still not found. Now this is an unrecoverable error.
18568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18569$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18570      has_space=`$ECHO "$complete" | $GREP " "`
18571      if test "x$has_space" != x; then
18572        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18573$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18574      fi
18575      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18576    fi
18577  fi
18578
18579  # Now new_path has a complete unix path to the binary
18580  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18581    # Keep paths in /bin as-is, but remove trailing .exe if any
18582    new_path="${new_path/%.exe/}"
18583    # Do not save /bin paths to all_fixpath_prefixes!
18584  else
18585    # Not in mixed or Windows style, start by that.
18586    new_path=`cmd //c echo $new_path`
18587
18588  input_path="$new_path"
18589  # Check if we need to convert this using DOS-style short mode. If the path
18590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18591  # take no chances and rewrite it.
18592  # Note: m4 eats our [], so we need to use [ and ] instead.
18593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18594  if test "x$has_forbidden_chars" != x; then
18595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18596    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18597  fi
18598
18599    # Output is in $new_path
18600
18601  windows_path="$new_path"
18602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18603    unix_path=`$CYGPATH -u "$windows_path"`
18604    new_path="$unix_path"
18605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18607    new_path="$unix_path"
18608  fi
18609
18610    # remove trailing .exe if any
18611    new_path="${new_path/%.exe/}"
18612
18613    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18614    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18615  fi
18616
18617  else
18618    # We're on a posix platform. Hooray! :)
18619    # First separate the path from the arguments. This will split at the first
18620    # space.
18621    complete="$BUILD_LD"
18622    path="${complete%% *}"
18623    tmp="$complete EOL"
18624    arguments="${tmp#* }"
18625
18626    # Cannot rely on the command "which" here since it doesn't always work.
18627    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18628    if test -z "$is_absolute_path"; then
18629      # Path to executable is not absolute. Find it.
18630      IFS_save="$IFS"
18631      IFS=:
18632      for p in $PATH; do
18633        if test -f "$p/$path" && test -x "$p/$path"; then
18634          new_path="$p/$path"
18635          break
18636        fi
18637      done
18638      IFS="$IFS_save"
18639    else
18640      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18641$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18642      new_path="$path"
18643    fi
18644
18645    if test "x$new_path" = x; then
18646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18647$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18648        has_space=`$ECHO "$complete" | $GREP " "`
18649        if test "x$has_space" != x; then
18650          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18651$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18652        fi
18653        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18654      fi
18655  fi
18656
18657      # Now join together the path and the arguments once again
18658      if test "x$arguments" != xEOL; then
18659        new_complete="$new_path ${arguments% *}"
18660      else
18661        new_complete="$new_path"
18662      fi
18663
18664  if test "x$complete" != "x$new_complete"; then
18665      BUILD_LD="$new_complete"
18666      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18667$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18668    fi
18669
18670fi
18671
18672
18673
18674
18675# If a devkit is found on the builddeps server, then prepend its path to the
18676# PATH variable. If there are cross compilers available in the devkit, these
18677# will be found by AC_PROG_CC et al.
18678DEVKIT=
18679
18680
18681    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18682        # Source the builddeps file again, to make sure it uses the latest variables!
18683        . $builddepsfile
18684        # Look for a target and build machine specific resource!
18685        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18686        if test "x$resource" = x; then
18687            # Ok, lets instead look for a target specific resource
18688            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18689        fi
18690        if test "x$resource" = x; then
18691            # Ok, lets instead look for a build specific resource
18692            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18693        fi
18694        if test "x$resource" = x; then
18695            # Ok, lets instead look for a generic resource
18696            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18697            resource=${builddep_devkit}
18698        fi
18699        if test "x$resource" != x; then
18700            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18701$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18702	    # If the resource in the builddeps.conf file is an existing directory,
18703	    # for example /java/linux/cups
18704	    if test -d ${resource}; then
18705	       depdir=${resource}
18706	    else
18707
18708# devkit is for example mymodule
18709# $resource is for example libs/general/libmymod_1_2_3.zip
18710# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18711# $with_builddeps_dir is for example /localhome/builddeps
18712# depdir is the name of the variable into which we store the depdir, eg MYMOD
18713# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18714# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18715    filename=`basename $resource`
18716    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18717    filebase=${filename%%.*}
18718    extension=${filename#*.}
18719    installdir=$with_builddeps_dir/$filebase
18720    if test ! -f $installdir/$filename.unpacked; then
18721        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18722$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18723        if test ! -d $installdir; then
18724            mkdir -p $installdir
18725        fi
18726        if test ! -d $installdir; then
18727            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18728        fi
18729        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18730        touch $tmpfile
18731        if test ! -f $tmpfile; then
18732            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18733        fi
18734
18735    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18736    # $tmpfile is the local file name for the downloaded file.
18737    VALID_TOOL=no
18738    if test "x$BDEPS_FTP" = xwget; then
18739       VALID_TOOL=yes
18740       wget -O $tmpfile $with_builddeps_server/$resource
18741    fi
18742    if test "x$BDEPS_FTP" = xlftp; then
18743       VALID_TOOL=yes
18744       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18745    fi
18746    if test "x$BDEPS_FTP" = xftp; then
18747        VALID_TOOL=yes
18748        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18749        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18750        FTPUSERPWD=${FTPSERVER%%@*}
18751        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18752            FTPUSER=${userpwd%%:*}
18753            FTPPWD=${userpwd#*@}
18754            FTPSERVER=${FTPSERVER#*@}
18755        else
18756            FTPUSER=ftp
18757            FTPPWD=ftp
18758        fi
18759        # the "pass" command does not work on some
18760        # ftp clients (read ftp.exe) but if it works,
18761        # passive mode is better!
18762        (\
18763            echo "user $FTPUSER $FTPPWD"        ;\
18764            echo "pass"                         ;\
18765            echo "bin"                          ;\
18766            echo "get $FTPPATH $tmpfile"              ;\
18767        ) | ftp -in $FTPSERVER
18768    fi
18769    if test "x$VALID_TOOL" != xyes; then
18770       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18771    fi
18772
18773        mv $tmpfile $installdir/$filename
18774        if test ! -s $installdir/$filename; then
18775            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18776        fi
18777        case "$extension" in
18778            zip)  echo "Unzipping $installdir/$filename..."
18779               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18780            ;;
18781            tar.gz) echo "Untaring $installdir/$filename..."
18782               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18783            ;;
18784            tgz) echo "Untaring $installdir/$filename..."
18785               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18786            ;;
18787            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18788            ;;
18789        esac
18790    fi
18791    if test -f $installdir/$filename.unpacked; then
18792        depdir=$installdir
18793    fi
18794
18795	    fi
18796            # Source the builddeps file again, because in the previous command, the depdir
18797            # was updated to point at the current build dependency install directory.
18798            . $builddepsfile
18799            # Now extract variables from the builddeps.conf files.
18800            theroot=${builddep_devkit_ROOT}
18801            thecflags=${builddep_devkit_CFLAGS}
18802            thelibs=${builddep_devkit_LIBS}
18803            if test "x$depdir" = x; then
18804                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18805            fi
18806            DEVKIT=$depdir
18807            if test "x$theroot" != x; then
18808               DEVKIT="$theroot"
18809            fi
18810            if test "x$thecflags" != x; then
18811               DEVKIT_CFLAGS="$thecflags"
18812            fi
18813            if test "x$thelibs" != x; then
18814               DEVKIT_LIBS="$thelibs"
18815            fi
18816            # Found devkit
18817                     PATH="$DEVKIT/bin:$PATH"
18818                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18819                     if test "x$x_includes" = "xNONE"; then
18820                         x_includes="$SYS_ROOT/usr/include/X11"
18821                     fi
18822                     if test "x$x_libraries" = "xNONE"; then
18823                         x_libraries="$SYS_ROOT/usr/lib"
18824                     fi
18825
18826
18827        fi
18828
18829    fi
18830
18831
18832if test "x$SYS_ROOT" != "x/" ; then
18833    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18834    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18835    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18836    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18837    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18838    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18839fi
18840
18841# Store the CFLAGS etal passed to the configure script.
18842ORG_CFLAGS="$CFLAGS"
18843ORG_CXXFLAGS="$CXXFLAGS"
18844ORG_OBJCFLAGS="$OBJCFLAGS"
18845
18846# autoconf magic only relies on PATH, so update it if tools dir is specified
18847OLD_PATH="$PATH"
18848if test "x$TOOLS_DIR" != x; then
18849  PATH=$TOOLS_DIR:$PATH
18850fi
18851
18852
18853### Locate C compiler (CC)
18854
18855# On windows, only cl.exe is supported.
18856# On Solaris, cc is preferred to gcc.
18857# Elsewhere, gcc is preferred to cc.
18858
18859if test "x$CC" != x; then
18860  COMPILER_CHECK_LIST="$CC"
18861elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18862  COMPILER_CHECK_LIST="cl"
18863elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18864  COMPILER_CHECK_LIST="cc gcc"
18865else
18866  COMPILER_CHECK_LIST="gcc cc"
18867fi
18868
18869
18870  COMPILER_NAME=C
18871
18872  CC=
18873  # If TOOLS_DIR is set, check for all compiler names in there first
18874  # before checking the rest of the PATH.
18875  if test -n "$TOOLS_DIR"; then
18876    PATH_save="$PATH"
18877    PATH="$TOOLS_DIR"
18878    for ac_prog in $COMPILER_CHECK_LIST
18879do
18880  # Extract the first word of "$ac_prog", so it can be a program name with args.
18881set dummy $ac_prog; ac_word=$2
18882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18883$as_echo_n "checking for $ac_word... " >&6; }
18884if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18885  $as_echo_n "(cached) " >&6
18886else
18887  case $TOOLS_DIR_CC in
18888  [\\/]* | ?:[\\/]*)
18889  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18890  ;;
18891  *)
18892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18893for as_dir in $PATH
18894do
18895  IFS=$as_save_IFS
18896  test -z "$as_dir" && as_dir=.
18897    for ac_exec_ext in '' $ac_executable_extensions; do
18898  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18899    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18901    break 2
18902  fi
18903done
18904  done
18905IFS=$as_save_IFS
18906
18907  ;;
18908esac
18909fi
18910TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18911if test -n "$TOOLS_DIR_CC"; then
18912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18913$as_echo "$TOOLS_DIR_CC" >&6; }
18914else
18915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18916$as_echo "no" >&6; }
18917fi
18918
18919
18920  test -n "$TOOLS_DIR_CC" && break
18921done
18922
18923    CC=$TOOLS_DIR_CC
18924    PATH="$PATH_save"
18925  fi
18926
18927  # AC_PATH_PROGS can't be run multiple times with the same variable,
18928  # so create a new name for this run.
18929  if test "x$CC" = x; then
18930    for ac_prog in $COMPILER_CHECK_LIST
18931do
18932  # Extract the first word of "$ac_prog", so it can be a program name with args.
18933set dummy $ac_prog; ac_word=$2
18934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18935$as_echo_n "checking for $ac_word... " >&6; }
18936if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18937  $as_echo_n "(cached) " >&6
18938else
18939  case $POTENTIAL_CC in
18940  [\\/]* | ?:[\\/]*)
18941  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18942  ;;
18943  *)
18944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18945for as_dir in $PATH
18946do
18947  IFS=$as_save_IFS
18948  test -z "$as_dir" && as_dir=.
18949    for ac_exec_ext in '' $ac_executable_extensions; do
18950  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18951    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18953    break 2
18954  fi
18955done
18956  done
18957IFS=$as_save_IFS
18958
18959  ;;
18960esac
18961fi
18962POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18963if test -n "$POTENTIAL_CC"; then
18964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18965$as_echo "$POTENTIAL_CC" >&6; }
18966else
18967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18968$as_echo "no" >&6; }
18969fi
18970
18971
18972  test -n "$POTENTIAL_CC" && break
18973done
18974
18975    CC=$POTENTIAL_CC
18976  fi
18977
18978  if test "x$CC" = x; then
18979
18980    # Print a helpful message on how to acquire the necessary build dependency.
18981    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18982    MISSING_DEPENDENCY=devkit
18983    PKGHANDLER_COMMAND=
18984
18985    case $PKGHANDLER in
18986	apt-get)
18987                apt_help     $MISSING_DEPENDENCY ;;
18988    yum)
18989                yum_help     $MISSING_DEPENDENCY ;;
18990	port)
18991                port_help    $MISSING_DEPENDENCY ;;
18992	pkgutil)
18993                pkgutil_help $MISSING_DEPENDENCY ;;
18994	pkgadd)
18995                pkgadd_help  $MISSING_DEPENDENCY ;;
18996    * )
18997      break ;;
18998    esac
18999
19000    if test "x$PKGHANDLER_COMMAND" != x; then
19001        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19002    fi
19003
19004      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19005  fi
19006
19007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19008
19009  # First separate the path from the arguments. This will split at the first
19010  # space.
19011  complete="$CC"
19012  path="${complete%% *}"
19013  tmp="$complete EOL"
19014  arguments="${tmp#* }"
19015
19016  # Input might be given as Windows format, start by converting to
19017  # unix format.
19018  new_path=`$CYGPATH -u "$path"`
19019
19020  # Now try to locate executable using which
19021  new_path=`$WHICH "$new_path" 2> /dev/null`
19022  # bat and cmd files are not always considered executable in cygwin causing which
19023  # to not find them
19024  if test "x$new_path" = x \
19025           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19026           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19027    new_path=`$CYGPATH -u "$path"`
19028  fi
19029  if test "x$new_path" = x; then
19030    # Oops. Which didn't find the executable.
19031    # The splitting of arguments from the executable at a space might have been incorrect,
19032    # since paths with space are more likely in Windows. Give it another try with the whole
19033    # argument.
19034    path="$complete"
19035    arguments="EOL"
19036    new_path=`$CYGPATH -u "$path"`
19037    new_path=`$WHICH "$new_path" 2> /dev/null`
19038    # bat and cmd files are not always considered executable in cygwin causing which
19039    # to not find them
19040    if test "x$new_path" = x \
19041             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19042             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19043      new_path=`$CYGPATH -u "$path"`
19044    fi
19045    if test "x$new_path" = x; then
19046      # It's still not found. Now this is an unrecoverable error.
19047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19048$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19049      has_space=`$ECHO "$complete" | $GREP " "`
19050      if test "x$has_space" != x; then
19051        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19052$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19053      fi
19054      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19055    fi
19056  fi
19057
19058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19061  # "foo.exe" is OK but "foo" is an error.
19062  #
19063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19064  # It is also a way to make sure we got the proper file name for the real test later on.
19065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19066  if test "x$test_shortpath" = x; then
19067    # Short path failed, file does not exist as specified.
19068    # Try adding .exe or .cmd
19069    if test -f "${new_path}.exe"; then
19070       input_to_shortpath="${new_path}.exe"
19071    elif test -f "${new_path}.cmd"; then
19072       input_to_shortpath="${new_path}.cmd"
19073    else
19074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19075$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19076      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19077$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19078      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19079    fi
19080  else
19081    input_to_shortpath="$new_path"
19082  fi
19083
19084  # Call helper function which possibly converts this using DOS-style short mode.
19085  # If so, the updated path is stored in $new_path.
19086  new_path="$input_to_shortpath"
19087
19088  input_path="$input_to_shortpath"
19089  # Check if we need to convert this using DOS-style short mode. If the path
19090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19091  # take no chances and rewrite it.
19092  # Note: m4 eats our [], so we need to use [ and ] instead.
19093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19094  if test "x$has_forbidden_chars" != x; then
19095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19099      # Going to short mode and back again did indeed matter. Since short mode is
19100      # case insensitive, let's make it lowercase to improve readability.
19101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19102      # Now convert it back to Unix-stile (cygpath)
19103      input_path=`$CYGPATH -u "$shortmode_path"`
19104      new_path="$input_path"
19105    fi
19106  fi
19107
19108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19109  if test "x$test_cygdrive_prefix" = x; then
19110    # As a simple fix, exclude /usr/bin since it's not a real path.
19111    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19113      # a path prefixed by /cygdrive for fixpath to work.
19114      new_path="$CYGWIN_ROOT_PATH$input_path"
19115    fi
19116  fi
19117
19118  # remove trailing .exe if any
19119  new_path="${new_path/%.exe/}"
19120
19121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19122
19123  # First separate the path from the arguments. This will split at the first
19124  # space.
19125  complete="$CC"
19126  path="${complete%% *}"
19127  tmp="$complete EOL"
19128  arguments="${tmp#* }"
19129
19130  # Input might be given as Windows format, start by converting to
19131  # unix format.
19132  new_path="$path"
19133
19134  windows_path="$new_path"
19135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19136    unix_path=`$CYGPATH -u "$windows_path"`
19137    new_path="$unix_path"
19138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19140    new_path="$unix_path"
19141  fi
19142
19143
19144  # Now try to locate executable using which
19145  new_path=`$WHICH "$new_path" 2> /dev/null`
19146
19147  if test "x$new_path" = x; then
19148    # Oops. Which didn't find the executable.
19149    # The splitting of arguments from the executable at a space might have been incorrect,
19150    # since paths with space are more likely in Windows. Give it another try with the whole
19151    # argument.
19152    path="$complete"
19153    arguments="EOL"
19154    new_path="$path"
19155
19156  windows_path="$new_path"
19157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19158    unix_path=`$CYGPATH -u "$windows_path"`
19159    new_path="$unix_path"
19160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19162    new_path="$unix_path"
19163  fi
19164
19165
19166    new_path=`$WHICH "$new_path" 2> /dev/null`
19167
19168    if test "x$new_path" = x; then
19169      # It's still not found. Now this is an unrecoverable error.
19170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19171$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19172      has_space=`$ECHO "$complete" | $GREP " "`
19173      if test "x$has_space" != x; then
19174        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19175$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19176      fi
19177      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19178    fi
19179  fi
19180
19181  # Now new_path has a complete unix path to the binary
19182  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19183    # Keep paths in /bin as-is, but remove trailing .exe if any
19184    new_path="${new_path/%.exe/}"
19185    # Do not save /bin paths to all_fixpath_prefixes!
19186  else
19187    # Not in mixed or Windows style, start by that.
19188    new_path=`cmd //c echo $new_path`
19189
19190  input_path="$new_path"
19191  # Check if we need to convert this using DOS-style short mode. If the path
19192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19193  # take no chances and rewrite it.
19194  # Note: m4 eats our [], so we need to use [ and ] instead.
19195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19196  if test "x$has_forbidden_chars" != x; then
19197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19199  fi
19200
19201    # Output is in $new_path
19202
19203  windows_path="$new_path"
19204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19205    unix_path=`$CYGPATH -u "$windows_path"`
19206    new_path="$unix_path"
19207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19209    new_path="$unix_path"
19210  fi
19211
19212    # remove trailing .exe if any
19213    new_path="${new_path/%.exe/}"
19214
19215    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19216    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19217  fi
19218
19219  else
19220    # We're on a posix platform. Hooray! :)
19221    # First separate the path from the arguments. This will split at the first
19222    # space.
19223    complete="$CC"
19224    path="${complete%% *}"
19225    tmp="$complete EOL"
19226    arguments="${tmp#* }"
19227
19228    # Cannot rely on the command "which" here since it doesn't always work.
19229    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19230    if test -z "$is_absolute_path"; then
19231      # Path to executable is not absolute. Find it.
19232      IFS_save="$IFS"
19233      IFS=:
19234      for p in $PATH; do
19235        if test -f "$p/$path" && test -x "$p/$path"; then
19236          new_path="$p/$path"
19237          break
19238        fi
19239      done
19240      IFS="$IFS_save"
19241    else
19242      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19243$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19244      new_path="$path"
19245    fi
19246
19247    if test "x$new_path" = x; then
19248        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19249$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19250        has_space=`$ECHO "$complete" | $GREP " "`
19251        if test "x$has_space" != x; then
19252          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19253$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19254        fi
19255        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19256      fi
19257  fi
19258
19259      # Now join together the path and the arguments once again
19260      if test "x$arguments" != xEOL; then
19261        new_complete="$new_path ${arguments% *}"
19262      else
19263        new_complete="$new_path"
19264      fi
19265
19266  if test "x$complete" != "x$new_complete"; then
19267      CC="$new_complete"
19268      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19269$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19270    fi
19271
19272  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19273$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19274  TEST_COMPILER="$CC"
19275
19276    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19277        # Follow a chain of symbolic links. Use readlink
19278        # where it exists, else fall back to horribly
19279        # complicated shell code.
19280        if test "x$READLINK_TESTED" != yes; then
19281            # On MacOSX there is a readlink tool with a different
19282            # purpose than the GNU readlink tool. Check the found readlink.
19283            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19284            if test "x$ISGNU" = x; then
19285                 # A readlink that we do not know how to use.
19286                 # Are there other non-GNU readlinks out there?
19287                 READLINK_TESTED=yes
19288                 READLINK=
19289            fi
19290        fi
19291
19292        if test "x$READLINK" != x; then
19293            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19294        else
19295            # Save the current directory for restoring afterwards
19296            STARTDIR=$PWD
19297            COUNTER=0
19298            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19299            sym_link_file=`$BASENAME $TEST_COMPILER`
19300            cd $sym_link_dir
19301            # Use -P flag to resolve symlinks in directories.
19302            cd `$THEPWDCMD -P`
19303            sym_link_dir=`$THEPWDCMD -P`
19304            # Resolve file symlinks
19305            while test $COUNTER -lt 20; do
19306                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19307                if test "x$ISLINK" == x; then
19308                    # This is not a symbolic link! We are done!
19309                    break
19310                fi
19311                # Again resolve directory symlinks since the target of the just found
19312                # link could be in a different directory
19313                cd `$DIRNAME $ISLINK`
19314                sym_link_dir=`$THEPWDCMD -P`
19315                sym_link_file=`$BASENAME $ISLINK`
19316                let COUNTER=COUNTER+1
19317            done
19318            cd $STARTDIR
19319            TEST_COMPILER=$sym_link_dir/$sym_link_file
19320        fi
19321    fi
19322
19323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19324$as_echo "$TEST_COMPILER" >&6; }
19325  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19326$as_echo_n "checking if CC is disguised ccache... " >&6; }
19327
19328  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19329  if test "x$COMPILER_BASENAME" = "xccache"; then
19330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19331$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19332    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19333    # We want to control ccache invocation ourselves, so ignore this cc and try
19334    # searching again.
19335
19336    # Remove the path to the fake ccache cc from the PATH
19337    RETRY_COMPILER_SAVED_PATH="$PATH"
19338    COMPILER_DIRNAME=`$DIRNAME $CC`
19339    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19340
19341    # Try again looking for our compiler
19342    if test -n "$ac_tool_prefix"; then
19343  for ac_prog in $COMPILER_CHECK_LIST
19344  do
19345    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19346set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19348$as_echo_n "checking for $ac_word... " >&6; }
19349if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19350  $as_echo_n "(cached) " >&6
19351else
19352  if test -n "$PROPER_COMPILER_CC"; then
19353  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19354else
19355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19356for as_dir in $PATH
19357do
19358  IFS=$as_save_IFS
19359  test -z "$as_dir" && as_dir=.
19360    for ac_exec_ext in '' $ac_executable_extensions; do
19361  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19362    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19364    break 2
19365  fi
19366done
19367  done
19368IFS=$as_save_IFS
19369
19370fi
19371fi
19372PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19373if test -n "$PROPER_COMPILER_CC"; then
19374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19375$as_echo "$PROPER_COMPILER_CC" >&6; }
19376else
19377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19378$as_echo "no" >&6; }
19379fi
19380
19381
19382    test -n "$PROPER_COMPILER_CC" && break
19383  done
19384fi
19385if test -z "$PROPER_COMPILER_CC"; then
19386  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19387  for ac_prog in $COMPILER_CHECK_LIST
19388do
19389  # Extract the first word of "$ac_prog", so it can be a program name with args.
19390set dummy $ac_prog; ac_word=$2
19391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19392$as_echo_n "checking for $ac_word... " >&6; }
19393if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19394  $as_echo_n "(cached) " >&6
19395else
19396  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19397  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19398else
19399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19400for as_dir in $PATH
19401do
19402  IFS=$as_save_IFS
19403  test -z "$as_dir" && as_dir=.
19404    for ac_exec_ext in '' $ac_executable_extensions; do
19405  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19406    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19408    break 2
19409  fi
19410done
19411  done
19412IFS=$as_save_IFS
19413
19414fi
19415fi
19416ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19417if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19419$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19420else
19421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19422$as_echo "no" >&6; }
19423fi
19424
19425
19426  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19427done
19428
19429  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19430    PROPER_COMPILER_CC=""
19431  else
19432    case $cross_compiling:$ac_tool_warned in
19433yes:)
19434{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19435$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19436ac_tool_warned=yes ;;
19437esac
19438    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19439  fi
19440fi
19441
19442
19443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19444
19445  # First separate the path from the arguments. This will split at the first
19446  # space.
19447  complete="$PROPER_COMPILER_CC"
19448  path="${complete%% *}"
19449  tmp="$complete EOL"
19450  arguments="${tmp#* }"
19451
19452  # Input might be given as Windows format, start by converting to
19453  # unix format.
19454  new_path=`$CYGPATH -u "$path"`
19455
19456  # Now try to locate executable using which
19457  new_path=`$WHICH "$new_path" 2> /dev/null`
19458  # bat and cmd files are not always considered executable in cygwin causing which
19459  # to not find them
19460  if test "x$new_path" = x \
19461           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19462           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19463    new_path=`$CYGPATH -u "$path"`
19464  fi
19465  if test "x$new_path" = x; then
19466    # Oops. Which didn't find the executable.
19467    # The splitting of arguments from the executable at a space might have been incorrect,
19468    # since paths with space are more likely in Windows. Give it another try with the whole
19469    # argument.
19470    path="$complete"
19471    arguments="EOL"
19472    new_path=`$CYGPATH -u "$path"`
19473    new_path=`$WHICH "$new_path" 2> /dev/null`
19474    # bat and cmd files are not always considered executable in cygwin causing which
19475    # to not find them
19476    if test "x$new_path" = x \
19477             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19478             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19479      new_path=`$CYGPATH -u "$path"`
19480    fi
19481    if test "x$new_path" = x; then
19482      # It's still not found. Now this is an unrecoverable error.
19483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19484$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19485      has_space=`$ECHO "$complete" | $GREP " "`
19486      if test "x$has_space" != x; then
19487        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19488$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19489      fi
19490      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19491    fi
19492  fi
19493
19494  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19495  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19496  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19497  # "foo.exe" is OK but "foo" is an error.
19498  #
19499  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19500  # It is also a way to make sure we got the proper file name for the real test later on.
19501  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19502  if test "x$test_shortpath" = x; then
19503    # Short path failed, file does not exist as specified.
19504    # Try adding .exe or .cmd
19505    if test -f "${new_path}.exe"; then
19506       input_to_shortpath="${new_path}.exe"
19507    elif test -f "${new_path}.cmd"; then
19508       input_to_shortpath="${new_path}.cmd"
19509    else
19510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19511$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19512      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19513$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19514      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19515    fi
19516  else
19517    input_to_shortpath="$new_path"
19518  fi
19519
19520  # Call helper function which possibly converts this using DOS-style short mode.
19521  # If so, the updated path is stored in $new_path.
19522  new_path="$input_to_shortpath"
19523
19524  input_path="$input_to_shortpath"
19525  # Check if we need to convert this using DOS-style short mode. If the path
19526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19527  # take no chances and rewrite it.
19528  # Note: m4 eats our [], so we need to use [ and ] instead.
19529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19530  if test "x$has_forbidden_chars" != x; then
19531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19535      # Going to short mode and back again did indeed matter. Since short mode is
19536      # case insensitive, let's make it lowercase to improve readability.
19537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19538      # Now convert it back to Unix-stile (cygpath)
19539      input_path=`$CYGPATH -u "$shortmode_path"`
19540      new_path="$input_path"
19541    fi
19542  fi
19543
19544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19545  if test "x$test_cygdrive_prefix" = x; then
19546    # As a simple fix, exclude /usr/bin since it's not a real path.
19547    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19549      # a path prefixed by /cygdrive for fixpath to work.
19550      new_path="$CYGWIN_ROOT_PATH$input_path"
19551    fi
19552  fi
19553
19554  # remove trailing .exe if any
19555  new_path="${new_path/%.exe/}"
19556
19557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19558
19559  # First separate the path from the arguments. This will split at the first
19560  # space.
19561  complete="$PROPER_COMPILER_CC"
19562  path="${complete%% *}"
19563  tmp="$complete EOL"
19564  arguments="${tmp#* }"
19565
19566  # Input might be given as Windows format, start by converting to
19567  # unix format.
19568  new_path="$path"
19569
19570  windows_path="$new_path"
19571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19572    unix_path=`$CYGPATH -u "$windows_path"`
19573    new_path="$unix_path"
19574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19576    new_path="$unix_path"
19577  fi
19578
19579
19580  # Now try to locate executable using which
19581  new_path=`$WHICH "$new_path" 2> /dev/null`
19582
19583  if test "x$new_path" = x; then
19584    # Oops. Which didn't find the executable.
19585    # The splitting of arguments from the executable at a space might have been incorrect,
19586    # since paths with space are more likely in Windows. Give it another try with the whole
19587    # argument.
19588    path="$complete"
19589    arguments="EOL"
19590    new_path="$path"
19591
19592  windows_path="$new_path"
19593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19594    unix_path=`$CYGPATH -u "$windows_path"`
19595    new_path="$unix_path"
19596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19598    new_path="$unix_path"
19599  fi
19600
19601
19602    new_path=`$WHICH "$new_path" 2> /dev/null`
19603
19604    if test "x$new_path" = x; then
19605      # It's still not found. Now this is an unrecoverable error.
19606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19607$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19608      has_space=`$ECHO "$complete" | $GREP " "`
19609      if test "x$has_space" != x; then
19610        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19611$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19612      fi
19613      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19614    fi
19615  fi
19616
19617  # Now new_path has a complete unix path to the binary
19618  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19619    # Keep paths in /bin as-is, but remove trailing .exe if any
19620    new_path="${new_path/%.exe/}"
19621    # Do not save /bin paths to all_fixpath_prefixes!
19622  else
19623    # Not in mixed or Windows style, start by that.
19624    new_path=`cmd //c echo $new_path`
19625
19626  input_path="$new_path"
19627  # Check if we need to convert this using DOS-style short mode. If the path
19628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19629  # take no chances and rewrite it.
19630  # Note: m4 eats our [], so we need to use [ and ] instead.
19631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19632  if test "x$has_forbidden_chars" != x; then
19633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19635  fi
19636
19637    # Output is in $new_path
19638
19639  windows_path="$new_path"
19640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19641    unix_path=`$CYGPATH -u "$windows_path"`
19642    new_path="$unix_path"
19643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19645    new_path="$unix_path"
19646  fi
19647
19648    # remove trailing .exe if any
19649    new_path="${new_path/%.exe/}"
19650
19651    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19652    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19653  fi
19654
19655  else
19656    # We're on a posix platform. Hooray! :)
19657    # First separate the path from the arguments. This will split at the first
19658    # space.
19659    complete="$PROPER_COMPILER_CC"
19660    path="${complete%% *}"
19661    tmp="$complete EOL"
19662    arguments="${tmp#* }"
19663
19664    # Cannot rely on the command "which" here since it doesn't always work.
19665    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19666    if test -z "$is_absolute_path"; then
19667      # Path to executable is not absolute. Find it.
19668      IFS_save="$IFS"
19669      IFS=:
19670      for p in $PATH; do
19671        if test -f "$p/$path" && test -x "$p/$path"; then
19672          new_path="$p/$path"
19673          break
19674        fi
19675      done
19676      IFS="$IFS_save"
19677    else
19678      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19679$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19680      new_path="$path"
19681    fi
19682
19683    if test "x$new_path" = x; then
19684        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19685$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19686        has_space=`$ECHO "$complete" | $GREP " "`
19687        if test "x$has_space" != x; then
19688          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19689$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19690        fi
19691        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19692      fi
19693  fi
19694
19695      # Now join together the path and the arguments once again
19696      if test "x$arguments" != xEOL; then
19697        new_complete="$new_path ${arguments% *}"
19698      else
19699        new_complete="$new_path"
19700      fi
19701
19702  if test "x$complete" != "x$new_complete"; then
19703      PROPER_COMPILER_CC="$new_complete"
19704      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19705$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19706    fi
19707
19708    PATH="$RETRY_COMPILER_SAVED_PATH"
19709
19710    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19711$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19712
19713    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19714        # Follow a chain of symbolic links. Use readlink
19715        # where it exists, else fall back to horribly
19716        # complicated shell code.
19717        if test "x$READLINK_TESTED" != yes; then
19718            # On MacOSX there is a readlink tool with a different
19719            # purpose than the GNU readlink tool. Check the found readlink.
19720            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19721            if test "x$ISGNU" = x; then
19722                 # A readlink that we do not know how to use.
19723                 # Are there other non-GNU readlinks out there?
19724                 READLINK_TESTED=yes
19725                 READLINK=
19726            fi
19727        fi
19728
19729        if test "x$READLINK" != x; then
19730            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19731        else
19732            # Save the current directory for restoring afterwards
19733            STARTDIR=$PWD
19734            COUNTER=0
19735            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19736            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19737            cd $sym_link_dir
19738            # Use -P flag to resolve symlinks in directories.
19739            cd `$THEPWDCMD -P`
19740            sym_link_dir=`$THEPWDCMD -P`
19741            # Resolve file symlinks
19742            while test $COUNTER -lt 20; do
19743                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19744                if test "x$ISLINK" == x; then
19745                    # This is not a symbolic link! We are done!
19746                    break
19747                fi
19748                # Again resolve directory symlinks since the target of the just found
19749                # link could be in a different directory
19750                cd `$DIRNAME $ISLINK`
19751                sym_link_dir=`$THEPWDCMD -P`
19752                sym_link_file=`$BASENAME $ISLINK`
19753                let COUNTER=COUNTER+1
19754            done
19755            cd $STARTDIR
19756            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19757        fi
19758    fi
19759
19760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19761$as_echo "$PROPER_COMPILER_CC" >&6; }
19762    CC="$PROPER_COMPILER_CC"
19763  else
19764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19765$as_echo "no, keeping CC" >&6; }
19766    CC="$TEST_COMPILER"
19767  fi
19768
19769  COMPILER=$CC
19770  COMPILER_NAME=$COMPILER_NAME
19771
19772  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19773    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19774    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19775    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19776    if test $? -ne 0; then
19777      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19778
19779      { $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
19780$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19781      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19782$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19783      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19784    else
19785      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19786      COMPILER_VENDOR="Sun Studio"
19787    fi
19788  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19789    # First line typically looks something like:
19790    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19791    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19792    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19793    COMPILER_VENDOR="Microsoft CL.EXE"
19794    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19795    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19796      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19797        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19798      fi
19799    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19800      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19801        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19802      fi
19803    fi
19804  else
19805    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19806    # Check that this is likely to be GCC.
19807    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19808    if test $? -ne 0; then
19809      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19810$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19811      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19812$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19813      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19814    fi
19815
19816    # First line typically looks something like:
19817    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19818    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19819    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19820  fi
19821  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19822  CC_VERSION="$COMPILER_VERSION"
19823  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19824  CC_VENDOR="$COMPILER_VENDOR"
19825
19826  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19827$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19828
19829
19830# Now that we have resolved CC ourself, let autoconf have its go at it
19831ac_ext=c
19832ac_cpp='$CPP $CPPFLAGS'
19833ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19834ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19835ac_compiler_gnu=$ac_cv_c_compiler_gnu
19836if test -n "$ac_tool_prefix"; then
19837  for ac_prog in $CC
19838  do
19839    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19840set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19842$as_echo_n "checking for $ac_word... " >&6; }
19843if test "${ac_cv_prog_CC+set}" = set; then :
19844  $as_echo_n "(cached) " >&6
19845else
19846  if test -n "$CC"; then
19847  ac_cv_prog_CC="$CC" # Let the user override the test.
19848else
19849as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19850for as_dir in $PATH
19851do
19852  IFS=$as_save_IFS
19853  test -z "$as_dir" && as_dir=.
19854    for ac_exec_ext in '' $ac_executable_extensions; do
19855  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19856    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19858    break 2
19859  fi
19860done
19861  done
19862IFS=$as_save_IFS
19863
19864fi
19865fi
19866CC=$ac_cv_prog_CC
19867if test -n "$CC"; then
19868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19869$as_echo "$CC" >&6; }
19870else
19871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19872$as_echo "no" >&6; }
19873fi
19874
19875
19876    test -n "$CC" && break
19877  done
19878fi
19879if test -z "$CC"; then
19880  ac_ct_CC=$CC
19881  for ac_prog in $CC
19882do
19883  # Extract the first word of "$ac_prog", so it can be a program name with args.
19884set dummy $ac_prog; ac_word=$2
19885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19886$as_echo_n "checking for $ac_word... " >&6; }
19887if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19888  $as_echo_n "(cached) " >&6
19889else
19890  if test -n "$ac_ct_CC"; then
19891  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19892else
19893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19894for as_dir in $PATH
19895do
19896  IFS=$as_save_IFS
19897  test -z "$as_dir" && as_dir=.
19898    for ac_exec_ext in '' $ac_executable_extensions; do
19899  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19900    ac_cv_prog_ac_ct_CC="$ac_prog"
19901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19902    break 2
19903  fi
19904done
19905  done
19906IFS=$as_save_IFS
19907
19908fi
19909fi
19910ac_ct_CC=$ac_cv_prog_ac_ct_CC
19911if test -n "$ac_ct_CC"; then
19912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19913$as_echo "$ac_ct_CC" >&6; }
19914else
19915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19916$as_echo "no" >&6; }
19917fi
19918
19919
19920  test -n "$ac_ct_CC" && break
19921done
19922
19923  if test "x$ac_ct_CC" = x; then
19924    CC=""
19925  else
19926    case $cross_compiling:$ac_tool_warned in
19927yes:)
19928{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19929$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19930ac_tool_warned=yes ;;
19931esac
19932    CC=$ac_ct_CC
19933  fi
19934fi
19935
19936
19937test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19938$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19939as_fn_error $? "no acceptable C compiler found in \$PATH
19940See \`config.log' for more details" "$LINENO" 5 ; }
19941
19942# Provide some information about the compiler.
19943$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19944set X $ac_compile
19945ac_compiler=$2
19946for ac_option in --version -v -V -qversion; do
19947  { { ac_try="$ac_compiler $ac_option >&5"
19948case "(($ac_try" in
19949  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19950  *) ac_try_echo=$ac_try;;
19951esac
19952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19953$as_echo "$ac_try_echo"; } >&5
19954  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19955  ac_status=$?
19956  if test -s conftest.err; then
19957    sed '10a\
19958... rest of stderr output deleted ...
19959         10q' conftest.err >conftest.er1
19960    cat conftest.er1 >&5
19961  fi
19962  rm -f conftest.er1 conftest.err
19963  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19964  test $ac_status = 0; }
19965done
19966
19967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19968/* end confdefs.h.  */
19969
19970int
19971main ()
19972{
19973
19974  ;
19975  return 0;
19976}
19977_ACEOF
19978ac_clean_files_save=$ac_clean_files
19979ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19980# Try to create an executable without -o first, disregard a.out.
19981# It will help us diagnose broken compilers, and finding out an intuition
19982# of exeext.
19983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19984$as_echo_n "checking whether the C compiler works... " >&6; }
19985ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19986
19987# The possible output files:
19988ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19989
19990ac_rmfiles=
19991for ac_file in $ac_files
19992do
19993  case $ac_file in
19994    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19995    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19996  esac
19997done
19998rm -f $ac_rmfiles
19999
20000if { { ac_try="$ac_link_default"
20001case "(($ac_try" in
20002  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20003  *) ac_try_echo=$ac_try;;
20004esac
20005eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20006$as_echo "$ac_try_echo"; } >&5
20007  (eval "$ac_link_default") 2>&5
20008  ac_status=$?
20009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20010  test $ac_status = 0; }; then :
20011  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20012# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20013# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20014# so that the user can short-circuit this test for compilers unknown to
20015# Autoconf.
20016for ac_file in $ac_files ''
20017do
20018  test -f "$ac_file" || continue
20019  case $ac_file in
20020    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20021	;;
20022    [ab].out )
20023	# We found the default executable, but exeext='' is most
20024	# certainly right.
20025	break;;
20026    *.* )
20027	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20028	then :; else
20029	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20030	fi
20031	# We set ac_cv_exeext here because the later test for it is not
20032	# safe: cross compilers may not add the suffix if given an `-o'
20033	# argument, so we may need to know it at that point already.
20034	# Even if this section looks crufty: it has the advantage of
20035	# actually working.
20036	break;;
20037    * )
20038	break;;
20039  esac
20040done
20041test "$ac_cv_exeext" = no && ac_cv_exeext=
20042
20043else
20044  ac_file=''
20045fi
20046if test -z "$ac_file"; then :
20047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20048$as_echo "no" >&6; }
20049$as_echo "$as_me: failed program was:" >&5
20050sed 's/^/| /' conftest.$ac_ext >&5
20051
20052{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20053$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20054as_fn_error 77 "C compiler cannot create executables
20055See \`config.log' for more details" "$LINENO" 5 ; }
20056else
20057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20058$as_echo "yes" >&6; }
20059fi
20060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20061$as_echo_n "checking for C compiler default output file name... " >&6; }
20062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20063$as_echo "$ac_file" >&6; }
20064ac_exeext=$ac_cv_exeext
20065
20066rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20067ac_clean_files=$ac_clean_files_save
20068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20069$as_echo_n "checking for suffix of executables... " >&6; }
20070if { { ac_try="$ac_link"
20071case "(($ac_try" in
20072  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20073  *) ac_try_echo=$ac_try;;
20074esac
20075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20076$as_echo "$ac_try_echo"; } >&5
20077  (eval "$ac_link") 2>&5
20078  ac_status=$?
20079  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20080  test $ac_status = 0; }; then :
20081  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20082# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20083# work properly (i.e., refer to `conftest.exe'), while it won't with
20084# `rm'.
20085for ac_file in conftest.exe conftest conftest.*; do
20086  test -f "$ac_file" || continue
20087  case $ac_file in
20088    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20089    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20090	  break;;
20091    * ) break;;
20092  esac
20093done
20094else
20095  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20097as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20098See \`config.log' for more details" "$LINENO" 5 ; }
20099fi
20100rm -f conftest conftest$ac_cv_exeext
20101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20102$as_echo "$ac_cv_exeext" >&6; }
20103
20104rm -f conftest.$ac_ext
20105EXEEXT=$ac_cv_exeext
20106ac_exeext=$EXEEXT
20107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20108/* end confdefs.h.  */
20109#include <stdio.h>
20110int
20111main ()
20112{
20113FILE *f = fopen ("conftest.out", "w");
20114 return ferror (f) || fclose (f) != 0;
20115
20116  ;
20117  return 0;
20118}
20119_ACEOF
20120ac_clean_files="$ac_clean_files conftest.out"
20121# Check that the compiler produces executables we can run.  If not, either
20122# the compiler is broken, or we cross compile.
20123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20124$as_echo_n "checking whether we are cross compiling... " >&6; }
20125if test "$cross_compiling" != yes; then
20126  { { ac_try="$ac_link"
20127case "(($ac_try" in
20128  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20129  *) ac_try_echo=$ac_try;;
20130esac
20131eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20132$as_echo "$ac_try_echo"; } >&5
20133  (eval "$ac_link") 2>&5
20134  ac_status=$?
20135  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20136  test $ac_status = 0; }
20137  if { ac_try='./conftest$ac_cv_exeext'
20138  { { case "(($ac_try" in
20139  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20140  *) ac_try_echo=$ac_try;;
20141esac
20142eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20143$as_echo "$ac_try_echo"; } >&5
20144  (eval "$ac_try") 2>&5
20145  ac_status=$?
20146  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20147  test $ac_status = 0; }; }; then
20148    cross_compiling=no
20149  else
20150    if test "$cross_compiling" = maybe; then
20151	cross_compiling=yes
20152    else
20153	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20154$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20155as_fn_error $? "cannot run C compiled programs.
20156If you meant to cross compile, use \`--host'.
20157See \`config.log' for more details" "$LINENO" 5 ; }
20158    fi
20159  fi
20160fi
20161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20162$as_echo "$cross_compiling" >&6; }
20163
20164rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20165ac_clean_files=$ac_clean_files_save
20166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20167$as_echo_n "checking for suffix of object files... " >&6; }
20168if test "${ac_cv_objext+set}" = set; then :
20169  $as_echo_n "(cached) " >&6
20170else
20171  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20172/* end confdefs.h.  */
20173
20174int
20175main ()
20176{
20177
20178  ;
20179  return 0;
20180}
20181_ACEOF
20182rm -f conftest.o conftest.obj
20183if { { ac_try="$ac_compile"
20184case "(($ac_try" in
20185  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20186  *) ac_try_echo=$ac_try;;
20187esac
20188eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20189$as_echo "$ac_try_echo"; } >&5
20190  (eval "$ac_compile") 2>&5
20191  ac_status=$?
20192  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20193  test $ac_status = 0; }; then :
20194  for ac_file in conftest.o conftest.obj conftest.*; do
20195  test -f "$ac_file" || continue;
20196  case $ac_file in
20197    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20198    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20199       break;;
20200  esac
20201done
20202else
20203  $as_echo "$as_me: failed program was:" >&5
20204sed 's/^/| /' conftest.$ac_ext >&5
20205
20206{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20207$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20208as_fn_error $? "cannot compute suffix of object files: cannot compile
20209See \`config.log' for more details" "$LINENO" 5 ; }
20210fi
20211rm -f conftest.$ac_cv_objext conftest.$ac_ext
20212fi
20213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20214$as_echo "$ac_cv_objext" >&6; }
20215OBJEXT=$ac_cv_objext
20216ac_objext=$OBJEXT
20217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20218$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20219if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20220  $as_echo_n "(cached) " >&6
20221else
20222  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20223/* end confdefs.h.  */
20224
20225int
20226main ()
20227{
20228#ifndef __GNUC__
20229       choke me
20230#endif
20231
20232  ;
20233  return 0;
20234}
20235_ACEOF
20236if ac_fn_c_try_compile "$LINENO"; then :
20237  ac_compiler_gnu=yes
20238else
20239  ac_compiler_gnu=no
20240fi
20241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20242ac_cv_c_compiler_gnu=$ac_compiler_gnu
20243
20244fi
20245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20246$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20247if test $ac_compiler_gnu = yes; then
20248  GCC=yes
20249else
20250  GCC=
20251fi
20252ac_test_CFLAGS=${CFLAGS+set}
20253ac_save_CFLAGS=$CFLAGS
20254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20255$as_echo_n "checking whether $CC accepts -g... " >&6; }
20256if test "${ac_cv_prog_cc_g+set}" = set; then :
20257  $as_echo_n "(cached) " >&6
20258else
20259  ac_save_c_werror_flag=$ac_c_werror_flag
20260   ac_c_werror_flag=yes
20261   ac_cv_prog_cc_g=no
20262   CFLAGS="-g"
20263   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20264/* end confdefs.h.  */
20265
20266int
20267main ()
20268{
20269
20270  ;
20271  return 0;
20272}
20273_ACEOF
20274if ac_fn_c_try_compile "$LINENO"; then :
20275  ac_cv_prog_cc_g=yes
20276else
20277  CFLAGS=""
20278      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20279/* end confdefs.h.  */
20280
20281int
20282main ()
20283{
20284
20285  ;
20286  return 0;
20287}
20288_ACEOF
20289if ac_fn_c_try_compile "$LINENO"; then :
20290
20291else
20292  ac_c_werror_flag=$ac_save_c_werror_flag
20293	 CFLAGS="-g"
20294	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20295/* end confdefs.h.  */
20296
20297int
20298main ()
20299{
20300
20301  ;
20302  return 0;
20303}
20304_ACEOF
20305if ac_fn_c_try_compile "$LINENO"; then :
20306  ac_cv_prog_cc_g=yes
20307fi
20308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20309fi
20310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20311fi
20312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20313   ac_c_werror_flag=$ac_save_c_werror_flag
20314fi
20315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20316$as_echo "$ac_cv_prog_cc_g" >&6; }
20317if test "$ac_test_CFLAGS" = set; then
20318  CFLAGS=$ac_save_CFLAGS
20319elif test $ac_cv_prog_cc_g = yes; then
20320  if test "$GCC" = yes; then
20321    CFLAGS="-g -O2"
20322  else
20323    CFLAGS="-g"
20324  fi
20325else
20326  if test "$GCC" = yes; then
20327    CFLAGS="-O2"
20328  else
20329    CFLAGS=
20330  fi
20331fi
20332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20333$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20334if test "${ac_cv_prog_cc_c89+set}" = set; then :
20335  $as_echo_n "(cached) " >&6
20336else
20337  ac_cv_prog_cc_c89=no
20338ac_save_CC=$CC
20339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20340/* end confdefs.h.  */
20341#include <stdarg.h>
20342#include <stdio.h>
20343#include <sys/types.h>
20344#include <sys/stat.h>
20345/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20346struct buf { int x; };
20347FILE * (*rcsopen) (struct buf *, struct stat *, int);
20348static char *e (p, i)
20349     char **p;
20350     int i;
20351{
20352  return p[i];
20353}
20354static char *f (char * (*g) (char **, int), char **p, ...)
20355{
20356  char *s;
20357  va_list v;
20358  va_start (v,p);
20359  s = g (p, va_arg (v,int));
20360  va_end (v);
20361  return s;
20362}
20363
20364/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20365   function prototypes and stuff, but not '\xHH' hex character constants.
20366   These don't provoke an error unfortunately, instead are silently treated
20367   as 'x'.  The following induces an error, until -std is added to get
20368   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20369   array size at least.  It's necessary to write '\x00'==0 to get something
20370   that's true only with -std.  */
20371int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20372
20373/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20374   inside strings and character constants.  */
20375#define FOO(x) 'x'
20376int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20377
20378int test (int i, double x);
20379struct s1 {int (*f) (int a);};
20380struct s2 {int (*f) (double a);};
20381int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20382int argc;
20383char **argv;
20384int
20385main ()
20386{
20387return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20388  ;
20389  return 0;
20390}
20391_ACEOF
20392for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20393	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20394do
20395  CC="$ac_save_CC $ac_arg"
20396  if ac_fn_c_try_compile "$LINENO"; then :
20397  ac_cv_prog_cc_c89=$ac_arg
20398fi
20399rm -f core conftest.err conftest.$ac_objext
20400  test "x$ac_cv_prog_cc_c89" != "xno" && break
20401done
20402rm -f conftest.$ac_ext
20403CC=$ac_save_CC
20404
20405fi
20406# AC_CACHE_VAL
20407case "x$ac_cv_prog_cc_c89" in
20408  x)
20409    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20410$as_echo "none needed" >&6; } ;;
20411  xno)
20412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20413$as_echo "unsupported" >&6; } ;;
20414  *)
20415    CC="$CC $ac_cv_prog_cc_c89"
20416    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20417$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20418esac
20419if test "x$ac_cv_prog_cc_c89" != xno; then :
20420
20421fi
20422
20423ac_ext=cpp
20424ac_cpp='$CXXCPP $CPPFLAGS'
20425ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20426ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20427ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20428
20429
20430### Locate C++ compiler (CXX)
20431
20432if test "x$CXX" != x; then
20433  COMPILER_CHECK_LIST="$CXX"
20434elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20435  COMPILER_CHECK_LIST="cl"
20436elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20437  COMPILER_CHECK_LIST="CC g++"
20438else
20439  COMPILER_CHECK_LIST="g++ CC"
20440fi
20441
20442
20443  COMPILER_NAME=C++
20444
20445  CXX=
20446  # If TOOLS_DIR is set, check for all compiler names in there first
20447  # before checking the rest of the PATH.
20448  if test -n "$TOOLS_DIR"; then
20449    PATH_save="$PATH"
20450    PATH="$TOOLS_DIR"
20451    for ac_prog in $COMPILER_CHECK_LIST
20452do
20453  # Extract the first word of "$ac_prog", so it can be a program name with args.
20454set dummy $ac_prog; ac_word=$2
20455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20456$as_echo_n "checking for $ac_word... " >&6; }
20457if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20458  $as_echo_n "(cached) " >&6
20459else
20460  case $TOOLS_DIR_CXX in
20461  [\\/]* | ?:[\\/]*)
20462  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20463  ;;
20464  *)
20465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20466for as_dir in $PATH
20467do
20468  IFS=$as_save_IFS
20469  test -z "$as_dir" && as_dir=.
20470    for ac_exec_ext in '' $ac_executable_extensions; do
20471  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20472    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20474    break 2
20475  fi
20476done
20477  done
20478IFS=$as_save_IFS
20479
20480  ;;
20481esac
20482fi
20483TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20484if test -n "$TOOLS_DIR_CXX"; then
20485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20486$as_echo "$TOOLS_DIR_CXX" >&6; }
20487else
20488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20489$as_echo "no" >&6; }
20490fi
20491
20492
20493  test -n "$TOOLS_DIR_CXX" && break
20494done
20495
20496    CXX=$TOOLS_DIR_CXX
20497    PATH="$PATH_save"
20498  fi
20499
20500  # AC_PATH_PROGS can't be run multiple times with the same variable,
20501  # so create a new name for this run.
20502  if test "x$CXX" = x; then
20503    for ac_prog in $COMPILER_CHECK_LIST
20504do
20505  # Extract the first word of "$ac_prog", so it can be a program name with args.
20506set dummy $ac_prog; ac_word=$2
20507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20508$as_echo_n "checking for $ac_word... " >&6; }
20509if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20510  $as_echo_n "(cached) " >&6
20511else
20512  case $POTENTIAL_CXX in
20513  [\\/]* | ?:[\\/]*)
20514  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20515  ;;
20516  *)
20517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20518for as_dir in $PATH
20519do
20520  IFS=$as_save_IFS
20521  test -z "$as_dir" && as_dir=.
20522    for ac_exec_ext in '' $ac_executable_extensions; do
20523  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20524    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20526    break 2
20527  fi
20528done
20529  done
20530IFS=$as_save_IFS
20531
20532  ;;
20533esac
20534fi
20535POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20536if test -n "$POTENTIAL_CXX"; then
20537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20538$as_echo "$POTENTIAL_CXX" >&6; }
20539else
20540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20541$as_echo "no" >&6; }
20542fi
20543
20544
20545  test -n "$POTENTIAL_CXX" && break
20546done
20547
20548    CXX=$POTENTIAL_CXX
20549  fi
20550
20551  if test "x$CXX" = x; then
20552
20553    # Print a helpful message on how to acquire the necessary build dependency.
20554    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20555    MISSING_DEPENDENCY=devkit
20556    PKGHANDLER_COMMAND=
20557
20558    case $PKGHANDLER in
20559	apt-get)
20560                apt_help     $MISSING_DEPENDENCY ;;
20561    yum)
20562                yum_help     $MISSING_DEPENDENCY ;;
20563	port)
20564                port_help    $MISSING_DEPENDENCY ;;
20565	pkgutil)
20566                pkgutil_help $MISSING_DEPENDENCY ;;
20567	pkgadd)
20568                pkgadd_help  $MISSING_DEPENDENCY ;;
20569    * )
20570      break ;;
20571    esac
20572
20573    if test "x$PKGHANDLER_COMMAND" != x; then
20574        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20575    fi
20576
20577      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20578  fi
20579
20580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20581
20582  # First separate the path from the arguments. This will split at the first
20583  # space.
20584  complete="$CXX"
20585  path="${complete%% *}"
20586  tmp="$complete EOL"
20587  arguments="${tmp#* }"
20588
20589  # Input might be given as Windows format, start by converting to
20590  # unix format.
20591  new_path=`$CYGPATH -u "$path"`
20592
20593  # Now try to locate executable using which
20594  new_path=`$WHICH "$new_path" 2> /dev/null`
20595  # bat and cmd files are not always considered executable in cygwin causing which
20596  # to not find them
20597  if test "x$new_path" = x \
20598           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20599           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20600    new_path=`$CYGPATH -u "$path"`
20601  fi
20602  if test "x$new_path" = x; then
20603    # Oops. Which didn't find the executable.
20604    # The splitting of arguments from the executable at a space might have been incorrect,
20605    # since paths with space are more likely in Windows. Give it another try with the whole
20606    # argument.
20607    path="$complete"
20608    arguments="EOL"
20609    new_path=`$CYGPATH -u "$path"`
20610    new_path=`$WHICH "$new_path" 2> /dev/null`
20611    # bat and cmd files are not always considered executable in cygwin causing which
20612    # to not find them
20613    if test "x$new_path" = x \
20614             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20615             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20616      new_path=`$CYGPATH -u "$path"`
20617    fi
20618    if test "x$new_path" = x; then
20619      # It's still not found. Now this is an unrecoverable error.
20620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20621$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20622      has_space=`$ECHO "$complete" | $GREP " "`
20623      if test "x$has_space" != x; then
20624        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20625$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20626      fi
20627      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20628    fi
20629  fi
20630
20631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20634  # "foo.exe" is OK but "foo" is an error.
20635  #
20636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20637  # It is also a way to make sure we got the proper file name for the real test later on.
20638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20639  if test "x$test_shortpath" = x; then
20640    # Short path failed, file does not exist as specified.
20641    # Try adding .exe or .cmd
20642    if test -f "${new_path}.exe"; then
20643       input_to_shortpath="${new_path}.exe"
20644    elif test -f "${new_path}.cmd"; then
20645       input_to_shortpath="${new_path}.cmd"
20646    else
20647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20648$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20649      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20650$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20651      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20652    fi
20653  else
20654    input_to_shortpath="$new_path"
20655  fi
20656
20657  # Call helper function which possibly converts this using DOS-style short mode.
20658  # If so, the updated path is stored in $new_path.
20659  new_path="$input_to_shortpath"
20660
20661  input_path="$input_to_shortpath"
20662  # Check if we need to convert this using DOS-style short mode. If the path
20663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20664  # take no chances and rewrite it.
20665  # Note: m4 eats our [], so we need to use [ and ] instead.
20666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20667  if test "x$has_forbidden_chars" != x; then
20668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20672      # Going to short mode and back again did indeed matter. Since short mode is
20673      # case insensitive, let's make it lowercase to improve readability.
20674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20675      # Now convert it back to Unix-stile (cygpath)
20676      input_path=`$CYGPATH -u "$shortmode_path"`
20677      new_path="$input_path"
20678    fi
20679  fi
20680
20681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20682  if test "x$test_cygdrive_prefix" = x; then
20683    # As a simple fix, exclude /usr/bin since it's not a real path.
20684    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20686      # a path prefixed by /cygdrive for fixpath to work.
20687      new_path="$CYGWIN_ROOT_PATH$input_path"
20688    fi
20689  fi
20690
20691  # remove trailing .exe if any
20692  new_path="${new_path/%.exe/}"
20693
20694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20695
20696  # First separate the path from the arguments. This will split at the first
20697  # space.
20698  complete="$CXX"
20699  path="${complete%% *}"
20700  tmp="$complete EOL"
20701  arguments="${tmp#* }"
20702
20703  # Input might be given as Windows format, start by converting to
20704  # unix format.
20705  new_path="$path"
20706
20707  windows_path="$new_path"
20708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20709    unix_path=`$CYGPATH -u "$windows_path"`
20710    new_path="$unix_path"
20711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20713    new_path="$unix_path"
20714  fi
20715
20716
20717  # Now try to locate executable using which
20718  new_path=`$WHICH "$new_path" 2> /dev/null`
20719
20720  if test "x$new_path" = x; then
20721    # Oops. Which didn't find the executable.
20722    # The splitting of arguments from the executable at a space might have been incorrect,
20723    # since paths with space are more likely in Windows. Give it another try with the whole
20724    # argument.
20725    path="$complete"
20726    arguments="EOL"
20727    new_path="$path"
20728
20729  windows_path="$new_path"
20730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20731    unix_path=`$CYGPATH -u "$windows_path"`
20732    new_path="$unix_path"
20733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20735    new_path="$unix_path"
20736  fi
20737
20738
20739    new_path=`$WHICH "$new_path" 2> /dev/null`
20740
20741    if test "x$new_path" = x; then
20742      # It's still not found. Now this is an unrecoverable error.
20743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20744$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20745      has_space=`$ECHO "$complete" | $GREP " "`
20746      if test "x$has_space" != x; then
20747        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20748$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20749      fi
20750      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20751    fi
20752  fi
20753
20754  # Now new_path has a complete unix path to the binary
20755  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20756    # Keep paths in /bin as-is, but remove trailing .exe if any
20757    new_path="${new_path/%.exe/}"
20758    # Do not save /bin paths to all_fixpath_prefixes!
20759  else
20760    # Not in mixed or Windows style, start by that.
20761    new_path=`cmd //c echo $new_path`
20762
20763  input_path="$new_path"
20764  # Check if we need to convert this using DOS-style short mode. If the path
20765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20766  # take no chances and rewrite it.
20767  # Note: m4 eats our [], so we need to use [ and ] instead.
20768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20769  if test "x$has_forbidden_chars" != x; then
20770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20772  fi
20773
20774    # Output is in $new_path
20775
20776  windows_path="$new_path"
20777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20778    unix_path=`$CYGPATH -u "$windows_path"`
20779    new_path="$unix_path"
20780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20782    new_path="$unix_path"
20783  fi
20784
20785    # remove trailing .exe if any
20786    new_path="${new_path/%.exe/}"
20787
20788    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20789    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20790  fi
20791
20792  else
20793    # We're on a posix platform. Hooray! :)
20794    # First separate the path from the arguments. This will split at the first
20795    # space.
20796    complete="$CXX"
20797    path="${complete%% *}"
20798    tmp="$complete EOL"
20799    arguments="${tmp#* }"
20800
20801    # Cannot rely on the command "which" here since it doesn't always work.
20802    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20803    if test -z "$is_absolute_path"; then
20804      # Path to executable is not absolute. Find it.
20805      IFS_save="$IFS"
20806      IFS=:
20807      for p in $PATH; do
20808        if test -f "$p/$path" && test -x "$p/$path"; then
20809          new_path="$p/$path"
20810          break
20811        fi
20812      done
20813      IFS="$IFS_save"
20814    else
20815      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20816$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20817      new_path="$path"
20818    fi
20819
20820    if test "x$new_path" = x; then
20821        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20822$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20823        has_space=`$ECHO "$complete" | $GREP " "`
20824        if test "x$has_space" != x; then
20825          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20826$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20827        fi
20828        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20829      fi
20830  fi
20831
20832      # Now join together the path and the arguments once again
20833      if test "x$arguments" != xEOL; then
20834        new_complete="$new_path ${arguments% *}"
20835      else
20836        new_complete="$new_path"
20837      fi
20838
20839  if test "x$complete" != "x$new_complete"; then
20840      CXX="$new_complete"
20841      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20842$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20843    fi
20844
20845  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20846$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20847  TEST_COMPILER="$CXX"
20848
20849    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20850        # Follow a chain of symbolic links. Use readlink
20851        # where it exists, else fall back to horribly
20852        # complicated shell code.
20853        if test "x$READLINK_TESTED" != yes; then
20854            # On MacOSX there is a readlink tool with a different
20855            # purpose than the GNU readlink tool. Check the found readlink.
20856            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20857            if test "x$ISGNU" = x; then
20858                 # A readlink that we do not know how to use.
20859                 # Are there other non-GNU readlinks out there?
20860                 READLINK_TESTED=yes
20861                 READLINK=
20862            fi
20863        fi
20864
20865        if test "x$READLINK" != x; then
20866            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20867        else
20868            # Save the current directory for restoring afterwards
20869            STARTDIR=$PWD
20870            COUNTER=0
20871            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20872            sym_link_file=`$BASENAME $TEST_COMPILER`
20873            cd $sym_link_dir
20874            # Use -P flag to resolve symlinks in directories.
20875            cd `$THEPWDCMD -P`
20876            sym_link_dir=`$THEPWDCMD -P`
20877            # Resolve file symlinks
20878            while test $COUNTER -lt 20; do
20879                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20880                if test "x$ISLINK" == x; then
20881                    # This is not a symbolic link! We are done!
20882                    break
20883                fi
20884                # Again resolve directory symlinks since the target of the just found
20885                # link could be in a different directory
20886                cd `$DIRNAME $ISLINK`
20887                sym_link_dir=`$THEPWDCMD -P`
20888                sym_link_file=`$BASENAME $ISLINK`
20889                let COUNTER=COUNTER+1
20890            done
20891            cd $STARTDIR
20892            TEST_COMPILER=$sym_link_dir/$sym_link_file
20893        fi
20894    fi
20895
20896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20897$as_echo "$TEST_COMPILER" >&6; }
20898  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20899$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20900
20901  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20902  if test "x$COMPILER_BASENAME" = "xccache"; then
20903    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20904$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20905    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20906    # We want to control ccache invocation ourselves, so ignore this cc and try
20907    # searching again.
20908
20909    # Remove the path to the fake ccache cc from the PATH
20910    RETRY_COMPILER_SAVED_PATH="$PATH"
20911    COMPILER_DIRNAME=`$DIRNAME $CXX`
20912    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20913
20914    # Try again looking for our compiler
20915    if test -n "$ac_tool_prefix"; then
20916  for ac_prog in $COMPILER_CHECK_LIST
20917  do
20918    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20919set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20921$as_echo_n "checking for $ac_word... " >&6; }
20922if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20923  $as_echo_n "(cached) " >&6
20924else
20925  if test -n "$PROPER_COMPILER_CXX"; then
20926  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20927else
20928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20929for as_dir in $PATH
20930do
20931  IFS=$as_save_IFS
20932  test -z "$as_dir" && as_dir=.
20933    for ac_exec_ext in '' $ac_executable_extensions; do
20934  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20935    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20937    break 2
20938  fi
20939done
20940  done
20941IFS=$as_save_IFS
20942
20943fi
20944fi
20945PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20946if test -n "$PROPER_COMPILER_CXX"; then
20947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20948$as_echo "$PROPER_COMPILER_CXX" >&6; }
20949else
20950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20951$as_echo "no" >&6; }
20952fi
20953
20954
20955    test -n "$PROPER_COMPILER_CXX" && break
20956  done
20957fi
20958if test -z "$PROPER_COMPILER_CXX"; then
20959  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20960  for ac_prog in $COMPILER_CHECK_LIST
20961do
20962  # Extract the first word of "$ac_prog", so it can be a program name with args.
20963set dummy $ac_prog; ac_word=$2
20964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20965$as_echo_n "checking for $ac_word... " >&6; }
20966if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20967  $as_echo_n "(cached) " >&6
20968else
20969  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20970  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20971else
20972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20973for as_dir in $PATH
20974do
20975  IFS=$as_save_IFS
20976  test -z "$as_dir" && as_dir=.
20977    for ac_exec_ext in '' $ac_executable_extensions; do
20978  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20979    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20981    break 2
20982  fi
20983done
20984  done
20985IFS=$as_save_IFS
20986
20987fi
20988fi
20989ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20990if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20992$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20993else
20994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20995$as_echo "no" >&6; }
20996fi
20997
20998
20999  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21000done
21001
21002  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21003    PROPER_COMPILER_CXX=""
21004  else
21005    case $cross_compiling:$ac_tool_warned in
21006yes:)
21007{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21008$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21009ac_tool_warned=yes ;;
21010esac
21011    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21012  fi
21013fi
21014
21015
21016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21017
21018  # First separate the path from the arguments. This will split at the first
21019  # space.
21020  complete="$PROPER_COMPILER_CXX"
21021  path="${complete%% *}"
21022  tmp="$complete EOL"
21023  arguments="${tmp#* }"
21024
21025  # Input might be given as Windows format, start by converting to
21026  # unix format.
21027  new_path=`$CYGPATH -u "$path"`
21028
21029  # Now try to locate executable using which
21030  new_path=`$WHICH "$new_path" 2> /dev/null`
21031  # bat and cmd files are not always considered executable in cygwin causing which
21032  # to not find them
21033  if test "x$new_path" = x \
21034           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21035           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21036    new_path=`$CYGPATH -u "$path"`
21037  fi
21038  if test "x$new_path" = x; then
21039    # Oops. Which didn't find the executable.
21040    # The splitting of arguments from the executable at a space might have been incorrect,
21041    # since paths with space are more likely in Windows. Give it another try with the whole
21042    # argument.
21043    path="$complete"
21044    arguments="EOL"
21045    new_path=`$CYGPATH -u "$path"`
21046    new_path=`$WHICH "$new_path" 2> /dev/null`
21047    # bat and cmd files are not always considered executable in cygwin causing which
21048    # to not find them
21049    if test "x$new_path" = x \
21050             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21051             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21052      new_path=`$CYGPATH -u "$path"`
21053    fi
21054    if test "x$new_path" = x; then
21055      # It's still not found. Now this is an unrecoverable error.
21056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21057$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21058      has_space=`$ECHO "$complete" | $GREP " "`
21059      if test "x$has_space" != x; then
21060        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21061$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21062      fi
21063      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21064    fi
21065  fi
21066
21067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21070  # "foo.exe" is OK but "foo" is an error.
21071  #
21072  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21073  # It is also a way to make sure we got the proper file name for the real test later on.
21074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21075  if test "x$test_shortpath" = x; then
21076    # Short path failed, file does not exist as specified.
21077    # Try adding .exe or .cmd
21078    if test -f "${new_path}.exe"; then
21079       input_to_shortpath="${new_path}.exe"
21080    elif test -f "${new_path}.cmd"; then
21081       input_to_shortpath="${new_path}.cmd"
21082    else
21083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21084$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21085      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21086$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21087      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21088    fi
21089  else
21090    input_to_shortpath="$new_path"
21091  fi
21092
21093  # Call helper function which possibly converts this using DOS-style short mode.
21094  # If so, the updated path is stored in $new_path.
21095  new_path="$input_to_shortpath"
21096
21097  input_path="$input_to_shortpath"
21098  # Check if we need to convert this using DOS-style short mode. If the path
21099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21100  # take no chances and rewrite it.
21101  # Note: m4 eats our [], so we need to use [ and ] instead.
21102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21103  if test "x$has_forbidden_chars" != x; then
21104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21108      # Going to short mode and back again did indeed matter. Since short mode is
21109      # case insensitive, let's make it lowercase to improve readability.
21110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21111      # Now convert it back to Unix-stile (cygpath)
21112      input_path=`$CYGPATH -u "$shortmode_path"`
21113      new_path="$input_path"
21114    fi
21115  fi
21116
21117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21118  if test "x$test_cygdrive_prefix" = x; then
21119    # As a simple fix, exclude /usr/bin since it's not a real path.
21120    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21122      # a path prefixed by /cygdrive for fixpath to work.
21123      new_path="$CYGWIN_ROOT_PATH$input_path"
21124    fi
21125  fi
21126
21127  # remove trailing .exe if any
21128  new_path="${new_path/%.exe/}"
21129
21130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21131
21132  # First separate the path from the arguments. This will split at the first
21133  # space.
21134  complete="$PROPER_COMPILER_CXX"
21135  path="${complete%% *}"
21136  tmp="$complete EOL"
21137  arguments="${tmp#* }"
21138
21139  # Input might be given as Windows format, start by converting to
21140  # unix format.
21141  new_path="$path"
21142
21143  windows_path="$new_path"
21144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21145    unix_path=`$CYGPATH -u "$windows_path"`
21146    new_path="$unix_path"
21147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21149    new_path="$unix_path"
21150  fi
21151
21152
21153  # Now try to locate executable using which
21154  new_path=`$WHICH "$new_path" 2> /dev/null`
21155
21156  if test "x$new_path" = x; then
21157    # Oops. Which didn't find the executable.
21158    # The splitting of arguments from the executable at a space might have been incorrect,
21159    # since paths with space are more likely in Windows. Give it another try with the whole
21160    # argument.
21161    path="$complete"
21162    arguments="EOL"
21163    new_path="$path"
21164
21165  windows_path="$new_path"
21166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21167    unix_path=`$CYGPATH -u "$windows_path"`
21168    new_path="$unix_path"
21169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21171    new_path="$unix_path"
21172  fi
21173
21174
21175    new_path=`$WHICH "$new_path" 2> /dev/null`
21176
21177    if test "x$new_path" = x; then
21178      # It's still not found. Now this is an unrecoverable error.
21179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21180$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21181      has_space=`$ECHO "$complete" | $GREP " "`
21182      if test "x$has_space" != x; then
21183        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21184$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21185      fi
21186      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21187    fi
21188  fi
21189
21190  # Now new_path has a complete unix path to the binary
21191  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21192    # Keep paths in /bin as-is, but remove trailing .exe if any
21193    new_path="${new_path/%.exe/}"
21194    # Do not save /bin paths to all_fixpath_prefixes!
21195  else
21196    # Not in mixed or Windows style, start by that.
21197    new_path=`cmd //c echo $new_path`
21198
21199  input_path="$new_path"
21200  # Check if we need to convert this using DOS-style short mode. If the path
21201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21202  # take no chances and rewrite it.
21203  # Note: m4 eats our [], so we need to use [ and ] instead.
21204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21205  if test "x$has_forbidden_chars" != x; then
21206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21208  fi
21209
21210    # Output is in $new_path
21211
21212  windows_path="$new_path"
21213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21214    unix_path=`$CYGPATH -u "$windows_path"`
21215    new_path="$unix_path"
21216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21218    new_path="$unix_path"
21219  fi
21220
21221    # remove trailing .exe if any
21222    new_path="${new_path/%.exe/}"
21223
21224    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21225    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21226  fi
21227
21228  else
21229    # We're on a posix platform. Hooray! :)
21230    # First separate the path from the arguments. This will split at the first
21231    # space.
21232    complete="$PROPER_COMPILER_CXX"
21233    path="${complete%% *}"
21234    tmp="$complete EOL"
21235    arguments="${tmp#* }"
21236
21237    # Cannot rely on the command "which" here since it doesn't always work.
21238    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21239    if test -z "$is_absolute_path"; then
21240      # Path to executable is not absolute. Find it.
21241      IFS_save="$IFS"
21242      IFS=:
21243      for p in $PATH; do
21244        if test -f "$p/$path" && test -x "$p/$path"; then
21245          new_path="$p/$path"
21246          break
21247        fi
21248      done
21249      IFS="$IFS_save"
21250    else
21251      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21252$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21253      new_path="$path"
21254    fi
21255
21256    if test "x$new_path" = x; then
21257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21258$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21259        has_space=`$ECHO "$complete" | $GREP " "`
21260        if test "x$has_space" != x; then
21261          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21262$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21263        fi
21264        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21265      fi
21266  fi
21267
21268      # Now join together the path and the arguments once again
21269      if test "x$arguments" != xEOL; then
21270        new_complete="$new_path ${arguments% *}"
21271      else
21272        new_complete="$new_path"
21273      fi
21274
21275  if test "x$complete" != "x$new_complete"; then
21276      PROPER_COMPILER_CXX="$new_complete"
21277      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21278$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21279    fi
21280
21281    PATH="$RETRY_COMPILER_SAVED_PATH"
21282
21283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21284$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21285
21286    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21287        # Follow a chain of symbolic links. Use readlink
21288        # where it exists, else fall back to horribly
21289        # complicated shell code.
21290        if test "x$READLINK_TESTED" != yes; then
21291            # On MacOSX there is a readlink tool with a different
21292            # purpose than the GNU readlink tool. Check the found readlink.
21293            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21294            if test "x$ISGNU" = x; then
21295                 # A readlink that we do not know how to use.
21296                 # Are there other non-GNU readlinks out there?
21297                 READLINK_TESTED=yes
21298                 READLINK=
21299            fi
21300        fi
21301
21302        if test "x$READLINK" != x; then
21303            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21304        else
21305            # Save the current directory for restoring afterwards
21306            STARTDIR=$PWD
21307            COUNTER=0
21308            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21309            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21310            cd $sym_link_dir
21311            # Use -P flag to resolve symlinks in directories.
21312            cd `$THEPWDCMD -P`
21313            sym_link_dir=`$THEPWDCMD -P`
21314            # Resolve file symlinks
21315            while test $COUNTER -lt 20; do
21316                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21317                if test "x$ISLINK" == x; then
21318                    # This is not a symbolic link! We are done!
21319                    break
21320                fi
21321                # Again resolve directory symlinks since the target of the just found
21322                # link could be in a different directory
21323                cd `$DIRNAME $ISLINK`
21324                sym_link_dir=`$THEPWDCMD -P`
21325                sym_link_file=`$BASENAME $ISLINK`
21326                let COUNTER=COUNTER+1
21327            done
21328            cd $STARTDIR
21329            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21330        fi
21331    fi
21332
21333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21334$as_echo "$PROPER_COMPILER_CXX" >&6; }
21335    CXX="$PROPER_COMPILER_CXX"
21336  else
21337    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21338$as_echo "no, keeping CXX" >&6; }
21339    CXX="$TEST_COMPILER"
21340  fi
21341
21342  COMPILER=$CXX
21343  COMPILER_NAME=$COMPILER_NAME
21344
21345  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21346    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21347    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21348    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21349    if test $? -ne 0; then
21350      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21351
21352      { $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
21353$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21354      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21355$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21356      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21357    else
21358      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21359      COMPILER_VENDOR="Sun Studio"
21360    fi
21361  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21362    # First line typically looks something like:
21363    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21364    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21365    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21366    COMPILER_VENDOR="Microsoft CL.EXE"
21367    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21368    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21369      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21370        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21371      fi
21372    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21373      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21374        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21375      fi
21376    fi
21377  else
21378    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21379    # Check that this is likely to be GCC.
21380    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21381    if test $? -ne 0; then
21382      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21383$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21384      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21385$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21386      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21387    fi
21388
21389    # First line typically looks something like:
21390    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21391    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21392    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21393  fi
21394  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21395  CXX_VERSION="$COMPILER_VERSION"
21396  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21397  CXX_VENDOR="$COMPILER_VENDOR"
21398
21399  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21400$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21401
21402
21403# Now that we have resolved CXX ourself, let autoconf have its go at it
21404ac_ext=cpp
21405ac_cpp='$CXXCPP $CPPFLAGS'
21406ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21407ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21408ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21409if test -z "$CXX"; then
21410  if test -n "$CCC"; then
21411    CXX=$CCC
21412  else
21413    if test -n "$ac_tool_prefix"; then
21414  for ac_prog in $CXX
21415  do
21416    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21417set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21419$as_echo_n "checking for $ac_word... " >&6; }
21420if test "${ac_cv_prog_CXX+set}" = set; then :
21421  $as_echo_n "(cached) " >&6
21422else
21423  if test -n "$CXX"; then
21424  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21425else
21426as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21427for as_dir in $PATH
21428do
21429  IFS=$as_save_IFS
21430  test -z "$as_dir" && as_dir=.
21431    for ac_exec_ext in '' $ac_executable_extensions; do
21432  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21433    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21435    break 2
21436  fi
21437done
21438  done
21439IFS=$as_save_IFS
21440
21441fi
21442fi
21443CXX=$ac_cv_prog_CXX
21444if test -n "$CXX"; then
21445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21446$as_echo "$CXX" >&6; }
21447else
21448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21449$as_echo "no" >&6; }
21450fi
21451
21452
21453    test -n "$CXX" && break
21454  done
21455fi
21456if test -z "$CXX"; then
21457  ac_ct_CXX=$CXX
21458  for ac_prog in $CXX
21459do
21460  # Extract the first word of "$ac_prog", so it can be a program name with args.
21461set dummy $ac_prog; ac_word=$2
21462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21463$as_echo_n "checking for $ac_word... " >&6; }
21464if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21465  $as_echo_n "(cached) " >&6
21466else
21467  if test -n "$ac_ct_CXX"; then
21468  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21469else
21470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21471for as_dir in $PATH
21472do
21473  IFS=$as_save_IFS
21474  test -z "$as_dir" && as_dir=.
21475    for ac_exec_ext in '' $ac_executable_extensions; do
21476  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21477    ac_cv_prog_ac_ct_CXX="$ac_prog"
21478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21479    break 2
21480  fi
21481done
21482  done
21483IFS=$as_save_IFS
21484
21485fi
21486fi
21487ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21488if test -n "$ac_ct_CXX"; then
21489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21490$as_echo "$ac_ct_CXX" >&6; }
21491else
21492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21493$as_echo "no" >&6; }
21494fi
21495
21496
21497  test -n "$ac_ct_CXX" && break
21498done
21499
21500  if test "x$ac_ct_CXX" = x; then
21501    CXX="g++"
21502  else
21503    case $cross_compiling:$ac_tool_warned in
21504yes:)
21505{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21506$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21507ac_tool_warned=yes ;;
21508esac
21509    CXX=$ac_ct_CXX
21510  fi
21511fi
21512
21513  fi
21514fi
21515# Provide some information about the compiler.
21516$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21517set X $ac_compile
21518ac_compiler=$2
21519for ac_option in --version -v -V -qversion; do
21520  { { ac_try="$ac_compiler $ac_option >&5"
21521case "(($ac_try" in
21522  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21523  *) ac_try_echo=$ac_try;;
21524esac
21525eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21526$as_echo "$ac_try_echo"; } >&5
21527  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21528  ac_status=$?
21529  if test -s conftest.err; then
21530    sed '10a\
21531... rest of stderr output deleted ...
21532         10q' conftest.err >conftest.er1
21533    cat conftest.er1 >&5
21534  fi
21535  rm -f conftest.er1 conftest.err
21536  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21537  test $ac_status = 0; }
21538done
21539
21540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21541$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21542if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21543  $as_echo_n "(cached) " >&6
21544else
21545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21546/* end confdefs.h.  */
21547
21548int
21549main ()
21550{
21551#ifndef __GNUC__
21552       choke me
21553#endif
21554
21555  ;
21556  return 0;
21557}
21558_ACEOF
21559if ac_fn_cxx_try_compile "$LINENO"; then :
21560  ac_compiler_gnu=yes
21561else
21562  ac_compiler_gnu=no
21563fi
21564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21565ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21566
21567fi
21568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21569$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21570if test $ac_compiler_gnu = yes; then
21571  GXX=yes
21572else
21573  GXX=
21574fi
21575ac_test_CXXFLAGS=${CXXFLAGS+set}
21576ac_save_CXXFLAGS=$CXXFLAGS
21577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21578$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21579if test "${ac_cv_prog_cxx_g+set}" = set; then :
21580  $as_echo_n "(cached) " >&6
21581else
21582  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21583   ac_cxx_werror_flag=yes
21584   ac_cv_prog_cxx_g=no
21585   CXXFLAGS="-g"
21586   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21587/* end confdefs.h.  */
21588
21589int
21590main ()
21591{
21592
21593  ;
21594  return 0;
21595}
21596_ACEOF
21597if ac_fn_cxx_try_compile "$LINENO"; then :
21598  ac_cv_prog_cxx_g=yes
21599else
21600  CXXFLAGS=""
21601      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21602/* end confdefs.h.  */
21603
21604int
21605main ()
21606{
21607
21608  ;
21609  return 0;
21610}
21611_ACEOF
21612if ac_fn_cxx_try_compile "$LINENO"; then :
21613
21614else
21615  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21616	 CXXFLAGS="-g"
21617	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21618/* end confdefs.h.  */
21619
21620int
21621main ()
21622{
21623
21624  ;
21625  return 0;
21626}
21627_ACEOF
21628if ac_fn_cxx_try_compile "$LINENO"; then :
21629  ac_cv_prog_cxx_g=yes
21630fi
21631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21632fi
21633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21634fi
21635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21636   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21637fi
21638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21639$as_echo "$ac_cv_prog_cxx_g" >&6; }
21640if test "$ac_test_CXXFLAGS" = set; then
21641  CXXFLAGS=$ac_save_CXXFLAGS
21642elif test $ac_cv_prog_cxx_g = yes; then
21643  if test "$GXX" = yes; then
21644    CXXFLAGS="-g -O2"
21645  else
21646    CXXFLAGS="-g"
21647  fi
21648else
21649  if test "$GXX" = yes; then
21650    CXXFLAGS="-O2"
21651  else
21652    CXXFLAGS=
21653  fi
21654fi
21655ac_ext=cpp
21656ac_cpp='$CXXCPP $CPPFLAGS'
21657ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21658ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21659ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21660
21661
21662### Locate other tools
21663
21664if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21665    ac_ext=m
21666ac_cpp='$OBJCPP $CPPFLAGS'
21667ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21668ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21669ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21670if test -n "$ac_tool_prefix"; then
21671  for ac_prog in gcc objcc objc cc CC
21672  do
21673    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21674set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21676$as_echo_n "checking for $ac_word... " >&6; }
21677if test "${ac_cv_prog_OBJC+set}" = set; then :
21678  $as_echo_n "(cached) " >&6
21679else
21680  if test -n "$OBJC"; then
21681  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21682else
21683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21684for as_dir in $PATH
21685do
21686  IFS=$as_save_IFS
21687  test -z "$as_dir" && as_dir=.
21688    for ac_exec_ext in '' $ac_executable_extensions; do
21689  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21690    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21692    break 2
21693  fi
21694done
21695  done
21696IFS=$as_save_IFS
21697
21698fi
21699fi
21700OBJC=$ac_cv_prog_OBJC
21701if test -n "$OBJC"; then
21702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21703$as_echo "$OBJC" >&6; }
21704else
21705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21706$as_echo "no" >&6; }
21707fi
21708
21709
21710    test -n "$OBJC" && break
21711  done
21712fi
21713if test -z "$OBJC"; then
21714  ac_ct_OBJC=$OBJC
21715  for ac_prog in gcc objcc objc cc CC
21716do
21717  # Extract the first word of "$ac_prog", so it can be a program name with args.
21718set dummy $ac_prog; ac_word=$2
21719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21720$as_echo_n "checking for $ac_word... " >&6; }
21721if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21722  $as_echo_n "(cached) " >&6
21723else
21724  if test -n "$ac_ct_OBJC"; then
21725  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21726else
21727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21728for as_dir in $PATH
21729do
21730  IFS=$as_save_IFS
21731  test -z "$as_dir" && as_dir=.
21732    for ac_exec_ext in '' $ac_executable_extensions; do
21733  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21734    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21736    break 2
21737  fi
21738done
21739  done
21740IFS=$as_save_IFS
21741
21742fi
21743fi
21744ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21745if test -n "$ac_ct_OBJC"; then
21746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21747$as_echo "$ac_ct_OBJC" >&6; }
21748else
21749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21750$as_echo "no" >&6; }
21751fi
21752
21753
21754  test -n "$ac_ct_OBJC" && break
21755done
21756
21757  if test "x$ac_ct_OBJC" = x; then
21758    OBJC="gcc"
21759  else
21760    case $cross_compiling:$ac_tool_warned in
21761yes:)
21762{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21763$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21764ac_tool_warned=yes ;;
21765esac
21766    OBJC=$ac_ct_OBJC
21767  fi
21768fi
21769
21770# Provide some information about the compiler.
21771$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21772set X $ac_compile
21773ac_compiler=$2
21774for ac_option in --version -v -V -qversion; do
21775  { { ac_try="$ac_compiler $ac_option >&5"
21776case "(($ac_try" in
21777  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21778  *) ac_try_echo=$ac_try;;
21779esac
21780eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21781$as_echo "$ac_try_echo"; } >&5
21782  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21783  ac_status=$?
21784  if test -s conftest.err; then
21785    sed '10a\
21786... rest of stderr output deleted ...
21787         10q' conftest.err >conftest.er1
21788    cat conftest.er1 >&5
21789  fi
21790  rm -f conftest.er1 conftest.err
21791  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21792  test $ac_status = 0; }
21793done
21794
21795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21796$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21797if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21798  $as_echo_n "(cached) " >&6
21799else
21800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21801/* end confdefs.h.  */
21802
21803int
21804main ()
21805{
21806#ifndef __GNUC__
21807       choke me
21808#endif
21809
21810  ;
21811  return 0;
21812}
21813_ACEOF
21814if ac_fn_objc_try_compile "$LINENO"; then :
21815  ac_compiler_gnu=yes
21816else
21817  ac_compiler_gnu=no
21818fi
21819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21820ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21821
21822fi
21823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21824$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21825if test $ac_compiler_gnu = yes; then
21826  GOBJC=yes
21827else
21828  GOBJC=
21829fi
21830ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21831ac_save_OBJCFLAGS=$OBJCFLAGS
21832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21833$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21834if test "${ac_cv_prog_objc_g+set}" = set; then :
21835  $as_echo_n "(cached) " >&6
21836else
21837  ac_save_objc_werror_flag=$ac_objc_werror_flag
21838   ac_objc_werror_flag=yes
21839   ac_cv_prog_objc_g=no
21840   OBJCFLAGS="-g"
21841   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21842/* end confdefs.h.  */
21843
21844int
21845main ()
21846{
21847
21848  ;
21849  return 0;
21850}
21851_ACEOF
21852if ac_fn_objc_try_compile "$LINENO"; then :
21853  ac_cv_prog_objc_g=yes
21854else
21855  OBJCFLAGS=""
21856      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21857/* end confdefs.h.  */
21858
21859int
21860main ()
21861{
21862
21863  ;
21864  return 0;
21865}
21866_ACEOF
21867if ac_fn_objc_try_compile "$LINENO"; then :
21868
21869else
21870  ac_objc_werror_flag=$ac_save_objc_werror_flag
21871	 OBJCFLAGS="-g"
21872	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21873/* end confdefs.h.  */
21874
21875int
21876main ()
21877{
21878
21879  ;
21880  return 0;
21881}
21882_ACEOF
21883if ac_fn_objc_try_compile "$LINENO"; then :
21884  ac_cv_prog_objc_g=yes
21885fi
21886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21887fi
21888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21889fi
21890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21891   ac_objc_werror_flag=$ac_save_objc_werror_flag
21892fi
21893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21894$as_echo "$ac_cv_prog_objc_g" >&6; }
21895if test "$ac_test_OBJCFLAGS" = set; then
21896  OBJCFLAGS=$ac_save_OBJCFLAGS
21897elif test $ac_cv_prog_objc_g = yes; then
21898  if test "$GOBJC" = yes; then
21899    OBJCFLAGS="-g -O2"
21900  else
21901    OBJCFLAGS="-g"
21902  fi
21903else
21904  if test "$GOBJC" = yes; then
21905    OBJCFLAGS="-O2"
21906  else
21907    OBJCFLAGS=
21908  fi
21909fi
21910ac_ext=cpp
21911ac_cpp='$CXXCPP $CPPFLAGS'
21912ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21913ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21914ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21915
21916
21917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21918
21919  # First separate the path from the arguments. This will split at the first
21920  # space.
21921  complete="$OBJC"
21922  path="${complete%% *}"
21923  tmp="$complete EOL"
21924  arguments="${tmp#* }"
21925
21926  # Input might be given as Windows format, start by converting to
21927  # unix format.
21928  new_path=`$CYGPATH -u "$path"`
21929
21930  # Now try to locate executable using which
21931  new_path=`$WHICH "$new_path" 2> /dev/null`
21932  # bat and cmd files are not always considered executable in cygwin causing which
21933  # to not find them
21934  if test "x$new_path" = x \
21935           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21936           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21937    new_path=`$CYGPATH -u "$path"`
21938  fi
21939  if test "x$new_path" = x; then
21940    # Oops. Which didn't find the executable.
21941    # The splitting of arguments from the executable at a space might have been incorrect,
21942    # since paths with space are more likely in Windows. Give it another try with the whole
21943    # argument.
21944    path="$complete"
21945    arguments="EOL"
21946    new_path=`$CYGPATH -u "$path"`
21947    new_path=`$WHICH "$new_path" 2> /dev/null`
21948    # bat and cmd files are not always considered executable in cygwin causing which
21949    # to not find them
21950    if test "x$new_path" = x \
21951             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21952             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21953      new_path=`$CYGPATH -u "$path"`
21954    fi
21955    if test "x$new_path" = x; then
21956      # It's still not found. Now this is an unrecoverable error.
21957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21958$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21959      has_space=`$ECHO "$complete" | $GREP " "`
21960      if test "x$has_space" != x; then
21961        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21962$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21963      fi
21964      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21965    fi
21966  fi
21967
21968  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21969  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21970  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21971  # "foo.exe" is OK but "foo" is an error.
21972  #
21973  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21974  # It is also a way to make sure we got the proper file name for the real test later on.
21975  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21976  if test "x$test_shortpath" = x; then
21977    # Short path failed, file does not exist as specified.
21978    # Try adding .exe or .cmd
21979    if test -f "${new_path}.exe"; then
21980       input_to_shortpath="${new_path}.exe"
21981    elif test -f "${new_path}.cmd"; then
21982       input_to_shortpath="${new_path}.cmd"
21983    else
21984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21985$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21986      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21987$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21988      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21989    fi
21990  else
21991    input_to_shortpath="$new_path"
21992  fi
21993
21994  # Call helper function which possibly converts this using DOS-style short mode.
21995  # If so, the updated path is stored in $new_path.
21996  new_path="$input_to_shortpath"
21997
21998  input_path="$input_to_shortpath"
21999  # Check if we need to convert this using DOS-style short mode. If the path
22000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22001  # take no chances and rewrite it.
22002  # Note: m4 eats our [], so we need to use [ and ] instead.
22003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22004  if test "x$has_forbidden_chars" != x; then
22005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22006    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22007    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22008    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22009      # Going to short mode and back again did indeed matter. Since short mode is
22010      # case insensitive, let's make it lowercase to improve readability.
22011      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22012      # Now convert it back to Unix-stile (cygpath)
22013      input_path=`$CYGPATH -u "$shortmode_path"`
22014      new_path="$input_path"
22015    fi
22016  fi
22017
22018  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22019  if test "x$test_cygdrive_prefix" = x; then
22020    # As a simple fix, exclude /usr/bin since it's not a real path.
22021    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22022      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22023      # a path prefixed by /cygdrive for fixpath to work.
22024      new_path="$CYGWIN_ROOT_PATH$input_path"
22025    fi
22026  fi
22027
22028  # remove trailing .exe if any
22029  new_path="${new_path/%.exe/}"
22030
22031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22032
22033  # First separate the path from the arguments. This will split at the first
22034  # space.
22035  complete="$OBJC"
22036  path="${complete%% *}"
22037  tmp="$complete EOL"
22038  arguments="${tmp#* }"
22039
22040  # Input might be given as Windows format, start by converting to
22041  # unix format.
22042  new_path="$path"
22043
22044  windows_path="$new_path"
22045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22046    unix_path=`$CYGPATH -u "$windows_path"`
22047    new_path="$unix_path"
22048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22050    new_path="$unix_path"
22051  fi
22052
22053
22054  # Now try to locate executable using which
22055  new_path=`$WHICH "$new_path" 2> /dev/null`
22056
22057  if test "x$new_path" = x; then
22058    # Oops. Which didn't find the executable.
22059    # The splitting of arguments from the executable at a space might have been incorrect,
22060    # since paths with space are more likely in Windows. Give it another try with the whole
22061    # argument.
22062    path="$complete"
22063    arguments="EOL"
22064    new_path="$path"
22065
22066  windows_path="$new_path"
22067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22068    unix_path=`$CYGPATH -u "$windows_path"`
22069    new_path="$unix_path"
22070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22072    new_path="$unix_path"
22073  fi
22074
22075
22076    new_path=`$WHICH "$new_path" 2> /dev/null`
22077
22078    if test "x$new_path" = x; then
22079      # It's still not found. Now this is an unrecoverable error.
22080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22081$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22082      has_space=`$ECHO "$complete" | $GREP " "`
22083      if test "x$has_space" != x; then
22084        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22085$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22086      fi
22087      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22088    fi
22089  fi
22090
22091  # Now new_path has a complete unix path to the binary
22092  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22093    # Keep paths in /bin as-is, but remove trailing .exe if any
22094    new_path="${new_path/%.exe/}"
22095    # Do not save /bin paths to all_fixpath_prefixes!
22096  else
22097    # Not in mixed or Windows style, start by that.
22098    new_path=`cmd //c echo $new_path`
22099
22100  input_path="$new_path"
22101  # Check if we need to convert this using DOS-style short mode. If the path
22102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22103  # take no chances and rewrite it.
22104  # Note: m4 eats our [], so we need to use [ and ] instead.
22105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22106  if test "x$has_forbidden_chars" != x; then
22107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22109  fi
22110
22111    # Output is in $new_path
22112
22113  windows_path="$new_path"
22114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22115    unix_path=`$CYGPATH -u "$windows_path"`
22116    new_path="$unix_path"
22117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22119    new_path="$unix_path"
22120  fi
22121
22122    # remove trailing .exe if any
22123    new_path="${new_path/%.exe/}"
22124
22125    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22126    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22127  fi
22128
22129  else
22130    # We're on a posix platform. Hooray! :)
22131    # First separate the path from the arguments. This will split at the first
22132    # space.
22133    complete="$OBJC"
22134    path="${complete%% *}"
22135    tmp="$complete EOL"
22136    arguments="${tmp#* }"
22137
22138    # Cannot rely on the command "which" here since it doesn't always work.
22139    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22140    if test -z "$is_absolute_path"; then
22141      # Path to executable is not absolute. Find it.
22142      IFS_save="$IFS"
22143      IFS=:
22144      for p in $PATH; do
22145        if test -f "$p/$path" && test -x "$p/$path"; then
22146          new_path="$p/$path"
22147          break
22148        fi
22149      done
22150      IFS="$IFS_save"
22151    else
22152      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22153$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22154      new_path="$path"
22155    fi
22156
22157    if test "x$new_path" = x; then
22158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22159$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22160        has_space=`$ECHO "$complete" | $GREP " "`
22161        if test "x$has_space" != x; then
22162          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22163$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22164        fi
22165        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22166      fi
22167  fi
22168
22169      # Now join together the path and the arguments once again
22170      if test "x$arguments" != xEOL; then
22171        new_complete="$new_path ${arguments% *}"
22172      else
22173        new_complete="$new_path"
22174      fi
22175
22176  if test "x$complete" != "x$new_complete"; then
22177      OBJC="$new_complete"
22178      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22179$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22180    fi
22181
22182else
22183    OBJC=
22184fi
22185
22186# Restore the flags to the user specified values.
22187# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22188CFLAGS="$ORG_CFLAGS"
22189CXXFLAGS="$ORG_CXXFLAGS"
22190OBJCFLAGS="$ORG_OBJCFLAGS"
22191
22192LD="$CC"
22193LDEXE="$CC"
22194LDCXX="$CXX"
22195LDEXECXX="$CXX"
22196
22197# LDEXE is the linker to use, when creating executables.
22198
22199# Linking C++ libraries.
22200
22201# Linking C++ executables.
22202
22203
22204if test "x$OPENJDK_TARGET_OS" != xwindows; then
22205    if test -n "$ac_tool_prefix"; then
22206  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22207set dummy ${ac_tool_prefix}ar; ac_word=$2
22208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22209$as_echo_n "checking for $ac_word... " >&6; }
22210if test "${ac_cv_prog_AR+set}" = set; then :
22211  $as_echo_n "(cached) " >&6
22212else
22213  if test -n "$AR"; then
22214  ac_cv_prog_AR="$AR" # Let the user override the test.
22215else
22216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22217for as_dir in $PATH
22218do
22219  IFS=$as_save_IFS
22220  test -z "$as_dir" && as_dir=.
22221    for ac_exec_ext in '' $ac_executable_extensions; do
22222  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22223    ac_cv_prog_AR="${ac_tool_prefix}ar"
22224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22225    break 2
22226  fi
22227done
22228  done
22229IFS=$as_save_IFS
22230
22231fi
22232fi
22233AR=$ac_cv_prog_AR
22234if test -n "$AR"; then
22235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22236$as_echo "$AR" >&6; }
22237else
22238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22239$as_echo "no" >&6; }
22240fi
22241
22242
22243fi
22244if test -z "$ac_cv_prog_AR"; then
22245  ac_ct_AR=$AR
22246  # Extract the first word of "ar", so it can be a program name with args.
22247set dummy ar; ac_word=$2
22248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22249$as_echo_n "checking for $ac_word... " >&6; }
22250if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22251  $as_echo_n "(cached) " >&6
22252else
22253  if test -n "$ac_ct_AR"; then
22254  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22255else
22256as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22257for as_dir in $PATH
22258do
22259  IFS=$as_save_IFS
22260  test -z "$as_dir" && as_dir=.
22261    for ac_exec_ext in '' $ac_executable_extensions; do
22262  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22263    ac_cv_prog_ac_ct_AR="ar"
22264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22265    break 2
22266  fi
22267done
22268  done
22269IFS=$as_save_IFS
22270
22271fi
22272fi
22273ac_ct_AR=$ac_cv_prog_ac_ct_AR
22274if test -n "$ac_ct_AR"; then
22275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22276$as_echo "$ac_ct_AR" >&6; }
22277else
22278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22279$as_echo "no" >&6; }
22280fi
22281
22282  if test "x$ac_ct_AR" = x; then
22283    AR=""
22284  else
22285    case $cross_compiling:$ac_tool_warned in
22286yes:)
22287{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22288$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22289ac_tool_warned=yes ;;
22290esac
22291    AR=$ac_ct_AR
22292  fi
22293else
22294  AR="$ac_cv_prog_AR"
22295fi
22296
22297
22298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22299
22300  # First separate the path from the arguments. This will split at the first
22301  # space.
22302  complete="$AR"
22303  path="${complete%% *}"
22304  tmp="$complete EOL"
22305  arguments="${tmp#* }"
22306
22307  # Input might be given as Windows format, start by converting to
22308  # unix format.
22309  new_path=`$CYGPATH -u "$path"`
22310
22311  # Now try to locate executable using which
22312  new_path=`$WHICH "$new_path" 2> /dev/null`
22313  # bat and cmd files are not always considered executable in cygwin causing which
22314  # to not find them
22315  if test "x$new_path" = x \
22316           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22317           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22318    new_path=`$CYGPATH -u "$path"`
22319  fi
22320  if test "x$new_path" = x; then
22321    # Oops. Which didn't find the executable.
22322    # The splitting of arguments from the executable at a space might have been incorrect,
22323    # since paths with space are more likely in Windows. Give it another try with the whole
22324    # argument.
22325    path="$complete"
22326    arguments="EOL"
22327    new_path=`$CYGPATH -u "$path"`
22328    new_path=`$WHICH "$new_path" 2> /dev/null`
22329    # bat and cmd files are not always considered executable in cygwin causing which
22330    # to not find them
22331    if test "x$new_path" = x \
22332             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22333             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22334      new_path=`$CYGPATH -u "$path"`
22335    fi
22336    if test "x$new_path" = x; then
22337      # It's still not found. Now this is an unrecoverable error.
22338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22339$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22340      has_space=`$ECHO "$complete" | $GREP " "`
22341      if test "x$has_space" != x; then
22342        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22343$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22344      fi
22345      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22346    fi
22347  fi
22348
22349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22352  # "foo.exe" is OK but "foo" is an error.
22353  #
22354  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22355  # It is also a way to make sure we got the proper file name for the real test later on.
22356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22357  if test "x$test_shortpath" = x; then
22358    # Short path failed, file does not exist as specified.
22359    # Try adding .exe or .cmd
22360    if test -f "${new_path}.exe"; then
22361       input_to_shortpath="${new_path}.exe"
22362    elif test -f "${new_path}.cmd"; then
22363       input_to_shortpath="${new_path}.cmd"
22364    else
22365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22366$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22367      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22368$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22369      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22370    fi
22371  else
22372    input_to_shortpath="$new_path"
22373  fi
22374
22375  # Call helper function which possibly converts this using DOS-style short mode.
22376  # If so, the updated path is stored in $new_path.
22377  new_path="$input_to_shortpath"
22378
22379  input_path="$input_to_shortpath"
22380  # Check if we need to convert this using DOS-style short mode. If the path
22381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22382  # take no chances and rewrite it.
22383  # Note: m4 eats our [], so we need to use [ and ] instead.
22384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22385  if test "x$has_forbidden_chars" != x; then
22386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22390      # Going to short mode and back again did indeed matter. Since short mode is
22391      # case insensitive, let's make it lowercase to improve readability.
22392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22393      # Now convert it back to Unix-stile (cygpath)
22394      input_path=`$CYGPATH -u "$shortmode_path"`
22395      new_path="$input_path"
22396    fi
22397  fi
22398
22399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22400  if test "x$test_cygdrive_prefix" = x; then
22401    # As a simple fix, exclude /usr/bin since it's not a real path.
22402    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22404      # a path prefixed by /cygdrive for fixpath to work.
22405      new_path="$CYGWIN_ROOT_PATH$input_path"
22406    fi
22407  fi
22408
22409  # remove trailing .exe if any
22410  new_path="${new_path/%.exe/}"
22411
22412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22413
22414  # First separate the path from the arguments. This will split at the first
22415  # space.
22416  complete="$AR"
22417  path="${complete%% *}"
22418  tmp="$complete EOL"
22419  arguments="${tmp#* }"
22420
22421  # Input might be given as Windows format, start by converting to
22422  # unix format.
22423  new_path="$path"
22424
22425  windows_path="$new_path"
22426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22427    unix_path=`$CYGPATH -u "$windows_path"`
22428    new_path="$unix_path"
22429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22431    new_path="$unix_path"
22432  fi
22433
22434
22435  # Now try to locate executable using which
22436  new_path=`$WHICH "$new_path" 2> /dev/null`
22437
22438  if test "x$new_path" = x; then
22439    # Oops. Which didn't find the executable.
22440    # The splitting of arguments from the executable at a space might have been incorrect,
22441    # since paths with space are more likely in Windows. Give it another try with the whole
22442    # argument.
22443    path="$complete"
22444    arguments="EOL"
22445    new_path="$path"
22446
22447  windows_path="$new_path"
22448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22449    unix_path=`$CYGPATH -u "$windows_path"`
22450    new_path="$unix_path"
22451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22453    new_path="$unix_path"
22454  fi
22455
22456
22457    new_path=`$WHICH "$new_path" 2> /dev/null`
22458
22459    if test "x$new_path" = x; then
22460      # It's still not found. Now this is an unrecoverable error.
22461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22462$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22463      has_space=`$ECHO "$complete" | $GREP " "`
22464      if test "x$has_space" != x; then
22465        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22466$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22467      fi
22468      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22469    fi
22470  fi
22471
22472  # Now new_path has a complete unix path to the binary
22473  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22474    # Keep paths in /bin as-is, but remove trailing .exe if any
22475    new_path="${new_path/%.exe/}"
22476    # Do not save /bin paths to all_fixpath_prefixes!
22477  else
22478    # Not in mixed or Windows style, start by that.
22479    new_path=`cmd //c echo $new_path`
22480
22481  input_path="$new_path"
22482  # Check if we need to convert this using DOS-style short mode. If the path
22483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22484  # take no chances and rewrite it.
22485  # Note: m4 eats our [], so we need to use [ and ] instead.
22486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22487  if test "x$has_forbidden_chars" != x; then
22488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22490  fi
22491
22492    # Output is in $new_path
22493
22494  windows_path="$new_path"
22495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22496    unix_path=`$CYGPATH -u "$windows_path"`
22497    new_path="$unix_path"
22498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22500    new_path="$unix_path"
22501  fi
22502
22503    # remove trailing .exe if any
22504    new_path="${new_path/%.exe/}"
22505
22506    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22507    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22508  fi
22509
22510  else
22511    # We're on a posix platform. Hooray! :)
22512    # First separate the path from the arguments. This will split at the first
22513    # space.
22514    complete="$AR"
22515    path="${complete%% *}"
22516    tmp="$complete EOL"
22517    arguments="${tmp#* }"
22518
22519    # Cannot rely on the command "which" here since it doesn't always work.
22520    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22521    if test -z "$is_absolute_path"; then
22522      # Path to executable is not absolute. Find it.
22523      IFS_save="$IFS"
22524      IFS=:
22525      for p in $PATH; do
22526        if test -f "$p/$path" && test -x "$p/$path"; then
22527          new_path="$p/$path"
22528          break
22529        fi
22530      done
22531      IFS="$IFS_save"
22532    else
22533      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22534$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22535      new_path="$path"
22536    fi
22537
22538    if test "x$new_path" = x; then
22539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22540$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22541        has_space=`$ECHO "$complete" | $GREP " "`
22542        if test "x$has_space" != x; then
22543          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22544$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22545        fi
22546        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22547      fi
22548  fi
22549
22550      # Now join together the path and the arguments once again
22551      if test "x$arguments" != xEOL; then
22552        new_complete="$new_path ${arguments% *}"
22553      else
22554        new_complete="$new_path"
22555      fi
22556
22557  if test "x$complete" != "x$new_complete"; then
22558      AR="$new_complete"
22559      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22560$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22561    fi
22562
22563fi
22564if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22565    ARFLAGS="-r"
22566else
22567    ARFLAGS=""
22568fi
22569
22570
22571# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22572HOTSPOT_CXX="$CXX"
22573HOTSPOT_LD="$LD"
22574
22575
22576
22577COMPILER_NAME=gcc
22578COMPILER_TYPE=CC
22579if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22580
22581    # For now, assume that we are always compiling using cl.exe.
22582    CC_OUT_OPTION=-Fo
22583    EXE_OUT_OPTION=-out:
22584    LD_OUT_OPTION=-out:
22585    AR_OUT_OPTION=-out:
22586    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22587    # program for something completely different.
22588    # Extract the first word of "link", so it can be a program name with args.
22589set dummy link; ac_word=$2
22590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22591$as_echo_n "checking for $ac_word... " >&6; }
22592if test "${ac_cv_prog_WINLD+set}" = set; then :
22593  $as_echo_n "(cached) " >&6
22594else
22595  if test -n "$WINLD"; then
22596  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22597else
22598  ac_prog_rejected=no
22599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22600for as_dir in $PATH
22601do
22602  IFS=$as_save_IFS
22603  test -z "$as_dir" && as_dir=.
22604    for ac_exec_ext in '' $ac_executable_extensions; do
22605  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22606    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22607       ac_prog_rejected=yes
22608       continue
22609     fi
22610    ac_cv_prog_WINLD="link"
22611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22612    break 2
22613  fi
22614done
22615  done
22616IFS=$as_save_IFS
22617
22618if test $ac_prog_rejected = yes; then
22619  # We found a bogon in the path, so make sure we never use it.
22620  set dummy $ac_cv_prog_WINLD
22621  shift
22622  if test $# != 0; then
22623    # We chose a different compiler from the bogus one.
22624    # However, it has the same basename, so the bogon will be chosen
22625    # first if we set WINLD to just the basename; use the full file name.
22626    shift
22627    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22628  fi
22629fi
22630fi
22631fi
22632WINLD=$ac_cv_prog_WINLD
22633if test -n "$WINLD"; then
22634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22635$as_echo "$WINLD" >&6; }
22636else
22637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22638$as_echo "no" >&6; }
22639fi
22640
22641
22642    # Since we must ignore the first found link, WINLD will contain
22643    # the full path to the link.exe program.
22644
22645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22646
22647  # First separate the path from the arguments. This will split at the first
22648  # space.
22649  complete="$WINLD"
22650  path="${complete%% *}"
22651  tmp="$complete EOL"
22652  arguments="${tmp#* }"
22653
22654  # Input might be given as Windows format, start by converting to
22655  # unix format.
22656  new_path=`$CYGPATH -u "$path"`
22657
22658  # Now try to locate executable using which
22659  new_path=`$WHICH "$new_path" 2> /dev/null`
22660  # bat and cmd files are not always considered executable in cygwin causing which
22661  # to not find them
22662  if test "x$new_path" = x \
22663           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22664           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22665    new_path=`$CYGPATH -u "$path"`
22666  fi
22667  if test "x$new_path" = x; then
22668    # Oops. Which didn't find the executable.
22669    # The splitting of arguments from the executable at a space might have been incorrect,
22670    # since paths with space are more likely in Windows. Give it another try with the whole
22671    # argument.
22672    path="$complete"
22673    arguments="EOL"
22674    new_path=`$CYGPATH -u "$path"`
22675    new_path=`$WHICH "$new_path" 2> /dev/null`
22676    # bat and cmd files are not always considered executable in cygwin causing which
22677    # to not find them
22678    if test "x$new_path" = x \
22679             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22680             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22681      new_path=`$CYGPATH -u "$path"`
22682    fi
22683    if test "x$new_path" = x; then
22684      # It's still not found. Now this is an unrecoverable error.
22685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22686$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22687      has_space=`$ECHO "$complete" | $GREP " "`
22688      if test "x$has_space" != x; then
22689        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22690$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22691      fi
22692      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22693    fi
22694  fi
22695
22696  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22697  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22698  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22699  # "foo.exe" is OK but "foo" is an error.
22700  #
22701  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22702  # It is also a way to make sure we got the proper file name for the real test later on.
22703  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22704  if test "x$test_shortpath" = x; then
22705    # Short path failed, file does not exist as specified.
22706    # Try adding .exe or .cmd
22707    if test -f "${new_path}.exe"; then
22708       input_to_shortpath="${new_path}.exe"
22709    elif test -f "${new_path}.cmd"; then
22710       input_to_shortpath="${new_path}.cmd"
22711    else
22712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22713$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22714      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22715$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22716      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22717    fi
22718  else
22719    input_to_shortpath="$new_path"
22720  fi
22721
22722  # Call helper function which possibly converts this using DOS-style short mode.
22723  # If so, the updated path is stored in $new_path.
22724  new_path="$input_to_shortpath"
22725
22726  input_path="$input_to_shortpath"
22727  # Check if we need to convert this using DOS-style short mode. If the path
22728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22729  # take no chances and rewrite it.
22730  # Note: m4 eats our [], so we need to use [ and ] instead.
22731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22732  if test "x$has_forbidden_chars" != x; then
22733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22734    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22735    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22736    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22737      # Going to short mode and back again did indeed matter. Since short mode is
22738      # case insensitive, let's make it lowercase to improve readability.
22739      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22740      # Now convert it back to Unix-stile (cygpath)
22741      input_path=`$CYGPATH -u "$shortmode_path"`
22742      new_path="$input_path"
22743    fi
22744  fi
22745
22746  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22747  if test "x$test_cygdrive_prefix" = x; then
22748    # As a simple fix, exclude /usr/bin since it's not a real path.
22749    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22750      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22751      # a path prefixed by /cygdrive for fixpath to work.
22752      new_path="$CYGWIN_ROOT_PATH$input_path"
22753    fi
22754  fi
22755
22756  # remove trailing .exe if any
22757  new_path="${new_path/%.exe/}"
22758
22759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22760
22761  # First separate the path from the arguments. This will split at the first
22762  # space.
22763  complete="$WINLD"
22764  path="${complete%% *}"
22765  tmp="$complete EOL"
22766  arguments="${tmp#* }"
22767
22768  # Input might be given as Windows format, start by converting to
22769  # unix format.
22770  new_path="$path"
22771
22772  windows_path="$new_path"
22773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22774    unix_path=`$CYGPATH -u "$windows_path"`
22775    new_path="$unix_path"
22776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22778    new_path="$unix_path"
22779  fi
22780
22781
22782  # Now try to locate executable using which
22783  new_path=`$WHICH "$new_path" 2> /dev/null`
22784
22785  if test "x$new_path" = x; then
22786    # Oops. Which didn't find the executable.
22787    # The splitting of arguments from the executable at a space might have been incorrect,
22788    # since paths with space are more likely in Windows. Give it another try with the whole
22789    # argument.
22790    path="$complete"
22791    arguments="EOL"
22792    new_path="$path"
22793
22794  windows_path="$new_path"
22795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22796    unix_path=`$CYGPATH -u "$windows_path"`
22797    new_path="$unix_path"
22798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22800    new_path="$unix_path"
22801  fi
22802
22803
22804    new_path=`$WHICH "$new_path" 2> /dev/null`
22805
22806    if test "x$new_path" = x; then
22807      # It's still not found. Now this is an unrecoverable error.
22808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22809$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22810      has_space=`$ECHO "$complete" | $GREP " "`
22811      if test "x$has_space" != x; then
22812        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22813$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22814      fi
22815      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22816    fi
22817  fi
22818
22819  # Now new_path has a complete unix path to the binary
22820  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22821    # Keep paths in /bin as-is, but remove trailing .exe if any
22822    new_path="${new_path/%.exe/}"
22823    # Do not save /bin paths to all_fixpath_prefixes!
22824  else
22825    # Not in mixed or Windows style, start by that.
22826    new_path=`cmd //c echo $new_path`
22827
22828  input_path="$new_path"
22829  # Check if we need to convert this using DOS-style short mode. If the path
22830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22831  # take no chances and rewrite it.
22832  # Note: m4 eats our [], so we need to use [ and ] instead.
22833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22834  if test "x$has_forbidden_chars" != x; then
22835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22836    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22837  fi
22838
22839    # Output is in $new_path
22840
22841  windows_path="$new_path"
22842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22843    unix_path=`$CYGPATH -u "$windows_path"`
22844    new_path="$unix_path"
22845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22847    new_path="$unix_path"
22848  fi
22849
22850    # remove trailing .exe if any
22851    new_path="${new_path/%.exe/}"
22852
22853    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22854    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22855  fi
22856
22857  else
22858    # We're on a posix platform. Hooray! :)
22859    # First separate the path from the arguments. This will split at the first
22860    # space.
22861    complete="$WINLD"
22862    path="${complete%% *}"
22863    tmp="$complete EOL"
22864    arguments="${tmp#* }"
22865
22866    # Cannot rely on the command "which" here since it doesn't always work.
22867    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22868    if test -z "$is_absolute_path"; then
22869      # Path to executable is not absolute. Find it.
22870      IFS_save="$IFS"
22871      IFS=:
22872      for p in $PATH; do
22873        if test -f "$p/$path" && test -x "$p/$path"; then
22874          new_path="$p/$path"
22875          break
22876        fi
22877      done
22878      IFS="$IFS_save"
22879    else
22880      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22881$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22882      new_path="$path"
22883    fi
22884
22885    if test "x$new_path" = x; then
22886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22887$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22888        has_space=`$ECHO "$complete" | $GREP " "`
22889        if test "x$has_space" != x; then
22890          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22891$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22892        fi
22893        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22894      fi
22895  fi
22896
22897      # Now join together the path and the arguments once again
22898      if test "x$arguments" != xEOL; then
22899        new_complete="$new_path ${arguments% *}"
22900      else
22901        new_complete="$new_path"
22902      fi
22903
22904  if test "x$complete" != "x$new_complete"; then
22905      WINLD="$new_complete"
22906      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22907$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22908    fi
22909
22910    printf "Windows linker was found at $WINLD\n"
22911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22912$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22913    "$WINLD" --version > /dev/null
22914    if test $? -eq 0 ; then
22915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22916$as_echo "no" >&6; }
22917      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22918    else
22919      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22920$as_echo "yes" >&6; }
22921    fi
22922    LD="$WINLD"
22923    LDEXE="$WINLD"
22924    LDCXX="$WINLD"
22925    LDEXECXX="$WINLD"
22926
22927    # Extract the first word of "mt", so it can be a program name with args.
22928set dummy mt; ac_word=$2
22929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22930$as_echo_n "checking for $ac_word... " >&6; }
22931if test "${ac_cv_prog_MT+set}" = set; then :
22932  $as_echo_n "(cached) " >&6
22933else
22934  if test -n "$MT"; then
22935  ac_cv_prog_MT="$MT" # Let the user override the test.
22936else
22937  ac_prog_rejected=no
22938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22939for as_dir in $PATH
22940do
22941  IFS=$as_save_IFS
22942  test -z "$as_dir" && as_dir=.
22943    for ac_exec_ext in '' $ac_executable_extensions; do
22944  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22945    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22946       ac_prog_rejected=yes
22947       continue
22948     fi
22949    ac_cv_prog_MT="mt"
22950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22951    break 2
22952  fi
22953done
22954  done
22955IFS=$as_save_IFS
22956
22957if test $ac_prog_rejected = yes; then
22958  # We found a bogon in the path, so make sure we never use it.
22959  set dummy $ac_cv_prog_MT
22960  shift
22961  if test $# != 0; then
22962    # We chose a different compiler from the bogus one.
22963    # However, it has the same basename, so the bogon will be chosen
22964    # first if we set MT to just the basename; use the full file name.
22965    shift
22966    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22967  fi
22968fi
22969fi
22970fi
22971MT=$ac_cv_prog_MT
22972if test -n "$MT"; then
22973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22974$as_echo "$MT" >&6; }
22975else
22976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22977$as_echo "no" >&6; }
22978fi
22979
22980
22981
22982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22983
22984  # First separate the path from the arguments. This will split at the first
22985  # space.
22986  complete="$MT"
22987  path="${complete%% *}"
22988  tmp="$complete EOL"
22989  arguments="${tmp#* }"
22990
22991  # Input might be given as Windows format, start by converting to
22992  # unix format.
22993  new_path=`$CYGPATH -u "$path"`
22994
22995  # Now try to locate executable using which
22996  new_path=`$WHICH "$new_path" 2> /dev/null`
22997  # bat and cmd files are not always considered executable in cygwin causing which
22998  # to not find them
22999  if test "x$new_path" = x \
23000           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23001           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23002    new_path=`$CYGPATH -u "$path"`
23003  fi
23004  if test "x$new_path" = x; then
23005    # Oops. Which didn't find the executable.
23006    # The splitting of arguments from the executable at a space might have been incorrect,
23007    # since paths with space are more likely in Windows. Give it another try with the whole
23008    # argument.
23009    path="$complete"
23010    arguments="EOL"
23011    new_path=`$CYGPATH -u "$path"`
23012    new_path=`$WHICH "$new_path" 2> /dev/null`
23013    # bat and cmd files are not always considered executable in cygwin causing which
23014    # to not find them
23015    if test "x$new_path" = x \
23016             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23017             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23018      new_path=`$CYGPATH -u "$path"`
23019    fi
23020    if test "x$new_path" = x; then
23021      # It's still not found. Now this is an unrecoverable error.
23022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23023$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23024      has_space=`$ECHO "$complete" | $GREP " "`
23025      if test "x$has_space" != x; then
23026        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23027$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23028      fi
23029      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23030    fi
23031  fi
23032
23033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23036  # "foo.exe" is OK but "foo" is an error.
23037  #
23038  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23039  # It is also a way to make sure we got the proper file name for the real test later on.
23040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23041  if test "x$test_shortpath" = x; then
23042    # Short path failed, file does not exist as specified.
23043    # Try adding .exe or .cmd
23044    if test -f "${new_path}.exe"; then
23045       input_to_shortpath="${new_path}.exe"
23046    elif test -f "${new_path}.cmd"; then
23047       input_to_shortpath="${new_path}.cmd"
23048    else
23049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23050$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23051      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23052$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23053      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23054    fi
23055  else
23056    input_to_shortpath="$new_path"
23057  fi
23058
23059  # Call helper function which possibly converts this using DOS-style short mode.
23060  # If so, the updated path is stored in $new_path.
23061  new_path="$input_to_shortpath"
23062
23063  input_path="$input_to_shortpath"
23064  # Check if we need to convert this using DOS-style short mode. If the path
23065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23066  # take no chances and rewrite it.
23067  # Note: m4 eats our [], so we need to use [ and ] instead.
23068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23069  if test "x$has_forbidden_chars" != x; then
23070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23074      # Going to short mode and back again did indeed matter. Since short mode is
23075      # case insensitive, let's make it lowercase to improve readability.
23076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23077      # Now convert it back to Unix-stile (cygpath)
23078      input_path=`$CYGPATH -u "$shortmode_path"`
23079      new_path="$input_path"
23080    fi
23081  fi
23082
23083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23084  if test "x$test_cygdrive_prefix" = x; then
23085    # As a simple fix, exclude /usr/bin since it's not a real path.
23086    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23088      # a path prefixed by /cygdrive for fixpath to work.
23089      new_path="$CYGWIN_ROOT_PATH$input_path"
23090    fi
23091  fi
23092
23093  # remove trailing .exe if any
23094  new_path="${new_path/%.exe/}"
23095
23096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23097
23098  # First separate the path from the arguments. This will split at the first
23099  # space.
23100  complete="$MT"
23101  path="${complete%% *}"
23102  tmp="$complete EOL"
23103  arguments="${tmp#* }"
23104
23105  # Input might be given as Windows format, start by converting to
23106  # unix format.
23107  new_path="$path"
23108
23109  windows_path="$new_path"
23110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23111    unix_path=`$CYGPATH -u "$windows_path"`
23112    new_path="$unix_path"
23113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23115    new_path="$unix_path"
23116  fi
23117
23118
23119  # Now try to locate executable using which
23120  new_path=`$WHICH "$new_path" 2> /dev/null`
23121
23122  if test "x$new_path" = x; then
23123    # Oops. Which didn't find the executable.
23124    # The splitting of arguments from the executable at a space might have been incorrect,
23125    # since paths with space are more likely in Windows. Give it another try with the whole
23126    # argument.
23127    path="$complete"
23128    arguments="EOL"
23129    new_path="$path"
23130
23131  windows_path="$new_path"
23132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23133    unix_path=`$CYGPATH -u "$windows_path"`
23134    new_path="$unix_path"
23135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23137    new_path="$unix_path"
23138  fi
23139
23140
23141    new_path=`$WHICH "$new_path" 2> /dev/null`
23142
23143    if test "x$new_path" = x; then
23144      # It's still not found. Now this is an unrecoverable error.
23145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23146$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23147      has_space=`$ECHO "$complete" | $GREP " "`
23148      if test "x$has_space" != x; then
23149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23151      fi
23152      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23153    fi
23154  fi
23155
23156  # Now new_path has a complete unix path to the binary
23157  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23158    # Keep paths in /bin as-is, but remove trailing .exe if any
23159    new_path="${new_path/%.exe/}"
23160    # Do not save /bin paths to all_fixpath_prefixes!
23161  else
23162    # Not in mixed or Windows style, start by that.
23163    new_path=`cmd //c echo $new_path`
23164
23165  input_path="$new_path"
23166  # Check if we need to convert this using DOS-style short mode. If the path
23167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23168  # take no chances and rewrite it.
23169  # Note: m4 eats our [], so we need to use [ and ] instead.
23170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23171  if test "x$has_forbidden_chars" != x; then
23172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23174  fi
23175
23176    # Output is in $new_path
23177
23178  windows_path="$new_path"
23179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23180    unix_path=`$CYGPATH -u "$windows_path"`
23181    new_path="$unix_path"
23182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23184    new_path="$unix_path"
23185  fi
23186
23187    # remove trailing .exe if any
23188    new_path="${new_path/%.exe/}"
23189
23190    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23191    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23192  fi
23193
23194  else
23195    # We're on a posix platform. Hooray! :)
23196    # First separate the path from the arguments. This will split at the first
23197    # space.
23198    complete="$MT"
23199    path="${complete%% *}"
23200    tmp="$complete EOL"
23201    arguments="${tmp#* }"
23202
23203    # Cannot rely on the command "which" here since it doesn't always work.
23204    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23205    if test -z "$is_absolute_path"; then
23206      # Path to executable is not absolute. Find it.
23207      IFS_save="$IFS"
23208      IFS=:
23209      for p in $PATH; do
23210        if test -f "$p/$path" && test -x "$p/$path"; then
23211          new_path="$p/$path"
23212          break
23213        fi
23214      done
23215      IFS="$IFS_save"
23216    else
23217      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23218$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23219      new_path="$path"
23220    fi
23221
23222    if test "x$new_path" = x; then
23223        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23224$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23225        has_space=`$ECHO "$complete" | $GREP " "`
23226        if test "x$has_space" != x; then
23227          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23228$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23229        fi
23230        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23231      fi
23232  fi
23233
23234      # Now join together the path and the arguments once again
23235      if test "x$arguments" != xEOL; then
23236        new_complete="$new_path ${arguments% *}"
23237      else
23238        new_complete="$new_path"
23239      fi
23240
23241  if test "x$complete" != "x$new_complete"; then
23242      MT="$new_complete"
23243      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23244$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23245    fi
23246
23247    # The resource compiler
23248    # Extract the first word of "rc", so it can be a program name with args.
23249set dummy rc; ac_word=$2
23250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23251$as_echo_n "checking for $ac_word... " >&6; }
23252if test "${ac_cv_prog_RC+set}" = set; then :
23253  $as_echo_n "(cached) " >&6
23254else
23255  if test -n "$RC"; then
23256  ac_cv_prog_RC="$RC" # Let the user override the test.
23257else
23258  ac_prog_rejected=no
23259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23260for as_dir in $PATH
23261do
23262  IFS=$as_save_IFS
23263  test -z "$as_dir" && as_dir=.
23264    for ac_exec_ext in '' $ac_executable_extensions; do
23265  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23266    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23267       ac_prog_rejected=yes
23268       continue
23269     fi
23270    ac_cv_prog_RC="rc"
23271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23272    break 2
23273  fi
23274done
23275  done
23276IFS=$as_save_IFS
23277
23278if test $ac_prog_rejected = yes; then
23279  # We found a bogon in the path, so make sure we never use it.
23280  set dummy $ac_cv_prog_RC
23281  shift
23282  if test $# != 0; then
23283    # We chose a different compiler from the bogus one.
23284    # However, it has the same basename, so the bogon will be chosen
23285    # first if we set RC to just the basename; use the full file name.
23286    shift
23287    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23288  fi
23289fi
23290fi
23291fi
23292RC=$ac_cv_prog_RC
23293if test -n "$RC"; then
23294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23295$as_echo "$RC" >&6; }
23296else
23297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23298$as_echo "no" >&6; }
23299fi
23300
23301
23302
23303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23304
23305  # First separate the path from the arguments. This will split at the first
23306  # space.
23307  complete="$RC"
23308  path="${complete%% *}"
23309  tmp="$complete EOL"
23310  arguments="${tmp#* }"
23311
23312  # Input might be given as Windows format, start by converting to
23313  # unix format.
23314  new_path=`$CYGPATH -u "$path"`
23315
23316  # Now try to locate executable using which
23317  new_path=`$WHICH "$new_path" 2> /dev/null`
23318  # bat and cmd files are not always considered executable in cygwin causing which
23319  # to not find them
23320  if test "x$new_path" = x \
23321           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23322           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23323    new_path=`$CYGPATH -u "$path"`
23324  fi
23325  if test "x$new_path" = x; then
23326    # Oops. Which didn't find the executable.
23327    # The splitting of arguments from the executable at a space might have been incorrect,
23328    # since paths with space are more likely in Windows. Give it another try with the whole
23329    # argument.
23330    path="$complete"
23331    arguments="EOL"
23332    new_path=`$CYGPATH -u "$path"`
23333    new_path=`$WHICH "$new_path" 2> /dev/null`
23334    # bat and cmd files are not always considered executable in cygwin causing which
23335    # to not find them
23336    if test "x$new_path" = x \
23337             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23338             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23339      new_path=`$CYGPATH -u "$path"`
23340    fi
23341    if test "x$new_path" = x; then
23342      # It's still not found. Now this is an unrecoverable error.
23343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23344$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23345      has_space=`$ECHO "$complete" | $GREP " "`
23346      if test "x$has_space" != x; then
23347        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23348$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23349      fi
23350      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23351    fi
23352  fi
23353
23354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23357  # "foo.exe" is OK but "foo" is an error.
23358  #
23359  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23360  # It is also a way to make sure we got the proper file name for the real test later on.
23361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23362  if test "x$test_shortpath" = x; then
23363    # Short path failed, file does not exist as specified.
23364    # Try adding .exe or .cmd
23365    if test -f "${new_path}.exe"; then
23366       input_to_shortpath="${new_path}.exe"
23367    elif test -f "${new_path}.cmd"; then
23368       input_to_shortpath="${new_path}.cmd"
23369    else
23370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23371$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23372      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23373$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23374      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23375    fi
23376  else
23377    input_to_shortpath="$new_path"
23378  fi
23379
23380  # Call helper function which possibly converts this using DOS-style short mode.
23381  # If so, the updated path is stored in $new_path.
23382  new_path="$input_to_shortpath"
23383
23384  input_path="$input_to_shortpath"
23385  # Check if we need to convert this using DOS-style short mode. If the path
23386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23387  # take no chances and rewrite it.
23388  # Note: m4 eats our [], so we need to use [ and ] instead.
23389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23390  if test "x$has_forbidden_chars" != x; then
23391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23395      # Going to short mode and back again did indeed matter. Since short mode is
23396      # case insensitive, let's make it lowercase to improve readability.
23397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23398      # Now convert it back to Unix-stile (cygpath)
23399      input_path=`$CYGPATH -u "$shortmode_path"`
23400      new_path="$input_path"
23401    fi
23402  fi
23403
23404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23405  if test "x$test_cygdrive_prefix" = x; then
23406    # As a simple fix, exclude /usr/bin since it's not a real path.
23407    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23409      # a path prefixed by /cygdrive for fixpath to work.
23410      new_path="$CYGWIN_ROOT_PATH$input_path"
23411    fi
23412  fi
23413
23414  # remove trailing .exe if any
23415  new_path="${new_path/%.exe/}"
23416
23417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23418
23419  # First separate the path from the arguments. This will split at the first
23420  # space.
23421  complete="$RC"
23422  path="${complete%% *}"
23423  tmp="$complete EOL"
23424  arguments="${tmp#* }"
23425
23426  # Input might be given as Windows format, start by converting to
23427  # unix format.
23428  new_path="$path"
23429
23430  windows_path="$new_path"
23431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23432    unix_path=`$CYGPATH -u "$windows_path"`
23433    new_path="$unix_path"
23434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23436    new_path="$unix_path"
23437  fi
23438
23439
23440  # Now try to locate executable using which
23441  new_path=`$WHICH "$new_path" 2> /dev/null`
23442
23443  if test "x$new_path" = x; then
23444    # Oops. Which didn't find the executable.
23445    # The splitting of arguments from the executable at a space might have been incorrect,
23446    # since paths with space are more likely in Windows. Give it another try with the whole
23447    # argument.
23448    path="$complete"
23449    arguments="EOL"
23450    new_path="$path"
23451
23452  windows_path="$new_path"
23453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23454    unix_path=`$CYGPATH -u "$windows_path"`
23455    new_path="$unix_path"
23456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23458    new_path="$unix_path"
23459  fi
23460
23461
23462    new_path=`$WHICH "$new_path" 2> /dev/null`
23463
23464    if test "x$new_path" = x; then
23465      # It's still not found. Now this is an unrecoverable error.
23466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23467$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23468      has_space=`$ECHO "$complete" | $GREP " "`
23469      if test "x$has_space" != x; then
23470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23472      fi
23473      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23474    fi
23475  fi
23476
23477  # Now new_path has a complete unix path to the binary
23478  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23479    # Keep paths in /bin as-is, but remove trailing .exe if any
23480    new_path="${new_path/%.exe/}"
23481    # Do not save /bin paths to all_fixpath_prefixes!
23482  else
23483    # Not in mixed or Windows style, start by that.
23484    new_path=`cmd //c echo $new_path`
23485
23486  input_path="$new_path"
23487  # Check if we need to convert this using DOS-style short mode. If the path
23488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23489  # take no chances and rewrite it.
23490  # Note: m4 eats our [], so we need to use [ and ] instead.
23491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23492  if test "x$has_forbidden_chars" != x; then
23493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23495  fi
23496
23497    # Output is in $new_path
23498
23499  windows_path="$new_path"
23500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23501    unix_path=`$CYGPATH -u "$windows_path"`
23502    new_path="$unix_path"
23503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23505    new_path="$unix_path"
23506  fi
23507
23508    # remove trailing .exe if any
23509    new_path="${new_path/%.exe/}"
23510
23511    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23512    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23513  fi
23514
23515  else
23516    # We're on a posix platform. Hooray! :)
23517    # First separate the path from the arguments. This will split at the first
23518    # space.
23519    complete="$RC"
23520    path="${complete%% *}"
23521    tmp="$complete EOL"
23522    arguments="${tmp#* }"
23523
23524    # Cannot rely on the command "which" here since it doesn't always work.
23525    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23526    if test -z "$is_absolute_path"; then
23527      # Path to executable is not absolute. Find it.
23528      IFS_save="$IFS"
23529      IFS=:
23530      for p in $PATH; do
23531        if test -f "$p/$path" && test -x "$p/$path"; then
23532          new_path="$p/$path"
23533          break
23534        fi
23535      done
23536      IFS="$IFS_save"
23537    else
23538      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23539$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23540      new_path="$path"
23541    fi
23542
23543    if test "x$new_path" = x; then
23544        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23545$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23546        has_space=`$ECHO "$complete" | $GREP " "`
23547        if test "x$has_space" != x; then
23548          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23549$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23550        fi
23551        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23552      fi
23553  fi
23554
23555      # Now join together the path and the arguments once again
23556      if test "x$arguments" != xEOL; then
23557        new_complete="$new_path ${arguments% *}"
23558      else
23559        new_complete="$new_path"
23560      fi
23561
23562  if test "x$complete" != "x$new_complete"; then
23563      RC="$new_complete"
23564      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23565$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23566    fi
23567
23568
23569    # For hotspot, we need these in Windows mixed path,
23570    # so rewrite them all. Need added .exe suffix.
23571    HOTSPOT_CXX="$CXX.exe"
23572    HOTSPOT_LD="$LD.exe"
23573    HOTSPOT_MT="$MT.exe"
23574    HOTSPOT_RC="$RC.exe"
23575
23576  unix_path="$HOTSPOT_CXX"
23577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23578    windows_path=`$CYGPATH -m "$unix_path"`
23579    HOTSPOT_CXX="$windows_path"
23580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23581    windows_path=`cmd //c echo $unix_path`
23582    HOTSPOT_CXX="$windows_path"
23583  fi
23584
23585
23586  unix_path="$HOTSPOT_LD"
23587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23588    windows_path=`$CYGPATH -m "$unix_path"`
23589    HOTSPOT_LD="$windows_path"
23590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23591    windows_path=`cmd //c echo $unix_path`
23592    HOTSPOT_LD="$windows_path"
23593  fi
23594
23595
23596  unix_path="$HOTSPOT_MT"
23597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23598    windows_path=`$CYGPATH -m "$unix_path"`
23599    HOTSPOT_MT="$windows_path"
23600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23601    windows_path=`cmd //c echo $unix_path`
23602    HOTSPOT_MT="$windows_path"
23603  fi
23604
23605
23606  unix_path="$HOTSPOT_RC"
23607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23608    windows_path=`$CYGPATH -m "$unix_path"`
23609    HOTSPOT_RC="$windows_path"
23610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23611    windows_path=`cmd //c echo $unix_path`
23612    HOTSPOT_RC="$windows_path"
23613  fi
23614
23615
23616
23617
23618    RC_FLAGS="-nologo -l 0x409 -r"
23619    if test "x$VARIANT" = xOPT; then :
23620
23621        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23622
23623fi
23624    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23625    if test "x$JDK_UPDATE_VERSION" = x; then :
23626
23627        JDK_UPDATE_VERSION_NOTNULL=0
23628
23629fi
23630    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23631    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23632    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23633    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23634    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23635    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23636    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23637
23638    # lib.exe is used to create static libraries.
23639    # Extract the first word of "lib", so it can be a program name with args.
23640set dummy lib; ac_word=$2
23641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23642$as_echo_n "checking for $ac_word... " >&6; }
23643if test "${ac_cv_prog_WINAR+set}" = set; then :
23644  $as_echo_n "(cached) " >&6
23645else
23646  if test -n "$WINAR"; then
23647  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23648else
23649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23650for as_dir in $PATH
23651do
23652  IFS=$as_save_IFS
23653  test -z "$as_dir" && as_dir=.
23654    for ac_exec_ext in '' $ac_executable_extensions; do
23655  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23656    ac_cv_prog_WINAR="lib"
23657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23658    break 2
23659  fi
23660done
23661  done
23662IFS=$as_save_IFS
23663
23664fi
23665fi
23666WINAR=$ac_cv_prog_WINAR
23667if test -n "$WINAR"; then
23668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23669$as_echo "$WINAR" >&6; }
23670else
23671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23672$as_echo "no" >&6; }
23673fi
23674
23675
23676
23677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23678
23679  # First separate the path from the arguments. This will split at the first
23680  # space.
23681  complete="$WINAR"
23682  path="${complete%% *}"
23683  tmp="$complete EOL"
23684  arguments="${tmp#* }"
23685
23686  # Input might be given as Windows format, start by converting to
23687  # unix format.
23688  new_path=`$CYGPATH -u "$path"`
23689
23690  # Now try to locate executable using which
23691  new_path=`$WHICH "$new_path" 2> /dev/null`
23692  # bat and cmd files are not always considered executable in cygwin causing which
23693  # to not find them
23694  if test "x$new_path" = x \
23695           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23696           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23697    new_path=`$CYGPATH -u "$path"`
23698  fi
23699  if test "x$new_path" = x; then
23700    # Oops. Which didn't find the executable.
23701    # The splitting of arguments from the executable at a space might have been incorrect,
23702    # since paths with space are more likely in Windows. Give it another try with the whole
23703    # argument.
23704    path="$complete"
23705    arguments="EOL"
23706    new_path=`$CYGPATH -u "$path"`
23707    new_path=`$WHICH "$new_path" 2> /dev/null`
23708    # bat and cmd files are not always considered executable in cygwin causing which
23709    # to not find them
23710    if test "x$new_path" = x \
23711             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23712             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23713      new_path=`$CYGPATH -u "$path"`
23714    fi
23715    if test "x$new_path" = x; then
23716      # It's still not found. Now this is an unrecoverable error.
23717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23718$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23719      has_space=`$ECHO "$complete" | $GREP " "`
23720      if test "x$has_space" != x; then
23721        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23722$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23723      fi
23724      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23725    fi
23726  fi
23727
23728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23731  # "foo.exe" is OK but "foo" is an error.
23732  #
23733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23734  # It is also a way to make sure we got the proper file name for the real test later on.
23735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23736  if test "x$test_shortpath" = x; then
23737    # Short path failed, file does not exist as specified.
23738    # Try adding .exe or .cmd
23739    if test -f "${new_path}.exe"; then
23740       input_to_shortpath="${new_path}.exe"
23741    elif test -f "${new_path}.cmd"; then
23742       input_to_shortpath="${new_path}.cmd"
23743    else
23744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23745$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23746      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23747$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23748      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23749    fi
23750  else
23751    input_to_shortpath="$new_path"
23752  fi
23753
23754  # Call helper function which possibly converts this using DOS-style short mode.
23755  # If so, the updated path is stored in $new_path.
23756  new_path="$input_to_shortpath"
23757
23758  input_path="$input_to_shortpath"
23759  # Check if we need to convert this using DOS-style short mode. If the path
23760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23761  # take no chances and rewrite it.
23762  # Note: m4 eats our [], so we need to use [ and ] instead.
23763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23764  if test "x$has_forbidden_chars" != x; then
23765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23769      # Going to short mode and back again did indeed matter. Since short mode is
23770      # case insensitive, let's make it lowercase to improve readability.
23771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23772      # Now convert it back to Unix-stile (cygpath)
23773      input_path=`$CYGPATH -u "$shortmode_path"`
23774      new_path="$input_path"
23775    fi
23776  fi
23777
23778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23779  if test "x$test_cygdrive_prefix" = x; then
23780    # As a simple fix, exclude /usr/bin since it's not a real path.
23781    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23783      # a path prefixed by /cygdrive for fixpath to work.
23784      new_path="$CYGWIN_ROOT_PATH$input_path"
23785    fi
23786  fi
23787
23788  # remove trailing .exe if any
23789  new_path="${new_path/%.exe/}"
23790
23791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23792
23793  # First separate the path from the arguments. This will split at the first
23794  # space.
23795  complete="$WINAR"
23796  path="${complete%% *}"
23797  tmp="$complete EOL"
23798  arguments="${tmp#* }"
23799
23800  # Input might be given as Windows format, start by converting to
23801  # unix format.
23802  new_path="$path"
23803
23804  windows_path="$new_path"
23805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23806    unix_path=`$CYGPATH -u "$windows_path"`
23807    new_path="$unix_path"
23808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23810    new_path="$unix_path"
23811  fi
23812
23813
23814  # Now try to locate executable using which
23815  new_path=`$WHICH "$new_path" 2> /dev/null`
23816
23817  if test "x$new_path" = x; then
23818    # Oops. Which didn't find the executable.
23819    # The splitting of arguments from the executable at a space might have been incorrect,
23820    # since paths with space are more likely in Windows. Give it another try with the whole
23821    # argument.
23822    path="$complete"
23823    arguments="EOL"
23824    new_path="$path"
23825
23826  windows_path="$new_path"
23827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23828    unix_path=`$CYGPATH -u "$windows_path"`
23829    new_path="$unix_path"
23830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23832    new_path="$unix_path"
23833  fi
23834
23835
23836    new_path=`$WHICH "$new_path" 2> /dev/null`
23837
23838    if test "x$new_path" = x; then
23839      # It's still not found. Now this is an unrecoverable error.
23840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23841$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23842      has_space=`$ECHO "$complete" | $GREP " "`
23843      if test "x$has_space" != x; then
23844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23846      fi
23847      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23848    fi
23849  fi
23850
23851  # Now new_path has a complete unix path to the binary
23852  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23853    # Keep paths in /bin as-is, but remove trailing .exe if any
23854    new_path="${new_path/%.exe/}"
23855    # Do not save /bin paths to all_fixpath_prefixes!
23856  else
23857    # Not in mixed or Windows style, start by that.
23858    new_path=`cmd //c echo $new_path`
23859
23860  input_path="$new_path"
23861  # Check if we need to convert this using DOS-style short mode. If the path
23862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23863  # take no chances and rewrite it.
23864  # Note: m4 eats our [], so we need to use [ and ] instead.
23865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23866  if test "x$has_forbidden_chars" != x; then
23867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23869  fi
23870
23871    # Output is in $new_path
23872
23873  windows_path="$new_path"
23874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23875    unix_path=`$CYGPATH -u "$windows_path"`
23876    new_path="$unix_path"
23877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23879    new_path="$unix_path"
23880  fi
23881
23882    # remove trailing .exe if any
23883    new_path="${new_path/%.exe/}"
23884
23885    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23886    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23887  fi
23888
23889  else
23890    # We're on a posix platform. Hooray! :)
23891    # First separate the path from the arguments. This will split at the first
23892    # space.
23893    complete="$WINAR"
23894    path="${complete%% *}"
23895    tmp="$complete EOL"
23896    arguments="${tmp#* }"
23897
23898    # Cannot rely on the command "which" here since it doesn't always work.
23899    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23900    if test -z "$is_absolute_path"; then
23901      # Path to executable is not absolute. Find it.
23902      IFS_save="$IFS"
23903      IFS=:
23904      for p in $PATH; do
23905        if test -f "$p/$path" && test -x "$p/$path"; then
23906          new_path="$p/$path"
23907          break
23908        fi
23909      done
23910      IFS="$IFS_save"
23911    else
23912      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23913$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23914      new_path="$path"
23915    fi
23916
23917    if test "x$new_path" = x; then
23918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23919$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23920        has_space=`$ECHO "$complete" | $GREP " "`
23921        if test "x$has_space" != x; then
23922          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23923$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23924        fi
23925        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23926      fi
23927  fi
23928
23929      # Now join together the path and the arguments once again
23930      if test "x$arguments" != xEOL; then
23931        new_complete="$new_path ${arguments% *}"
23932      else
23933        new_complete="$new_path"
23934      fi
23935
23936  if test "x$complete" != "x$new_complete"; then
23937      WINAR="$new_complete"
23938      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23939$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23940    fi
23941
23942    AR="$WINAR"
23943    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23944
23945    # Extract the first word of "dumpbin", so it can be a program name with args.
23946set dummy dumpbin; ac_word=$2
23947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23948$as_echo_n "checking for $ac_word... " >&6; }
23949if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23950  $as_echo_n "(cached) " >&6
23951else
23952  if test -n "$DUMPBIN"; then
23953  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23954else
23955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23956for as_dir in $PATH
23957do
23958  IFS=$as_save_IFS
23959  test -z "$as_dir" && as_dir=.
23960    for ac_exec_ext in '' $ac_executable_extensions; do
23961  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23962    ac_cv_prog_DUMPBIN="dumpbin"
23963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23964    break 2
23965  fi
23966done
23967  done
23968IFS=$as_save_IFS
23969
23970fi
23971fi
23972DUMPBIN=$ac_cv_prog_DUMPBIN
23973if test -n "$DUMPBIN"; then
23974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23975$as_echo "$DUMPBIN" >&6; }
23976else
23977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23978$as_echo "no" >&6; }
23979fi
23980
23981
23982
23983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23984
23985  # First separate the path from the arguments. This will split at the first
23986  # space.
23987  complete="$DUMPBIN"
23988  path="${complete%% *}"
23989  tmp="$complete EOL"
23990  arguments="${tmp#* }"
23991
23992  # Input might be given as Windows format, start by converting to
23993  # unix format.
23994  new_path=`$CYGPATH -u "$path"`
23995
23996  # Now try to locate executable using which
23997  new_path=`$WHICH "$new_path" 2> /dev/null`
23998  # bat and cmd files are not always considered executable in cygwin causing which
23999  # to not find them
24000  if test "x$new_path" = x \
24001           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24002           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24003    new_path=`$CYGPATH -u "$path"`
24004  fi
24005  if test "x$new_path" = x; then
24006    # Oops. Which didn't find the executable.
24007    # The splitting of arguments from the executable at a space might have been incorrect,
24008    # since paths with space are more likely in Windows. Give it another try with the whole
24009    # argument.
24010    path="$complete"
24011    arguments="EOL"
24012    new_path=`$CYGPATH -u "$path"`
24013    new_path=`$WHICH "$new_path" 2> /dev/null`
24014    # bat and cmd files are not always considered executable in cygwin causing which
24015    # to not find them
24016    if test "x$new_path" = x \
24017             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24018             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24019      new_path=`$CYGPATH -u "$path"`
24020    fi
24021    if test "x$new_path" = x; then
24022      # It's still not found. Now this is an unrecoverable error.
24023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24024$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24025      has_space=`$ECHO "$complete" | $GREP " "`
24026      if test "x$has_space" != x; then
24027        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24028$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24029      fi
24030      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24031    fi
24032  fi
24033
24034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24037  # "foo.exe" is OK but "foo" is an error.
24038  #
24039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24040  # It is also a way to make sure we got the proper file name for the real test later on.
24041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24042  if test "x$test_shortpath" = x; then
24043    # Short path failed, file does not exist as specified.
24044    # Try adding .exe or .cmd
24045    if test -f "${new_path}.exe"; then
24046       input_to_shortpath="${new_path}.exe"
24047    elif test -f "${new_path}.cmd"; then
24048       input_to_shortpath="${new_path}.cmd"
24049    else
24050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24051$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24052      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24053$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24054      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24055    fi
24056  else
24057    input_to_shortpath="$new_path"
24058  fi
24059
24060  # Call helper function which possibly converts this using DOS-style short mode.
24061  # If so, the updated path is stored in $new_path.
24062  new_path="$input_to_shortpath"
24063
24064  input_path="$input_to_shortpath"
24065  # Check if we need to convert this using DOS-style short mode. If the path
24066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24067  # take no chances and rewrite it.
24068  # Note: m4 eats our [], so we need to use [ and ] instead.
24069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24070  if test "x$has_forbidden_chars" != x; then
24071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24075      # Going to short mode and back again did indeed matter. Since short mode is
24076      # case insensitive, let's make it lowercase to improve readability.
24077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24078      # Now convert it back to Unix-stile (cygpath)
24079      input_path=`$CYGPATH -u "$shortmode_path"`
24080      new_path="$input_path"
24081    fi
24082  fi
24083
24084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24085  if test "x$test_cygdrive_prefix" = x; then
24086    # As a simple fix, exclude /usr/bin since it's not a real path.
24087    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24089      # a path prefixed by /cygdrive for fixpath to work.
24090      new_path="$CYGWIN_ROOT_PATH$input_path"
24091    fi
24092  fi
24093
24094  # remove trailing .exe if any
24095  new_path="${new_path/%.exe/}"
24096
24097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24098
24099  # First separate the path from the arguments. This will split at the first
24100  # space.
24101  complete="$DUMPBIN"
24102  path="${complete%% *}"
24103  tmp="$complete EOL"
24104  arguments="${tmp#* }"
24105
24106  # Input might be given as Windows format, start by converting to
24107  # unix format.
24108  new_path="$path"
24109
24110  windows_path="$new_path"
24111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24112    unix_path=`$CYGPATH -u "$windows_path"`
24113    new_path="$unix_path"
24114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24116    new_path="$unix_path"
24117  fi
24118
24119
24120  # Now try to locate executable using which
24121  new_path=`$WHICH "$new_path" 2> /dev/null`
24122
24123  if test "x$new_path" = x; then
24124    # Oops. Which didn't find the executable.
24125    # The splitting of arguments from the executable at a space might have been incorrect,
24126    # since paths with space are more likely in Windows. Give it another try with the whole
24127    # argument.
24128    path="$complete"
24129    arguments="EOL"
24130    new_path="$path"
24131
24132  windows_path="$new_path"
24133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24134    unix_path=`$CYGPATH -u "$windows_path"`
24135    new_path="$unix_path"
24136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24138    new_path="$unix_path"
24139  fi
24140
24141
24142    new_path=`$WHICH "$new_path" 2> /dev/null`
24143
24144    if test "x$new_path" = x; then
24145      # It's still not found. Now this is an unrecoverable error.
24146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24147$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24148      has_space=`$ECHO "$complete" | $GREP " "`
24149      if test "x$has_space" != x; then
24150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24152      fi
24153      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24154    fi
24155  fi
24156
24157  # Now new_path has a complete unix path to the binary
24158  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24159    # Keep paths in /bin as-is, but remove trailing .exe if any
24160    new_path="${new_path/%.exe/}"
24161    # Do not save /bin paths to all_fixpath_prefixes!
24162  else
24163    # Not in mixed or Windows style, start by that.
24164    new_path=`cmd //c echo $new_path`
24165
24166  input_path="$new_path"
24167  # Check if we need to convert this using DOS-style short mode. If the path
24168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24169  # take no chances and rewrite it.
24170  # Note: m4 eats our [], so we need to use [ and ] instead.
24171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24172  if test "x$has_forbidden_chars" != x; then
24173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24175  fi
24176
24177    # Output is in $new_path
24178
24179  windows_path="$new_path"
24180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24181    unix_path=`$CYGPATH -u "$windows_path"`
24182    new_path="$unix_path"
24183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24185    new_path="$unix_path"
24186  fi
24187
24188    # remove trailing .exe if any
24189    new_path="${new_path/%.exe/}"
24190
24191    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24192    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24193  fi
24194
24195  else
24196    # We're on a posix platform. Hooray! :)
24197    # First separate the path from the arguments. This will split at the first
24198    # space.
24199    complete="$DUMPBIN"
24200    path="${complete%% *}"
24201    tmp="$complete EOL"
24202    arguments="${tmp#* }"
24203
24204    # Cannot rely on the command "which" here since it doesn't always work.
24205    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24206    if test -z "$is_absolute_path"; then
24207      # Path to executable is not absolute. Find it.
24208      IFS_save="$IFS"
24209      IFS=:
24210      for p in $PATH; do
24211        if test -f "$p/$path" && test -x "$p/$path"; then
24212          new_path="$p/$path"
24213          break
24214        fi
24215      done
24216      IFS="$IFS_save"
24217    else
24218      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24219$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24220      new_path="$path"
24221    fi
24222
24223    if test "x$new_path" = x; then
24224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24225$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24226        has_space=`$ECHO "$complete" | $GREP " "`
24227        if test "x$has_space" != x; then
24228          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24229$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24230        fi
24231        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24232      fi
24233  fi
24234
24235      # Now join together the path and the arguments once again
24236      if test "x$arguments" != xEOL; then
24237        new_complete="$new_path ${arguments% *}"
24238      else
24239        new_complete="$new_path"
24240      fi
24241
24242  if test "x$complete" != "x$new_complete"; then
24243      DUMPBIN="$new_complete"
24244      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24245$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24246    fi
24247
24248
24249    COMPILER_TYPE=CL
24250    CCXXFLAGS="$CCXXFLAGS -nologo"
24251
24252fi
24253
24254
24255
24256ac_ext=c
24257ac_cpp='$CPP $CPPFLAGS'
24258ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24259ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24260ac_compiler_gnu=$ac_cv_c_compiler_gnu
24261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24262$as_echo_n "checking how to run the C preprocessor... " >&6; }
24263# On Suns, sometimes $CPP names a directory.
24264if test -n "$CPP" && test -d "$CPP"; then
24265  CPP=
24266fi
24267if test -z "$CPP"; then
24268  if test "${ac_cv_prog_CPP+set}" = set; then :
24269  $as_echo_n "(cached) " >&6
24270else
24271      # Double quotes because CPP needs to be expanded
24272    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24273    do
24274      ac_preproc_ok=false
24275for ac_c_preproc_warn_flag in '' yes
24276do
24277  # Use a header file that comes with gcc, so configuring glibc
24278  # with a fresh cross-compiler works.
24279  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24280  # <limits.h> exists even on freestanding compilers.
24281  # On the NeXT, cc -E runs the code through the compiler's parser,
24282  # not just through cpp. "Syntax error" is here to catch this case.
24283  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24284/* end confdefs.h.  */
24285#ifdef __STDC__
24286# include <limits.h>
24287#else
24288# include <assert.h>
24289#endif
24290		     Syntax error
24291_ACEOF
24292if ac_fn_c_try_cpp "$LINENO"; then :
24293
24294else
24295  # Broken: fails on valid input.
24296continue
24297fi
24298rm -f conftest.err conftest.i conftest.$ac_ext
24299
24300  # OK, works on sane cases.  Now check whether nonexistent headers
24301  # can be detected and how.
24302  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24303/* end confdefs.h.  */
24304#include <ac_nonexistent.h>
24305_ACEOF
24306if ac_fn_c_try_cpp "$LINENO"; then :
24307  # Broken: success on invalid input.
24308continue
24309else
24310  # Passes both tests.
24311ac_preproc_ok=:
24312break
24313fi
24314rm -f conftest.err conftest.i conftest.$ac_ext
24315
24316done
24317# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24318rm -f conftest.i conftest.err conftest.$ac_ext
24319if $ac_preproc_ok; then :
24320  break
24321fi
24322
24323    done
24324    ac_cv_prog_CPP=$CPP
24325
24326fi
24327  CPP=$ac_cv_prog_CPP
24328else
24329  ac_cv_prog_CPP=$CPP
24330fi
24331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24332$as_echo "$CPP" >&6; }
24333ac_preproc_ok=false
24334for ac_c_preproc_warn_flag in '' yes
24335do
24336  # Use a header file that comes with gcc, so configuring glibc
24337  # with a fresh cross-compiler works.
24338  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24339  # <limits.h> exists even on freestanding compilers.
24340  # On the NeXT, cc -E runs the code through the compiler's parser,
24341  # not just through cpp. "Syntax error" is here to catch this case.
24342  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24343/* end confdefs.h.  */
24344#ifdef __STDC__
24345# include <limits.h>
24346#else
24347# include <assert.h>
24348#endif
24349		     Syntax error
24350_ACEOF
24351if ac_fn_c_try_cpp "$LINENO"; then :
24352
24353else
24354  # Broken: fails on valid input.
24355continue
24356fi
24357rm -f conftest.err conftest.i conftest.$ac_ext
24358
24359  # OK, works on sane cases.  Now check whether nonexistent headers
24360  # can be detected and how.
24361  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24362/* end confdefs.h.  */
24363#include <ac_nonexistent.h>
24364_ACEOF
24365if ac_fn_c_try_cpp "$LINENO"; then :
24366  # Broken: success on invalid input.
24367continue
24368else
24369  # Passes both tests.
24370ac_preproc_ok=:
24371break
24372fi
24373rm -f conftest.err conftest.i conftest.$ac_ext
24374
24375done
24376# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24377rm -f conftest.i conftest.err conftest.$ac_ext
24378if $ac_preproc_ok; then :
24379
24380else
24381  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24382$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24383as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24384See \`config.log' for more details" "$LINENO" 5 ; }
24385fi
24386
24387ac_ext=cpp
24388ac_cpp='$CXXCPP $CPPFLAGS'
24389ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24390ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24391ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24392
24393
24394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24395
24396  # First separate the path from the arguments. This will split at the first
24397  # space.
24398  complete="$CPP"
24399  path="${complete%% *}"
24400  tmp="$complete EOL"
24401  arguments="${tmp#* }"
24402
24403  # Input might be given as Windows format, start by converting to
24404  # unix format.
24405  new_path=`$CYGPATH -u "$path"`
24406
24407  # Now try to locate executable using which
24408  new_path=`$WHICH "$new_path" 2> /dev/null`
24409  # bat and cmd files are not always considered executable in cygwin causing which
24410  # to not find them
24411  if test "x$new_path" = x \
24412           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24413           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24414    new_path=`$CYGPATH -u "$path"`
24415  fi
24416  if test "x$new_path" = x; then
24417    # Oops. Which didn't find the executable.
24418    # The splitting of arguments from the executable at a space might have been incorrect,
24419    # since paths with space are more likely in Windows. Give it another try with the whole
24420    # argument.
24421    path="$complete"
24422    arguments="EOL"
24423    new_path=`$CYGPATH -u "$path"`
24424    new_path=`$WHICH "$new_path" 2> /dev/null`
24425    # bat and cmd files are not always considered executable in cygwin causing which
24426    # to not find them
24427    if test "x$new_path" = x \
24428             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24429             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24430      new_path=`$CYGPATH -u "$path"`
24431    fi
24432    if test "x$new_path" = x; then
24433      # It's still not found. Now this is an unrecoverable error.
24434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24435$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24436      has_space=`$ECHO "$complete" | $GREP " "`
24437      if test "x$has_space" != x; then
24438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24440      fi
24441      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24442    fi
24443  fi
24444
24445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24448  # "foo.exe" is OK but "foo" is an error.
24449  #
24450  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24451  # It is also a way to make sure we got the proper file name for the real test later on.
24452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24453  if test "x$test_shortpath" = x; then
24454    # Short path failed, file does not exist as specified.
24455    # Try adding .exe or .cmd
24456    if test -f "${new_path}.exe"; then
24457       input_to_shortpath="${new_path}.exe"
24458    elif test -f "${new_path}.cmd"; then
24459       input_to_shortpath="${new_path}.cmd"
24460    else
24461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24462$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24463      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24464$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24465      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24466    fi
24467  else
24468    input_to_shortpath="$new_path"
24469  fi
24470
24471  # Call helper function which possibly converts this using DOS-style short mode.
24472  # If so, the updated path is stored in $new_path.
24473  new_path="$input_to_shortpath"
24474
24475  input_path="$input_to_shortpath"
24476  # Check if we need to convert this using DOS-style short mode. If the path
24477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24478  # take no chances and rewrite it.
24479  # Note: m4 eats our [], so we need to use [ and ] instead.
24480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24481  if test "x$has_forbidden_chars" != x; then
24482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24486      # Going to short mode and back again did indeed matter. Since short mode is
24487      # case insensitive, let's make it lowercase to improve readability.
24488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24489      # Now convert it back to Unix-stile (cygpath)
24490      input_path=`$CYGPATH -u "$shortmode_path"`
24491      new_path="$input_path"
24492    fi
24493  fi
24494
24495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24496  if test "x$test_cygdrive_prefix" = x; then
24497    # As a simple fix, exclude /usr/bin since it's not a real path.
24498    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24500      # a path prefixed by /cygdrive for fixpath to work.
24501      new_path="$CYGWIN_ROOT_PATH$input_path"
24502    fi
24503  fi
24504
24505  # remove trailing .exe if any
24506  new_path="${new_path/%.exe/}"
24507
24508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24509
24510  # First separate the path from the arguments. This will split at the first
24511  # space.
24512  complete="$CPP"
24513  path="${complete%% *}"
24514  tmp="$complete EOL"
24515  arguments="${tmp#* }"
24516
24517  # Input might be given as Windows format, start by converting to
24518  # unix format.
24519  new_path="$path"
24520
24521  windows_path="$new_path"
24522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24523    unix_path=`$CYGPATH -u "$windows_path"`
24524    new_path="$unix_path"
24525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24527    new_path="$unix_path"
24528  fi
24529
24530
24531  # Now try to locate executable using which
24532  new_path=`$WHICH "$new_path" 2> /dev/null`
24533
24534  if test "x$new_path" = x; then
24535    # Oops. Which didn't find the executable.
24536    # The splitting of arguments from the executable at a space might have been incorrect,
24537    # since paths with space are more likely in Windows. Give it another try with the whole
24538    # argument.
24539    path="$complete"
24540    arguments="EOL"
24541    new_path="$path"
24542
24543  windows_path="$new_path"
24544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24545    unix_path=`$CYGPATH -u "$windows_path"`
24546    new_path="$unix_path"
24547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24549    new_path="$unix_path"
24550  fi
24551
24552
24553    new_path=`$WHICH "$new_path" 2> /dev/null`
24554
24555    if test "x$new_path" = x; then
24556      # It's still not found. Now this is an unrecoverable error.
24557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24558$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24559      has_space=`$ECHO "$complete" | $GREP " "`
24560      if test "x$has_space" != x; then
24561        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24562$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24563      fi
24564      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24565    fi
24566  fi
24567
24568  # Now new_path has a complete unix path to the binary
24569  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24570    # Keep paths in /bin as-is, but remove trailing .exe if any
24571    new_path="${new_path/%.exe/}"
24572    # Do not save /bin paths to all_fixpath_prefixes!
24573  else
24574    # Not in mixed or Windows style, start by that.
24575    new_path=`cmd //c echo $new_path`
24576
24577  input_path="$new_path"
24578  # Check if we need to convert this using DOS-style short mode. If the path
24579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24580  # take no chances and rewrite it.
24581  # Note: m4 eats our [], so we need to use [ and ] instead.
24582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24583  if test "x$has_forbidden_chars" != x; then
24584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24586  fi
24587
24588    # Output is in $new_path
24589
24590  windows_path="$new_path"
24591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24592    unix_path=`$CYGPATH -u "$windows_path"`
24593    new_path="$unix_path"
24594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24596    new_path="$unix_path"
24597  fi
24598
24599    # remove trailing .exe if any
24600    new_path="${new_path/%.exe/}"
24601
24602    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24603    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24604  fi
24605
24606  else
24607    # We're on a posix platform. Hooray! :)
24608    # First separate the path from the arguments. This will split at the first
24609    # space.
24610    complete="$CPP"
24611    path="${complete%% *}"
24612    tmp="$complete EOL"
24613    arguments="${tmp#* }"
24614
24615    # Cannot rely on the command "which" here since it doesn't always work.
24616    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24617    if test -z "$is_absolute_path"; then
24618      # Path to executable is not absolute. Find it.
24619      IFS_save="$IFS"
24620      IFS=:
24621      for p in $PATH; do
24622        if test -f "$p/$path" && test -x "$p/$path"; then
24623          new_path="$p/$path"
24624          break
24625        fi
24626      done
24627      IFS="$IFS_save"
24628    else
24629      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24630$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24631      new_path="$path"
24632    fi
24633
24634    if test "x$new_path" = x; then
24635        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24636$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24637        has_space=`$ECHO "$complete" | $GREP " "`
24638        if test "x$has_space" != x; then
24639          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24640$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24641        fi
24642        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24643      fi
24644  fi
24645
24646      # Now join together the path and the arguments once again
24647      if test "x$arguments" != xEOL; then
24648        new_complete="$new_path ${arguments% *}"
24649      else
24650        new_complete="$new_path"
24651      fi
24652
24653  if test "x$complete" != "x$new_complete"; then
24654      CPP="$new_complete"
24655      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24656$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24657    fi
24658
24659
24660ac_ext=cpp
24661ac_cpp='$CXXCPP $CPPFLAGS'
24662ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24663ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24664ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24666$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24667if test -z "$CXXCPP"; then
24668  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24669  $as_echo_n "(cached) " >&6
24670else
24671      # Double quotes because CXXCPP needs to be expanded
24672    for CXXCPP in "$CXX -E" "/lib/cpp"
24673    do
24674      ac_preproc_ok=false
24675for ac_cxx_preproc_warn_flag in '' yes
24676do
24677  # Use a header file that comes with gcc, so configuring glibc
24678  # with a fresh cross-compiler works.
24679  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24680  # <limits.h> exists even on freestanding compilers.
24681  # On the NeXT, cc -E runs the code through the compiler's parser,
24682  # not just through cpp. "Syntax error" is here to catch this case.
24683  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24684/* end confdefs.h.  */
24685#ifdef __STDC__
24686# include <limits.h>
24687#else
24688# include <assert.h>
24689#endif
24690		     Syntax error
24691_ACEOF
24692if ac_fn_cxx_try_cpp "$LINENO"; then :
24693
24694else
24695  # Broken: fails on valid input.
24696continue
24697fi
24698rm -f conftest.err conftest.i conftest.$ac_ext
24699
24700  # OK, works on sane cases.  Now check whether nonexistent headers
24701  # can be detected and how.
24702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24703/* end confdefs.h.  */
24704#include <ac_nonexistent.h>
24705_ACEOF
24706if ac_fn_cxx_try_cpp "$LINENO"; then :
24707  # Broken: success on invalid input.
24708continue
24709else
24710  # Passes both tests.
24711ac_preproc_ok=:
24712break
24713fi
24714rm -f conftest.err conftest.i conftest.$ac_ext
24715
24716done
24717# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24718rm -f conftest.i conftest.err conftest.$ac_ext
24719if $ac_preproc_ok; then :
24720  break
24721fi
24722
24723    done
24724    ac_cv_prog_CXXCPP=$CXXCPP
24725
24726fi
24727  CXXCPP=$ac_cv_prog_CXXCPP
24728else
24729  ac_cv_prog_CXXCPP=$CXXCPP
24730fi
24731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24732$as_echo "$CXXCPP" >&6; }
24733ac_preproc_ok=false
24734for ac_cxx_preproc_warn_flag in '' yes
24735do
24736  # Use a header file that comes with gcc, so configuring glibc
24737  # with a fresh cross-compiler works.
24738  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24739  # <limits.h> exists even on freestanding compilers.
24740  # On the NeXT, cc -E runs the code through the compiler's parser,
24741  # not just through cpp. "Syntax error" is here to catch this case.
24742  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24743/* end confdefs.h.  */
24744#ifdef __STDC__
24745# include <limits.h>
24746#else
24747# include <assert.h>
24748#endif
24749		     Syntax error
24750_ACEOF
24751if ac_fn_cxx_try_cpp "$LINENO"; then :
24752
24753else
24754  # Broken: fails on valid input.
24755continue
24756fi
24757rm -f conftest.err conftest.i conftest.$ac_ext
24758
24759  # OK, works on sane cases.  Now check whether nonexistent headers
24760  # can be detected and how.
24761  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24762/* end confdefs.h.  */
24763#include <ac_nonexistent.h>
24764_ACEOF
24765if ac_fn_cxx_try_cpp "$LINENO"; then :
24766  # Broken: success on invalid input.
24767continue
24768else
24769  # Passes both tests.
24770ac_preproc_ok=:
24771break
24772fi
24773rm -f conftest.err conftest.i conftest.$ac_ext
24774
24775done
24776# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24777rm -f conftest.i conftest.err conftest.$ac_ext
24778if $ac_preproc_ok; then :
24779
24780else
24781  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24782$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24783as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24784See \`config.log' for more details" "$LINENO" 5 ; }
24785fi
24786
24787ac_ext=cpp
24788ac_cpp='$CXXCPP $CPPFLAGS'
24789ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24790ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24791ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24792
24793
24794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24795
24796  # First separate the path from the arguments. This will split at the first
24797  # space.
24798  complete="$CXXCPP"
24799  path="${complete%% *}"
24800  tmp="$complete EOL"
24801  arguments="${tmp#* }"
24802
24803  # Input might be given as Windows format, start by converting to
24804  # unix format.
24805  new_path=`$CYGPATH -u "$path"`
24806
24807  # Now try to locate executable using which
24808  new_path=`$WHICH "$new_path" 2> /dev/null`
24809  # bat and cmd files are not always considered executable in cygwin causing which
24810  # to not find them
24811  if test "x$new_path" = x \
24812           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24813           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24814    new_path=`$CYGPATH -u "$path"`
24815  fi
24816  if test "x$new_path" = x; then
24817    # Oops. Which didn't find the executable.
24818    # The splitting of arguments from the executable at a space might have been incorrect,
24819    # since paths with space are more likely in Windows. Give it another try with the whole
24820    # argument.
24821    path="$complete"
24822    arguments="EOL"
24823    new_path=`$CYGPATH -u "$path"`
24824    new_path=`$WHICH "$new_path" 2> /dev/null`
24825    # bat and cmd files are not always considered executable in cygwin causing which
24826    # to not find them
24827    if test "x$new_path" = x \
24828             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24829             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24830      new_path=`$CYGPATH -u "$path"`
24831    fi
24832    if test "x$new_path" = x; then
24833      # It's still not found. Now this is an unrecoverable error.
24834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24835$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24836      has_space=`$ECHO "$complete" | $GREP " "`
24837      if test "x$has_space" != x; then
24838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24840      fi
24841      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24842    fi
24843  fi
24844
24845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24848  # "foo.exe" is OK but "foo" is an error.
24849  #
24850  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24851  # It is also a way to make sure we got the proper file name for the real test later on.
24852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24853  if test "x$test_shortpath" = x; then
24854    # Short path failed, file does not exist as specified.
24855    # Try adding .exe or .cmd
24856    if test -f "${new_path}.exe"; then
24857       input_to_shortpath="${new_path}.exe"
24858    elif test -f "${new_path}.cmd"; then
24859       input_to_shortpath="${new_path}.cmd"
24860    else
24861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24862$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24863      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24864$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24865      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24866    fi
24867  else
24868    input_to_shortpath="$new_path"
24869  fi
24870
24871  # Call helper function which possibly converts this using DOS-style short mode.
24872  # If so, the updated path is stored in $new_path.
24873  new_path="$input_to_shortpath"
24874
24875  input_path="$input_to_shortpath"
24876  # Check if we need to convert this using DOS-style short mode. If the path
24877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24878  # take no chances and rewrite it.
24879  # Note: m4 eats our [], so we need to use [ and ] instead.
24880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24881  if test "x$has_forbidden_chars" != x; then
24882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24886      # Going to short mode and back again did indeed matter. Since short mode is
24887      # case insensitive, let's make it lowercase to improve readability.
24888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24889      # Now convert it back to Unix-stile (cygpath)
24890      input_path=`$CYGPATH -u "$shortmode_path"`
24891      new_path="$input_path"
24892    fi
24893  fi
24894
24895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24896  if test "x$test_cygdrive_prefix" = x; then
24897    # As a simple fix, exclude /usr/bin since it's not a real path.
24898    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24900      # a path prefixed by /cygdrive for fixpath to work.
24901      new_path="$CYGWIN_ROOT_PATH$input_path"
24902    fi
24903  fi
24904
24905  # remove trailing .exe if any
24906  new_path="${new_path/%.exe/}"
24907
24908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24909
24910  # First separate the path from the arguments. This will split at the first
24911  # space.
24912  complete="$CXXCPP"
24913  path="${complete%% *}"
24914  tmp="$complete EOL"
24915  arguments="${tmp#* }"
24916
24917  # Input might be given as Windows format, start by converting to
24918  # unix format.
24919  new_path="$path"
24920
24921  windows_path="$new_path"
24922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24923    unix_path=`$CYGPATH -u "$windows_path"`
24924    new_path="$unix_path"
24925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24927    new_path="$unix_path"
24928  fi
24929
24930
24931  # Now try to locate executable using which
24932  new_path=`$WHICH "$new_path" 2> /dev/null`
24933
24934  if test "x$new_path" = x; then
24935    # Oops. Which didn't find the executable.
24936    # The splitting of arguments from the executable at a space might have been incorrect,
24937    # since paths with space are more likely in Windows. Give it another try with the whole
24938    # argument.
24939    path="$complete"
24940    arguments="EOL"
24941    new_path="$path"
24942
24943  windows_path="$new_path"
24944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24945    unix_path=`$CYGPATH -u "$windows_path"`
24946    new_path="$unix_path"
24947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24949    new_path="$unix_path"
24950  fi
24951
24952
24953    new_path=`$WHICH "$new_path" 2> /dev/null`
24954
24955    if test "x$new_path" = x; then
24956      # It's still not found. Now this is an unrecoverable error.
24957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24958$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24959      has_space=`$ECHO "$complete" | $GREP " "`
24960      if test "x$has_space" != x; then
24961        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24962$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24963      fi
24964      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24965    fi
24966  fi
24967
24968  # Now new_path has a complete unix path to the binary
24969  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24970    # Keep paths in /bin as-is, but remove trailing .exe if any
24971    new_path="${new_path/%.exe/}"
24972    # Do not save /bin paths to all_fixpath_prefixes!
24973  else
24974    # Not in mixed or Windows style, start by that.
24975    new_path=`cmd //c echo $new_path`
24976
24977  input_path="$new_path"
24978  # Check if we need to convert this using DOS-style short mode. If the path
24979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24980  # take no chances and rewrite it.
24981  # Note: m4 eats our [], so we need to use [ and ] instead.
24982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24983  if test "x$has_forbidden_chars" != x; then
24984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24986  fi
24987
24988    # Output is in $new_path
24989
24990  windows_path="$new_path"
24991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24992    unix_path=`$CYGPATH -u "$windows_path"`
24993    new_path="$unix_path"
24994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24996    new_path="$unix_path"
24997  fi
24998
24999    # remove trailing .exe if any
25000    new_path="${new_path/%.exe/}"
25001
25002    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25003    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25004  fi
25005
25006  else
25007    # We're on a posix platform. Hooray! :)
25008    # First separate the path from the arguments. This will split at the first
25009    # space.
25010    complete="$CXXCPP"
25011    path="${complete%% *}"
25012    tmp="$complete EOL"
25013    arguments="${tmp#* }"
25014
25015    # Cannot rely on the command "which" here since it doesn't always work.
25016    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25017    if test -z "$is_absolute_path"; then
25018      # Path to executable is not absolute. Find it.
25019      IFS_save="$IFS"
25020      IFS=:
25021      for p in $PATH; do
25022        if test -f "$p/$path" && test -x "$p/$path"; then
25023          new_path="$p/$path"
25024          break
25025        fi
25026      done
25027      IFS="$IFS_save"
25028    else
25029      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25030$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25031      new_path="$path"
25032    fi
25033
25034    if test "x$new_path" = x; then
25035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25036$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25037        has_space=`$ECHO "$complete" | $GREP " "`
25038        if test "x$has_space" != x; then
25039          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25040$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25041        fi
25042        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25043      fi
25044  fi
25045
25046      # Now join together the path and the arguments once again
25047      if test "x$arguments" != xEOL; then
25048        new_complete="$new_path ${arguments% *}"
25049      else
25050        new_complete="$new_path"
25051      fi
25052
25053  if test "x$complete" != "x$new_complete"; then
25054      CXXCPP="$new_complete"
25055      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25056$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25057    fi
25058
25059
25060if test "x$COMPILE_TYPE" != "xcross"; then
25061    # If we are not cross compiling, use the same compilers for
25062    # building the build platform executables. The cross-compilation
25063    # case needed to be done earlier, but this can only be done after
25064    # the native tools have been localized.
25065    BUILD_CC="$CC"
25066    BUILD_CXX="$CXX"
25067    BUILD_LD="$LD"
25068fi
25069
25070# for solaris we really need solaris tools, and not gnu equivalent
25071#   these seems to normally reside in /usr/ccs/bin so add that to path before
25072#   starting to probe
25073#
25074#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25075#         so that it can be overriden --with-tools-dir
25076if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25077    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25078fi
25079
25080# Find the right assembler.
25081if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25082    # Extract the first word of "as", so it can be a program name with args.
25083set dummy as; ac_word=$2
25084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25085$as_echo_n "checking for $ac_word... " >&6; }
25086if test "${ac_cv_path_AS+set}" = set; then :
25087  $as_echo_n "(cached) " >&6
25088else
25089  case $AS in
25090  [\\/]* | ?:[\\/]*)
25091  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25092  ;;
25093  *)
25094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25095for as_dir in $PATH
25096do
25097  IFS=$as_save_IFS
25098  test -z "$as_dir" && as_dir=.
25099    for ac_exec_ext in '' $ac_executable_extensions; do
25100  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25101    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25103    break 2
25104  fi
25105done
25106  done
25107IFS=$as_save_IFS
25108
25109  ;;
25110esac
25111fi
25112AS=$ac_cv_path_AS
25113if test -n "$AS"; then
25114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25115$as_echo "$AS" >&6; }
25116else
25117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25118$as_echo "no" >&6; }
25119fi
25120
25121
25122
25123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25124
25125  # First separate the path from the arguments. This will split at the first
25126  # space.
25127  complete="$AS"
25128  path="${complete%% *}"
25129  tmp="$complete EOL"
25130  arguments="${tmp#* }"
25131
25132  # Input might be given as Windows format, start by converting to
25133  # unix format.
25134  new_path=`$CYGPATH -u "$path"`
25135
25136  # Now try to locate executable using which
25137  new_path=`$WHICH "$new_path" 2> /dev/null`
25138  # bat and cmd files are not always considered executable in cygwin causing which
25139  # to not find them
25140  if test "x$new_path" = x \
25141           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25142           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25143    new_path=`$CYGPATH -u "$path"`
25144  fi
25145  if test "x$new_path" = x; then
25146    # Oops. Which didn't find the executable.
25147    # The splitting of arguments from the executable at a space might have been incorrect,
25148    # since paths with space are more likely in Windows. Give it another try with the whole
25149    # argument.
25150    path="$complete"
25151    arguments="EOL"
25152    new_path=`$CYGPATH -u "$path"`
25153    new_path=`$WHICH "$new_path" 2> /dev/null`
25154    # bat and cmd files are not always considered executable in cygwin causing which
25155    # to not find them
25156    if test "x$new_path" = x \
25157             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25158             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25159      new_path=`$CYGPATH -u "$path"`
25160    fi
25161    if test "x$new_path" = x; then
25162      # It's still not found. Now this is an unrecoverable error.
25163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25164$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25165      has_space=`$ECHO "$complete" | $GREP " "`
25166      if test "x$has_space" != x; then
25167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25169      fi
25170      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25171    fi
25172  fi
25173
25174  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25175  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25176  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25177  # "foo.exe" is OK but "foo" is an error.
25178  #
25179  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25180  # It is also a way to make sure we got the proper file name for the real test later on.
25181  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25182  if test "x$test_shortpath" = x; then
25183    # Short path failed, file does not exist as specified.
25184    # Try adding .exe or .cmd
25185    if test -f "${new_path}.exe"; then
25186       input_to_shortpath="${new_path}.exe"
25187    elif test -f "${new_path}.cmd"; then
25188       input_to_shortpath="${new_path}.cmd"
25189    else
25190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25191$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25192      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25193$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25194      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25195    fi
25196  else
25197    input_to_shortpath="$new_path"
25198  fi
25199
25200  # Call helper function which possibly converts this using DOS-style short mode.
25201  # If so, the updated path is stored in $new_path.
25202  new_path="$input_to_shortpath"
25203
25204  input_path="$input_to_shortpath"
25205  # Check if we need to convert this using DOS-style short mode. If the path
25206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25207  # take no chances and rewrite it.
25208  # Note: m4 eats our [], so we need to use [ and ] instead.
25209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25210  if test "x$has_forbidden_chars" != x; then
25211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25215      # Going to short mode and back again did indeed matter. Since short mode is
25216      # case insensitive, let's make it lowercase to improve readability.
25217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25218      # Now convert it back to Unix-stile (cygpath)
25219      input_path=`$CYGPATH -u "$shortmode_path"`
25220      new_path="$input_path"
25221    fi
25222  fi
25223
25224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25225  if test "x$test_cygdrive_prefix" = x; then
25226    # As a simple fix, exclude /usr/bin since it's not a real path.
25227    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25229      # a path prefixed by /cygdrive for fixpath to work.
25230      new_path="$CYGWIN_ROOT_PATH$input_path"
25231    fi
25232  fi
25233
25234  # remove trailing .exe if any
25235  new_path="${new_path/%.exe/}"
25236
25237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25238
25239  # First separate the path from the arguments. This will split at the first
25240  # space.
25241  complete="$AS"
25242  path="${complete%% *}"
25243  tmp="$complete EOL"
25244  arguments="${tmp#* }"
25245
25246  # Input might be given as Windows format, start by converting to
25247  # unix format.
25248  new_path="$path"
25249
25250  windows_path="$new_path"
25251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25252    unix_path=`$CYGPATH -u "$windows_path"`
25253    new_path="$unix_path"
25254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25256    new_path="$unix_path"
25257  fi
25258
25259
25260  # Now try to locate executable using which
25261  new_path=`$WHICH "$new_path" 2> /dev/null`
25262
25263  if test "x$new_path" = x; then
25264    # Oops. Which didn't find the executable.
25265    # The splitting of arguments from the executable at a space might have been incorrect,
25266    # since paths with space are more likely in Windows. Give it another try with the whole
25267    # argument.
25268    path="$complete"
25269    arguments="EOL"
25270    new_path="$path"
25271
25272  windows_path="$new_path"
25273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25274    unix_path=`$CYGPATH -u "$windows_path"`
25275    new_path="$unix_path"
25276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25278    new_path="$unix_path"
25279  fi
25280
25281
25282    new_path=`$WHICH "$new_path" 2> /dev/null`
25283
25284    if test "x$new_path" = x; then
25285      # It's still not found. Now this is an unrecoverable error.
25286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25287$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25288      has_space=`$ECHO "$complete" | $GREP " "`
25289      if test "x$has_space" != x; then
25290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25292      fi
25293      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25294    fi
25295  fi
25296
25297  # Now new_path has a complete unix path to the binary
25298  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25299    # Keep paths in /bin as-is, but remove trailing .exe if any
25300    new_path="${new_path/%.exe/}"
25301    # Do not save /bin paths to all_fixpath_prefixes!
25302  else
25303    # Not in mixed or Windows style, start by that.
25304    new_path=`cmd //c echo $new_path`
25305
25306  input_path="$new_path"
25307  # Check if we need to convert this using DOS-style short mode. If the path
25308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25309  # take no chances and rewrite it.
25310  # Note: m4 eats our [], so we need to use [ and ] instead.
25311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25312  if test "x$has_forbidden_chars" != x; then
25313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25315  fi
25316
25317    # Output is in $new_path
25318
25319  windows_path="$new_path"
25320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25321    unix_path=`$CYGPATH -u "$windows_path"`
25322    new_path="$unix_path"
25323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25325    new_path="$unix_path"
25326  fi
25327
25328    # remove trailing .exe if any
25329    new_path="${new_path/%.exe/}"
25330
25331    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25332    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25333  fi
25334
25335  else
25336    # We're on a posix platform. Hooray! :)
25337    # First separate the path from the arguments. This will split at the first
25338    # space.
25339    complete="$AS"
25340    path="${complete%% *}"
25341    tmp="$complete EOL"
25342    arguments="${tmp#* }"
25343
25344    # Cannot rely on the command "which" here since it doesn't always work.
25345    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25346    if test -z "$is_absolute_path"; then
25347      # Path to executable is not absolute. Find it.
25348      IFS_save="$IFS"
25349      IFS=:
25350      for p in $PATH; do
25351        if test -f "$p/$path" && test -x "$p/$path"; then
25352          new_path="$p/$path"
25353          break
25354        fi
25355      done
25356      IFS="$IFS_save"
25357    else
25358      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25359$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25360      new_path="$path"
25361    fi
25362
25363    if test "x$new_path" = x; then
25364        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25365$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25366        has_space=`$ECHO "$complete" | $GREP " "`
25367        if test "x$has_space" != x; then
25368          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25369$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25370        fi
25371        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25372      fi
25373  fi
25374
25375      # Now join together the path and the arguments once again
25376      if test "x$arguments" != xEOL; then
25377        new_complete="$new_path ${arguments% *}"
25378      else
25379        new_complete="$new_path"
25380      fi
25381
25382  if test "x$complete" != "x$new_complete"; then
25383      AS="$new_complete"
25384      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25385$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25386    fi
25387
25388else
25389    AS="$CC -c"
25390fi
25391
25392
25393if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25394    # Extract the first word of "nm", so it can be a program name with args.
25395set dummy nm; ac_word=$2
25396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25397$as_echo_n "checking for $ac_word... " >&6; }
25398if test "${ac_cv_path_NM+set}" = set; then :
25399  $as_echo_n "(cached) " >&6
25400else
25401  case $NM in
25402  [\\/]* | ?:[\\/]*)
25403  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25404  ;;
25405  *)
25406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25407for as_dir in $PATH
25408do
25409  IFS=$as_save_IFS
25410  test -z "$as_dir" && as_dir=.
25411    for ac_exec_ext in '' $ac_executable_extensions; do
25412  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25413    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25415    break 2
25416  fi
25417done
25418  done
25419IFS=$as_save_IFS
25420
25421  ;;
25422esac
25423fi
25424NM=$ac_cv_path_NM
25425if test -n "$NM"; then
25426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25427$as_echo "$NM" >&6; }
25428else
25429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25430$as_echo "no" >&6; }
25431fi
25432
25433
25434
25435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25436
25437  # First separate the path from the arguments. This will split at the first
25438  # space.
25439  complete="$NM"
25440  path="${complete%% *}"
25441  tmp="$complete EOL"
25442  arguments="${tmp#* }"
25443
25444  # Input might be given as Windows format, start by converting to
25445  # unix format.
25446  new_path=`$CYGPATH -u "$path"`
25447
25448  # Now try to locate executable using which
25449  new_path=`$WHICH "$new_path" 2> /dev/null`
25450  # bat and cmd files are not always considered executable in cygwin causing which
25451  # to not find them
25452  if test "x$new_path" = x \
25453           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25454           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25455    new_path=`$CYGPATH -u "$path"`
25456  fi
25457  if test "x$new_path" = x; then
25458    # Oops. Which didn't find the executable.
25459    # The splitting of arguments from the executable at a space might have been incorrect,
25460    # since paths with space are more likely in Windows. Give it another try with the whole
25461    # argument.
25462    path="$complete"
25463    arguments="EOL"
25464    new_path=`$CYGPATH -u "$path"`
25465    new_path=`$WHICH "$new_path" 2> /dev/null`
25466    # bat and cmd files are not always considered executable in cygwin causing which
25467    # to not find them
25468    if test "x$new_path" = x \
25469             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25470             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25471      new_path=`$CYGPATH -u "$path"`
25472    fi
25473    if test "x$new_path" = x; then
25474      # It's still not found. Now this is an unrecoverable error.
25475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25476$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25477      has_space=`$ECHO "$complete" | $GREP " "`
25478      if test "x$has_space" != x; then
25479        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25480$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25481      fi
25482      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25483    fi
25484  fi
25485
25486  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25487  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25488  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25489  # "foo.exe" is OK but "foo" is an error.
25490  #
25491  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25492  # It is also a way to make sure we got the proper file name for the real test later on.
25493  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25494  if test "x$test_shortpath" = x; then
25495    # Short path failed, file does not exist as specified.
25496    # Try adding .exe or .cmd
25497    if test -f "${new_path}.exe"; then
25498       input_to_shortpath="${new_path}.exe"
25499    elif test -f "${new_path}.cmd"; then
25500       input_to_shortpath="${new_path}.cmd"
25501    else
25502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25503$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25504      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25505$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25506      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25507    fi
25508  else
25509    input_to_shortpath="$new_path"
25510  fi
25511
25512  # Call helper function which possibly converts this using DOS-style short mode.
25513  # If so, the updated path is stored in $new_path.
25514  new_path="$input_to_shortpath"
25515
25516  input_path="$input_to_shortpath"
25517  # Check if we need to convert this using DOS-style short mode. If the path
25518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25519  # take no chances and rewrite it.
25520  # Note: m4 eats our [], so we need to use [ and ] instead.
25521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25522  if test "x$has_forbidden_chars" != x; then
25523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25524    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25525    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25526    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25527      # Going to short mode and back again did indeed matter. Since short mode is
25528      # case insensitive, let's make it lowercase to improve readability.
25529      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25530      # Now convert it back to Unix-stile (cygpath)
25531      input_path=`$CYGPATH -u "$shortmode_path"`
25532      new_path="$input_path"
25533    fi
25534  fi
25535
25536  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25537  if test "x$test_cygdrive_prefix" = x; then
25538    # As a simple fix, exclude /usr/bin since it's not a real path.
25539    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25540      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25541      # a path prefixed by /cygdrive for fixpath to work.
25542      new_path="$CYGWIN_ROOT_PATH$input_path"
25543    fi
25544  fi
25545
25546  # remove trailing .exe if any
25547  new_path="${new_path/%.exe/}"
25548
25549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25550
25551  # First separate the path from the arguments. This will split at the first
25552  # space.
25553  complete="$NM"
25554  path="${complete%% *}"
25555  tmp="$complete EOL"
25556  arguments="${tmp#* }"
25557
25558  # Input might be given as Windows format, start by converting to
25559  # unix format.
25560  new_path="$path"
25561
25562  windows_path="$new_path"
25563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25564    unix_path=`$CYGPATH -u "$windows_path"`
25565    new_path="$unix_path"
25566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25568    new_path="$unix_path"
25569  fi
25570
25571
25572  # Now try to locate executable using which
25573  new_path=`$WHICH "$new_path" 2> /dev/null`
25574
25575  if test "x$new_path" = x; then
25576    # Oops. Which didn't find the executable.
25577    # The splitting of arguments from the executable at a space might have been incorrect,
25578    # since paths with space are more likely in Windows. Give it another try with the whole
25579    # argument.
25580    path="$complete"
25581    arguments="EOL"
25582    new_path="$path"
25583
25584  windows_path="$new_path"
25585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25586    unix_path=`$CYGPATH -u "$windows_path"`
25587    new_path="$unix_path"
25588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25590    new_path="$unix_path"
25591  fi
25592
25593
25594    new_path=`$WHICH "$new_path" 2> /dev/null`
25595
25596    if test "x$new_path" = x; then
25597      # It's still not found. Now this is an unrecoverable error.
25598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25599$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25600      has_space=`$ECHO "$complete" | $GREP " "`
25601      if test "x$has_space" != x; then
25602        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25603$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25604      fi
25605      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25606    fi
25607  fi
25608
25609  # Now new_path has a complete unix path to the binary
25610  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25611    # Keep paths in /bin as-is, but remove trailing .exe if any
25612    new_path="${new_path/%.exe/}"
25613    # Do not save /bin paths to all_fixpath_prefixes!
25614  else
25615    # Not in mixed or Windows style, start by that.
25616    new_path=`cmd //c echo $new_path`
25617
25618  input_path="$new_path"
25619  # Check if we need to convert this using DOS-style short mode. If the path
25620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25621  # take no chances and rewrite it.
25622  # Note: m4 eats our [], so we need to use [ and ] instead.
25623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25624  if test "x$has_forbidden_chars" != x; then
25625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25627  fi
25628
25629    # Output is in $new_path
25630
25631  windows_path="$new_path"
25632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25633    unix_path=`$CYGPATH -u "$windows_path"`
25634    new_path="$unix_path"
25635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25637    new_path="$unix_path"
25638  fi
25639
25640    # remove trailing .exe if any
25641    new_path="${new_path/%.exe/}"
25642
25643    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25644    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25645  fi
25646
25647  else
25648    # We're on a posix platform. Hooray! :)
25649    # First separate the path from the arguments. This will split at the first
25650    # space.
25651    complete="$NM"
25652    path="${complete%% *}"
25653    tmp="$complete EOL"
25654    arguments="${tmp#* }"
25655
25656    # Cannot rely on the command "which" here since it doesn't always work.
25657    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25658    if test -z "$is_absolute_path"; then
25659      # Path to executable is not absolute. Find it.
25660      IFS_save="$IFS"
25661      IFS=:
25662      for p in $PATH; do
25663        if test -f "$p/$path" && test -x "$p/$path"; then
25664          new_path="$p/$path"
25665          break
25666        fi
25667      done
25668      IFS="$IFS_save"
25669    else
25670      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25671$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25672      new_path="$path"
25673    fi
25674
25675    if test "x$new_path" = x; then
25676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25677$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25678        has_space=`$ECHO "$complete" | $GREP " "`
25679        if test "x$has_space" != x; then
25680          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25681$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25682        fi
25683        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25684      fi
25685  fi
25686
25687      # Now join together the path and the arguments once again
25688      if test "x$arguments" != xEOL; then
25689        new_complete="$new_path ${arguments% *}"
25690      else
25691        new_complete="$new_path"
25692      fi
25693
25694  if test "x$complete" != "x$new_complete"; then
25695      NM="$new_complete"
25696      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25697$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25698    fi
25699
25700    # Extract the first word of "gnm", so it can be a program name with args.
25701set dummy gnm; ac_word=$2
25702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25703$as_echo_n "checking for $ac_word... " >&6; }
25704if test "${ac_cv_path_GNM+set}" = set; then :
25705  $as_echo_n "(cached) " >&6
25706else
25707  case $GNM in
25708  [\\/]* | ?:[\\/]*)
25709  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25710  ;;
25711  *)
25712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25713for as_dir in $PATH
25714do
25715  IFS=$as_save_IFS
25716  test -z "$as_dir" && as_dir=.
25717    for ac_exec_ext in '' $ac_executable_extensions; do
25718  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25719    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25721    break 2
25722  fi
25723done
25724  done
25725IFS=$as_save_IFS
25726
25727  ;;
25728esac
25729fi
25730GNM=$ac_cv_path_GNM
25731if test -n "$GNM"; then
25732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25733$as_echo "$GNM" >&6; }
25734else
25735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25736$as_echo "no" >&6; }
25737fi
25738
25739
25740
25741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25742
25743  # First separate the path from the arguments. This will split at the first
25744  # space.
25745  complete="$GNM"
25746  path="${complete%% *}"
25747  tmp="$complete EOL"
25748  arguments="${tmp#* }"
25749
25750  # Input might be given as Windows format, start by converting to
25751  # unix format.
25752  new_path=`$CYGPATH -u "$path"`
25753
25754  # Now try to locate executable using which
25755  new_path=`$WHICH "$new_path" 2> /dev/null`
25756  # bat and cmd files are not always considered executable in cygwin causing which
25757  # to not find them
25758  if test "x$new_path" = x \
25759           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25760           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25761    new_path=`$CYGPATH -u "$path"`
25762  fi
25763  if test "x$new_path" = x; then
25764    # Oops. Which didn't find the executable.
25765    # The splitting of arguments from the executable at a space might have been incorrect,
25766    # since paths with space are more likely in Windows. Give it another try with the whole
25767    # argument.
25768    path="$complete"
25769    arguments="EOL"
25770    new_path=`$CYGPATH -u "$path"`
25771    new_path=`$WHICH "$new_path" 2> /dev/null`
25772    # bat and cmd files are not always considered executable in cygwin causing which
25773    # to not find them
25774    if test "x$new_path" = x \
25775             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25776             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25777      new_path=`$CYGPATH -u "$path"`
25778    fi
25779    if test "x$new_path" = x; then
25780      # It's still not found. Now this is an unrecoverable error.
25781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25782$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25783      has_space=`$ECHO "$complete" | $GREP " "`
25784      if test "x$has_space" != x; then
25785        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25786$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25787      fi
25788      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25789    fi
25790  fi
25791
25792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25795  # "foo.exe" is OK but "foo" is an error.
25796  #
25797  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25798  # It is also a way to make sure we got the proper file name for the real test later on.
25799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25800  if test "x$test_shortpath" = x; then
25801    # Short path failed, file does not exist as specified.
25802    # Try adding .exe or .cmd
25803    if test -f "${new_path}.exe"; then
25804       input_to_shortpath="${new_path}.exe"
25805    elif test -f "${new_path}.cmd"; then
25806       input_to_shortpath="${new_path}.cmd"
25807    else
25808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25809$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25810      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25811$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25812      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25813    fi
25814  else
25815    input_to_shortpath="$new_path"
25816  fi
25817
25818  # Call helper function which possibly converts this using DOS-style short mode.
25819  # If so, the updated path is stored in $new_path.
25820  new_path="$input_to_shortpath"
25821
25822  input_path="$input_to_shortpath"
25823  # Check if we need to convert this using DOS-style short mode. If the path
25824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25825  # take no chances and rewrite it.
25826  # Note: m4 eats our [], so we need to use [ and ] instead.
25827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25828  if test "x$has_forbidden_chars" != x; then
25829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25833      # Going to short mode and back again did indeed matter. Since short mode is
25834      # case insensitive, let's make it lowercase to improve readability.
25835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25836      # Now convert it back to Unix-stile (cygpath)
25837      input_path=`$CYGPATH -u "$shortmode_path"`
25838      new_path="$input_path"
25839    fi
25840  fi
25841
25842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25843  if test "x$test_cygdrive_prefix" = x; then
25844    # As a simple fix, exclude /usr/bin since it's not a real path.
25845    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25847      # a path prefixed by /cygdrive for fixpath to work.
25848      new_path="$CYGWIN_ROOT_PATH$input_path"
25849    fi
25850  fi
25851
25852  # remove trailing .exe if any
25853  new_path="${new_path/%.exe/}"
25854
25855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25856
25857  # First separate the path from the arguments. This will split at the first
25858  # space.
25859  complete="$GNM"
25860  path="${complete%% *}"
25861  tmp="$complete EOL"
25862  arguments="${tmp#* }"
25863
25864  # Input might be given as Windows format, start by converting to
25865  # unix format.
25866  new_path="$path"
25867
25868  windows_path="$new_path"
25869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25870    unix_path=`$CYGPATH -u "$windows_path"`
25871    new_path="$unix_path"
25872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25874    new_path="$unix_path"
25875  fi
25876
25877
25878  # Now try to locate executable using which
25879  new_path=`$WHICH "$new_path" 2> /dev/null`
25880
25881  if test "x$new_path" = x; then
25882    # Oops. Which didn't find the executable.
25883    # The splitting of arguments from the executable at a space might have been incorrect,
25884    # since paths with space are more likely in Windows. Give it another try with the whole
25885    # argument.
25886    path="$complete"
25887    arguments="EOL"
25888    new_path="$path"
25889
25890  windows_path="$new_path"
25891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25892    unix_path=`$CYGPATH -u "$windows_path"`
25893    new_path="$unix_path"
25894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25896    new_path="$unix_path"
25897  fi
25898
25899
25900    new_path=`$WHICH "$new_path" 2> /dev/null`
25901
25902    if test "x$new_path" = x; then
25903      # It's still not found. Now this is an unrecoverable error.
25904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25905$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25906      has_space=`$ECHO "$complete" | $GREP " "`
25907      if test "x$has_space" != x; then
25908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25910      fi
25911      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25912    fi
25913  fi
25914
25915  # Now new_path has a complete unix path to the binary
25916  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25917    # Keep paths in /bin as-is, but remove trailing .exe if any
25918    new_path="${new_path/%.exe/}"
25919    # Do not save /bin paths to all_fixpath_prefixes!
25920  else
25921    # Not in mixed or Windows style, start by that.
25922    new_path=`cmd //c echo $new_path`
25923
25924  input_path="$new_path"
25925  # Check if we need to convert this using DOS-style short mode. If the path
25926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25927  # take no chances and rewrite it.
25928  # Note: m4 eats our [], so we need to use [ and ] instead.
25929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25930  if test "x$has_forbidden_chars" != x; then
25931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25933  fi
25934
25935    # Output is in $new_path
25936
25937  windows_path="$new_path"
25938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25939    unix_path=`$CYGPATH -u "$windows_path"`
25940    new_path="$unix_path"
25941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25943    new_path="$unix_path"
25944  fi
25945
25946    # remove trailing .exe if any
25947    new_path="${new_path/%.exe/}"
25948
25949    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25950    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25951  fi
25952
25953  else
25954    # We're on a posix platform. Hooray! :)
25955    # First separate the path from the arguments. This will split at the first
25956    # space.
25957    complete="$GNM"
25958    path="${complete%% *}"
25959    tmp="$complete EOL"
25960    arguments="${tmp#* }"
25961
25962    # Cannot rely on the command "which" here since it doesn't always work.
25963    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25964    if test -z "$is_absolute_path"; then
25965      # Path to executable is not absolute. Find it.
25966      IFS_save="$IFS"
25967      IFS=:
25968      for p in $PATH; do
25969        if test -f "$p/$path" && test -x "$p/$path"; then
25970          new_path="$p/$path"
25971          break
25972        fi
25973      done
25974      IFS="$IFS_save"
25975    else
25976      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
25977$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
25978      new_path="$path"
25979    fi
25980
25981    if test "x$new_path" = x; then
25982        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25983$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25984        has_space=`$ECHO "$complete" | $GREP " "`
25985        if test "x$has_space" != x; then
25986          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25987$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25988        fi
25989        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25990      fi
25991  fi
25992
25993      # Now join together the path and the arguments once again
25994      if test "x$arguments" != xEOL; then
25995        new_complete="$new_path ${arguments% *}"
25996      else
25997        new_complete="$new_path"
25998      fi
25999
26000  if test "x$complete" != "x$new_complete"; then
26001      GNM="$new_complete"
26002      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26003$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26004    fi
26005
26006    # Extract the first word of "strip", so it can be a program name with args.
26007set dummy strip; ac_word=$2
26008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26009$as_echo_n "checking for $ac_word... " >&6; }
26010if test "${ac_cv_path_STRIP+set}" = set; then :
26011  $as_echo_n "(cached) " >&6
26012else
26013  case $STRIP in
26014  [\\/]* | ?:[\\/]*)
26015  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26016  ;;
26017  *)
26018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26019for as_dir in $PATH
26020do
26021  IFS=$as_save_IFS
26022  test -z "$as_dir" && as_dir=.
26023    for ac_exec_ext in '' $ac_executable_extensions; do
26024  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26025    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26027    break 2
26028  fi
26029done
26030  done
26031IFS=$as_save_IFS
26032
26033  ;;
26034esac
26035fi
26036STRIP=$ac_cv_path_STRIP
26037if test -n "$STRIP"; then
26038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26039$as_echo "$STRIP" >&6; }
26040else
26041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26042$as_echo "no" >&6; }
26043fi
26044
26045
26046
26047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26048
26049  # First separate the path from the arguments. This will split at the first
26050  # space.
26051  complete="$STRIP"
26052  path="${complete%% *}"
26053  tmp="$complete EOL"
26054  arguments="${tmp#* }"
26055
26056  # Input might be given as Windows format, start by converting to
26057  # unix format.
26058  new_path=`$CYGPATH -u "$path"`
26059
26060  # Now try to locate executable using which
26061  new_path=`$WHICH "$new_path" 2> /dev/null`
26062  # bat and cmd files are not always considered executable in cygwin causing which
26063  # to not find them
26064  if test "x$new_path" = x \
26065           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26066           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26067    new_path=`$CYGPATH -u "$path"`
26068  fi
26069  if test "x$new_path" = x; then
26070    # Oops. Which didn't find the executable.
26071    # The splitting of arguments from the executable at a space might have been incorrect,
26072    # since paths with space are more likely in Windows. Give it another try with the whole
26073    # argument.
26074    path="$complete"
26075    arguments="EOL"
26076    new_path=`$CYGPATH -u "$path"`
26077    new_path=`$WHICH "$new_path" 2> /dev/null`
26078    # bat and cmd files are not always considered executable in cygwin causing which
26079    # to not find them
26080    if test "x$new_path" = x \
26081             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26082             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26083      new_path=`$CYGPATH -u "$path"`
26084    fi
26085    if test "x$new_path" = x; then
26086      # It's still not found. Now this is an unrecoverable error.
26087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26088$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26089      has_space=`$ECHO "$complete" | $GREP " "`
26090      if test "x$has_space" != x; then
26091        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26092$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26093      fi
26094      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26095    fi
26096  fi
26097
26098  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26099  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26100  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26101  # "foo.exe" is OK but "foo" is an error.
26102  #
26103  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26104  # It is also a way to make sure we got the proper file name for the real test later on.
26105  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26106  if test "x$test_shortpath" = x; then
26107    # Short path failed, file does not exist as specified.
26108    # Try adding .exe or .cmd
26109    if test -f "${new_path}.exe"; then
26110       input_to_shortpath="${new_path}.exe"
26111    elif test -f "${new_path}.cmd"; then
26112       input_to_shortpath="${new_path}.cmd"
26113    else
26114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26115$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26116      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26117$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26118      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26119    fi
26120  else
26121    input_to_shortpath="$new_path"
26122  fi
26123
26124  # Call helper function which possibly converts this using DOS-style short mode.
26125  # If so, the updated path is stored in $new_path.
26126  new_path="$input_to_shortpath"
26127
26128  input_path="$input_to_shortpath"
26129  # Check if we need to convert this using DOS-style short mode. If the path
26130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26131  # take no chances and rewrite it.
26132  # Note: m4 eats our [], so we need to use [ and ] instead.
26133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26134  if test "x$has_forbidden_chars" != x; then
26135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26139      # Going to short mode and back again did indeed matter. Since short mode is
26140      # case insensitive, let's make it lowercase to improve readability.
26141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26142      # Now convert it back to Unix-stile (cygpath)
26143      input_path=`$CYGPATH -u "$shortmode_path"`
26144      new_path="$input_path"
26145    fi
26146  fi
26147
26148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26149  if test "x$test_cygdrive_prefix" = x; then
26150    # As a simple fix, exclude /usr/bin since it's not a real path.
26151    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26153      # a path prefixed by /cygdrive for fixpath to work.
26154      new_path="$CYGWIN_ROOT_PATH$input_path"
26155    fi
26156  fi
26157
26158  # remove trailing .exe if any
26159  new_path="${new_path/%.exe/}"
26160
26161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26162
26163  # First separate the path from the arguments. This will split at the first
26164  # space.
26165  complete="$STRIP"
26166  path="${complete%% *}"
26167  tmp="$complete EOL"
26168  arguments="${tmp#* }"
26169
26170  # Input might be given as Windows format, start by converting to
26171  # unix format.
26172  new_path="$path"
26173
26174  windows_path="$new_path"
26175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26176    unix_path=`$CYGPATH -u "$windows_path"`
26177    new_path="$unix_path"
26178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26180    new_path="$unix_path"
26181  fi
26182
26183
26184  # Now try to locate executable using which
26185  new_path=`$WHICH "$new_path" 2> /dev/null`
26186
26187  if test "x$new_path" = x; then
26188    # Oops. Which didn't find the executable.
26189    # The splitting of arguments from the executable at a space might have been incorrect,
26190    # since paths with space are more likely in Windows. Give it another try with the whole
26191    # argument.
26192    path="$complete"
26193    arguments="EOL"
26194    new_path="$path"
26195
26196  windows_path="$new_path"
26197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26198    unix_path=`$CYGPATH -u "$windows_path"`
26199    new_path="$unix_path"
26200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26202    new_path="$unix_path"
26203  fi
26204
26205
26206    new_path=`$WHICH "$new_path" 2> /dev/null`
26207
26208    if test "x$new_path" = x; then
26209      # It's still not found. Now this is an unrecoverable error.
26210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26211$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26212      has_space=`$ECHO "$complete" | $GREP " "`
26213      if test "x$has_space" != x; then
26214        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26216      fi
26217      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26218    fi
26219  fi
26220
26221  # Now new_path has a complete unix path to the binary
26222  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26223    # Keep paths in /bin as-is, but remove trailing .exe if any
26224    new_path="${new_path/%.exe/}"
26225    # Do not save /bin paths to all_fixpath_prefixes!
26226  else
26227    # Not in mixed or Windows style, start by that.
26228    new_path=`cmd //c echo $new_path`
26229
26230  input_path="$new_path"
26231  # Check if we need to convert this using DOS-style short mode. If the path
26232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26233  # take no chances and rewrite it.
26234  # Note: m4 eats our [], so we need to use [ and ] instead.
26235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26236  if test "x$has_forbidden_chars" != x; then
26237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26239  fi
26240
26241    # Output is in $new_path
26242
26243  windows_path="$new_path"
26244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26245    unix_path=`$CYGPATH -u "$windows_path"`
26246    new_path="$unix_path"
26247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26249    new_path="$unix_path"
26250  fi
26251
26252    # remove trailing .exe if any
26253    new_path="${new_path/%.exe/}"
26254
26255    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26256    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26257  fi
26258
26259  else
26260    # We're on a posix platform. Hooray! :)
26261    # First separate the path from the arguments. This will split at the first
26262    # space.
26263    complete="$STRIP"
26264    path="${complete%% *}"
26265    tmp="$complete EOL"
26266    arguments="${tmp#* }"
26267
26268    # Cannot rely on the command "which" here since it doesn't always work.
26269    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26270    if test -z "$is_absolute_path"; then
26271      # Path to executable is not absolute. Find it.
26272      IFS_save="$IFS"
26273      IFS=:
26274      for p in $PATH; do
26275        if test -f "$p/$path" && test -x "$p/$path"; then
26276          new_path="$p/$path"
26277          break
26278        fi
26279      done
26280      IFS="$IFS_save"
26281    else
26282      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26283$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26284      new_path="$path"
26285    fi
26286
26287    if test "x$new_path" = x; then
26288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26289$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26290        has_space=`$ECHO "$complete" | $GREP " "`
26291        if test "x$has_space" != x; then
26292          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26293$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26294        fi
26295        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26296      fi
26297  fi
26298
26299      # Now join together the path and the arguments once again
26300      if test "x$arguments" != xEOL; then
26301        new_complete="$new_path ${arguments% *}"
26302      else
26303        new_complete="$new_path"
26304      fi
26305
26306  if test "x$complete" != "x$new_complete"; then
26307      STRIP="$new_complete"
26308      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26309$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26310    fi
26311
26312    # Extract the first word of "mcs", so it can be a program name with args.
26313set dummy mcs; ac_word=$2
26314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26315$as_echo_n "checking for $ac_word... " >&6; }
26316if test "${ac_cv_path_MCS+set}" = set; then :
26317  $as_echo_n "(cached) " >&6
26318else
26319  case $MCS in
26320  [\\/]* | ?:[\\/]*)
26321  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26322  ;;
26323  *)
26324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26325for as_dir in $PATH
26326do
26327  IFS=$as_save_IFS
26328  test -z "$as_dir" && as_dir=.
26329    for ac_exec_ext in '' $ac_executable_extensions; do
26330  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26331    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26333    break 2
26334  fi
26335done
26336  done
26337IFS=$as_save_IFS
26338
26339  ;;
26340esac
26341fi
26342MCS=$ac_cv_path_MCS
26343if test -n "$MCS"; then
26344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26345$as_echo "$MCS" >&6; }
26346else
26347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26348$as_echo "no" >&6; }
26349fi
26350
26351
26352
26353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26354
26355  # First separate the path from the arguments. This will split at the first
26356  # space.
26357  complete="$MCS"
26358  path="${complete%% *}"
26359  tmp="$complete EOL"
26360  arguments="${tmp#* }"
26361
26362  # Input might be given as Windows format, start by converting to
26363  # unix format.
26364  new_path=`$CYGPATH -u "$path"`
26365
26366  # Now try to locate executable using which
26367  new_path=`$WHICH "$new_path" 2> /dev/null`
26368  # bat and cmd files are not always considered executable in cygwin causing which
26369  # to not find them
26370  if test "x$new_path" = x \
26371           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26372           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26373    new_path=`$CYGPATH -u "$path"`
26374  fi
26375  if test "x$new_path" = x; then
26376    # Oops. Which didn't find the executable.
26377    # The splitting of arguments from the executable at a space might have been incorrect,
26378    # since paths with space are more likely in Windows. Give it another try with the whole
26379    # argument.
26380    path="$complete"
26381    arguments="EOL"
26382    new_path=`$CYGPATH -u "$path"`
26383    new_path=`$WHICH "$new_path" 2> /dev/null`
26384    # bat and cmd files are not always considered executable in cygwin causing which
26385    # to not find them
26386    if test "x$new_path" = x \
26387             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26388             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26389      new_path=`$CYGPATH -u "$path"`
26390    fi
26391    if test "x$new_path" = x; then
26392      # It's still not found. Now this is an unrecoverable error.
26393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26394$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26395      has_space=`$ECHO "$complete" | $GREP " "`
26396      if test "x$has_space" != x; then
26397        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26398$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26399      fi
26400      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26401    fi
26402  fi
26403
26404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26407  # "foo.exe" is OK but "foo" is an error.
26408  #
26409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26410  # It is also a way to make sure we got the proper file name for the real test later on.
26411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26412  if test "x$test_shortpath" = x; then
26413    # Short path failed, file does not exist as specified.
26414    # Try adding .exe or .cmd
26415    if test -f "${new_path}.exe"; then
26416       input_to_shortpath="${new_path}.exe"
26417    elif test -f "${new_path}.cmd"; then
26418       input_to_shortpath="${new_path}.cmd"
26419    else
26420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26421$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26422      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26423$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26424      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26425    fi
26426  else
26427    input_to_shortpath="$new_path"
26428  fi
26429
26430  # Call helper function which possibly converts this using DOS-style short mode.
26431  # If so, the updated path is stored in $new_path.
26432  new_path="$input_to_shortpath"
26433
26434  input_path="$input_to_shortpath"
26435  # Check if we need to convert this using DOS-style short mode. If the path
26436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26437  # take no chances and rewrite it.
26438  # Note: m4 eats our [], so we need to use [ and ] instead.
26439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26440  if test "x$has_forbidden_chars" != x; then
26441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26445      # Going to short mode and back again did indeed matter. Since short mode is
26446      # case insensitive, let's make it lowercase to improve readability.
26447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26448      # Now convert it back to Unix-stile (cygpath)
26449      input_path=`$CYGPATH -u "$shortmode_path"`
26450      new_path="$input_path"
26451    fi
26452  fi
26453
26454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26455  if test "x$test_cygdrive_prefix" = x; then
26456    # As a simple fix, exclude /usr/bin since it's not a real path.
26457    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26459      # a path prefixed by /cygdrive for fixpath to work.
26460      new_path="$CYGWIN_ROOT_PATH$input_path"
26461    fi
26462  fi
26463
26464  # remove trailing .exe if any
26465  new_path="${new_path/%.exe/}"
26466
26467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26468
26469  # First separate the path from the arguments. This will split at the first
26470  # space.
26471  complete="$MCS"
26472  path="${complete%% *}"
26473  tmp="$complete EOL"
26474  arguments="${tmp#* }"
26475
26476  # Input might be given as Windows format, start by converting to
26477  # unix format.
26478  new_path="$path"
26479
26480  windows_path="$new_path"
26481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26482    unix_path=`$CYGPATH -u "$windows_path"`
26483    new_path="$unix_path"
26484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26486    new_path="$unix_path"
26487  fi
26488
26489
26490  # Now try to locate executable using which
26491  new_path=`$WHICH "$new_path" 2> /dev/null`
26492
26493  if test "x$new_path" = x; then
26494    # Oops. Which didn't find the executable.
26495    # The splitting of arguments from the executable at a space might have been incorrect,
26496    # since paths with space are more likely in Windows. Give it another try with the whole
26497    # argument.
26498    path="$complete"
26499    arguments="EOL"
26500    new_path="$path"
26501
26502  windows_path="$new_path"
26503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26504    unix_path=`$CYGPATH -u "$windows_path"`
26505    new_path="$unix_path"
26506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26508    new_path="$unix_path"
26509  fi
26510
26511
26512    new_path=`$WHICH "$new_path" 2> /dev/null`
26513
26514    if test "x$new_path" = x; then
26515      # It's still not found. Now this is an unrecoverable error.
26516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26517$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26518      has_space=`$ECHO "$complete" | $GREP " "`
26519      if test "x$has_space" != x; then
26520        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26521$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26522      fi
26523      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26524    fi
26525  fi
26526
26527  # Now new_path has a complete unix path to the binary
26528  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26529    # Keep paths in /bin as-is, but remove trailing .exe if any
26530    new_path="${new_path/%.exe/}"
26531    # Do not save /bin paths to all_fixpath_prefixes!
26532  else
26533    # Not in mixed or Windows style, start by that.
26534    new_path=`cmd //c echo $new_path`
26535
26536  input_path="$new_path"
26537  # Check if we need to convert this using DOS-style short mode. If the path
26538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26539  # take no chances and rewrite it.
26540  # Note: m4 eats our [], so we need to use [ and ] instead.
26541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26542  if test "x$has_forbidden_chars" != x; then
26543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26545  fi
26546
26547    # Output is in $new_path
26548
26549  windows_path="$new_path"
26550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26551    unix_path=`$CYGPATH -u "$windows_path"`
26552    new_path="$unix_path"
26553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26555    new_path="$unix_path"
26556  fi
26557
26558    # remove trailing .exe if any
26559    new_path="${new_path/%.exe/}"
26560
26561    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26562    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26563  fi
26564
26565  else
26566    # We're on a posix platform. Hooray! :)
26567    # First separate the path from the arguments. This will split at the first
26568    # space.
26569    complete="$MCS"
26570    path="${complete%% *}"
26571    tmp="$complete EOL"
26572    arguments="${tmp#* }"
26573
26574    # Cannot rely on the command "which" here since it doesn't always work.
26575    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26576    if test -z "$is_absolute_path"; then
26577      # Path to executable is not absolute. Find it.
26578      IFS_save="$IFS"
26579      IFS=:
26580      for p in $PATH; do
26581        if test -f "$p/$path" && test -x "$p/$path"; then
26582          new_path="$p/$path"
26583          break
26584        fi
26585      done
26586      IFS="$IFS_save"
26587    else
26588      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26589$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26590      new_path="$path"
26591    fi
26592
26593    if test "x$new_path" = x; then
26594        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26595$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26596        has_space=`$ECHO "$complete" | $GREP " "`
26597        if test "x$has_space" != x; then
26598          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26599$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26600        fi
26601        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26602      fi
26603  fi
26604
26605      # Now join together the path and the arguments once again
26606      if test "x$arguments" != xEOL; then
26607        new_complete="$new_path ${arguments% *}"
26608      else
26609        new_complete="$new_path"
26610      fi
26611
26612  if test "x$complete" != "x$new_complete"; then
26613      MCS="$new_complete"
26614      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26615$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26616    fi
26617
26618elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26619    if test -n "$ac_tool_prefix"; then
26620  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26621set dummy ${ac_tool_prefix}nm; ac_word=$2
26622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26623$as_echo_n "checking for $ac_word... " >&6; }
26624if test "${ac_cv_prog_NM+set}" = set; then :
26625  $as_echo_n "(cached) " >&6
26626else
26627  if test -n "$NM"; then
26628  ac_cv_prog_NM="$NM" # Let the user override the test.
26629else
26630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26631for as_dir in $PATH
26632do
26633  IFS=$as_save_IFS
26634  test -z "$as_dir" && as_dir=.
26635    for ac_exec_ext in '' $ac_executable_extensions; do
26636  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26637    ac_cv_prog_NM="${ac_tool_prefix}nm"
26638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26639    break 2
26640  fi
26641done
26642  done
26643IFS=$as_save_IFS
26644
26645fi
26646fi
26647NM=$ac_cv_prog_NM
26648if test -n "$NM"; then
26649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26650$as_echo "$NM" >&6; }
26651else
26652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26653$as_echo "no" >&6; }
26654fi
26655
26656
26657fi
26658if test -z "$ac_cv_prog_NM"; then
26659  ac_ct_NM=$NM
26660  # Extract the first word of "nm", so it can be a program name with args.
26661set dummy nm; ac_word=$2
26662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26663$as_echo_n "checking for $ac_word... " >&6; }
26664if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26665  $as_echo_n "(cached) " >&6
26666else
26667  if test -n "$ac_ct_NM"; then
26668  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26669else
26670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26671for as_dir in $PATH
26672do
26673  IFS=$as_save_IFS
26674  test -z "$as_dir" && as_dir=.
26675    for ac_exec_ext in '' $ac_executable_extensions; do
26676  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26677    ac_cv_prog_ac_ct_NM="nm"
26678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26679    break 2
26680  fi
26681done
26682  done
26683IFS=$as_save_IFS
26684
26685fi
26686fi
26687ac_ct_NM=$ac_cv_prog_ac_ct_NM
26688if test -n "$ac_ct_NM"; then
26689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26690$as_echo "$ac_ct_NM" >&6; }
26691else
26692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26693$as_echo "no" >&6; }
26694fi
26695
26696  if test "x$ac_ct_NM" = x; then
26697    NM=""
26698  else
26699    case $cross_compiling:$ac_tool_warned in
26700yes:)
26701{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26702$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26703ac_tool_warned=yes ;;
26704esac
26705    NM=$ac_ct_NM
26706  fi
26707else
26708  NM="$ac_cv_prog_NM"
26709fi
26710
26711
26712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26713
26714  # First separate the path from the arguments. This will split at the first
26715  # space.
26716  complete="$NM"
26717  path="${complete%% *}"
26718  tmp="$complete EOL"
26719  arguments="${tmp#* }"
26720
26721  # Input might be given as Windows format, start by converting to
26722  # unix format.
26723  new_path=`$CYGPATH -u "$path"`
26724
26725  # Now try to locate executable using which
26726  new_path=`$WHICH "$new_path" 2> /dev/null`
26727  # bat and cmd files are not always considered executable in cygwin causing which
26728  # to not find them
26729  if test "x$new_path" = x \
26730           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26731           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26732    new_path=`$CYGPATH -u "$path"`
26733  fi
26734  if test "x$new_path" = x; then
26735    # Oops. Which didn't find the executable.
26736    # The splitting of arguments from the executable at a space might have been incorrect,
26737    # since paths with space are more likely in Windows. Give it another try with the whole
26738    # argument.
26739    path="$complete"
26740    arguments="EOL"
26741    new_path=`$CYGPATH -u "$path"`
26742    new_path=`$WHICH "$new_path" 2> /dev/null`
26743    # bat and cmd files are not always considered executable in cygwin causing which
26744    # to not find them
26745    if test "x$new_path" = x \
26746             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26747             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26748      new_path=`$CYGPATH -u "$path"`
26749    fi
26750    if test "x$new_path" = x; then
26751      # It's still not found. Now this is an unrecoverable error.
26752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26753$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26754      has_space=`$ECHO "$complete" | $GREP " "`
26755      if test "x$has_space" != x; then
26756        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26757$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26758      fi
26759      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26760    fi
26761  fi
26762
26763  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26764  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26765  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26766  # "foo.exe" is OK but "foo" is an error.
26767  #
26768  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26769  # It is also a way to make sure we got the proper file name for the real test later on.
26770  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26771  if test "x$test_shortpath" = x; then
26772    # Short path failed, file does not exist as specified.
26773    # Try adding .exe or .cmd
26774    if test -f "${new_path}.exe"; then
26775       input_to_shortpath="${new_path}.exe"
26776    elif test -f "${new_path}.cmd"; then
26777       input_to_shortpath="${new_path}.cmd"
26778    else
26779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26780$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26781      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26782$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26783      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26784    fi
26785  else
26786    input_to_shortpath="$new_path"
26787  fi
26788
26789  # Call helper function which possibly converts this using DOS-style short mode.
26790  # If so, the updated path is stored in $new_path.
26791  new_path="$input_to_shortpath"
26792
26793  input_path="$input_to_shortpath"
26794  # Check if we need to convert this using DOS-style short mode. If the path
26795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26796  # take no chances and rewrite it.
26797  # Note: m4 eats our [], so we need to use [ and ] instead.
26798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26799  if test "x$has_forbidden_chars" != x; then
26800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26801    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26802    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26803    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26804      # Going to short mode and back again did indeed matter. Since short mode is
26805      # case insensitive, let's make it lowercase to improve readability.
26806      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26807      # Now convert it back to Unix-stile (cygpath)
26808      input_path=`$CYGPATH -u "$shortmode_path"`
26809      new_path="$input_path"
26810    fi
26811  fi
26812
26813  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26814  if test "x$test_cygdrive_prefix" = x; then
26815    # As a simple fix, exclude /usr/bin since it's not a real path.
26816    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26817      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26818      # a path prefixed by /cygdrive for fixpath to work.
26819      new_path="$CYGWIN_ROOT_PATH$input_path"
26820    fi
26821  fi
26822
26823  # remove trailing .exe if any
26824  new_path="${new_path/%.exe/}"
26825
26826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26827
26828  # First separate the path from the arguments. This will split at the first
26829  # space.
26830  complete="$NM"
26831  path="${complete%% *}"
26832  tmp="$complete EOL"
26833  arguments="${tmp#* }"
26834
26835  # Input might be given as Windows format, start by converting to
26836  # unix format.
26837  new_path="$path"
26838
26839  windows_path="$new_path"
26840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26841    unix_path=`$CYGPATH -u "$windows_path"`
26842    new_path="$unix_path"
26843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26845    new_path="$unix_path"
26846  fi
26847
26848
26849  # Now try to locate executable using which
26850  new_path=`$WHICH "$new_path" 2> /dev/null`
26851
26852  if test "x$new_path" = x; then
26853    # Oops. Which didn't find the executable.
26854    # The splitting of arguments from the executable at a space might have been incorrect,
26855    # since paths with space are more likely in Windows. Give it another try with the whole
26856    # argument.
26857    path="$complete"
26858    arguments="EOL"
26859    new_path="$path"
26860
26861  windows_path="$new_path"
26862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26863    unix_path=`$CYGPATH -u "$windows_path"`
26864    new_path="$unix_path"
26865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26867    new_path="$unix_path"
26868  fi
26869
26870
26871    new_path=`$WHICH "$new_path" 2> /dev/null`
26872
26873    if test "x$new_path" = x; then
26874      # It's still not found. Now this is an unrecoverable error.
26875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26876$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26877      has_space=`$ECHO "$complete" | $GREP " "`
26878      if test "x$has_space" != x; then
26879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26881      fi
26882      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26883    fi
26884  fi
26885
26886  # Now new_path has a complete unix path to the binary
26887  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26888    # Keep paths in /bin as-is, but remove trailing .exe if any
26889    new_path="${new_path/%.exe/}"
26890    # Do not save /bin paths to all_fixpath_prefixes!
26891  else
26892    # Not in mixed or Windows style, start by that.
26893    new_path=`cmd //c echo $new_path`
26894
26895  input_path="$new_path"
26896  # Check if we need to convert this using DOS-style short mode. If the path
26897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26898  # take no chances and rewrite it.
26899  # Note: m4 eats our [], so we need to use [ and ] instead.
26900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26901  if test "x$has_forbidden_chars" != x; then
26902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26904  fi
26905
26906    # Output is in $new_path
26907
26908  windows_path="$new_path"
26909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26910    unix_path=`$CYGPATH -u "$windows_path"`
26911    new_path="$unix_path"
26912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26914    new_path="$unix_path"
26915  fi
26916
26917    # remove trailing .exe if any
26918    new_path="${new_path/%.exe/}"
26919
26920    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26921    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26922  fi
26923
26924  else
26925    # We're on a posix platform. Hooray! :)
26926    # First separate the path from the arguments. This will split at the first
26927    # space.
26928    complete="$NM"
26929    path="${complete%% *}"
26930    tmp="$complete EOL"
26931    arguments="${tmp#* }"
26932
26933    # Cannot rely on the command "which" here since it doesn't always work.
26934    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26935    if test -z "$is_absolute_path"; then
26936      # Path to executable is not absolute. Find it.
26937      IFS_save="$IFS"
26938      IFS=:
26939      for p in $PATH; do
26940        if test -f "$p/$path" && test -x "$p/$path"; then
26941          new_path="$p/$path"
26942          break
26943        fi
26944      done
26945      IFS="$IFS_save"
26946    else
26947      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26948$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26949      new_path="$path"
26950    fi
26951
26952    if test "x$new_path" = x; then
26953        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26954$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26955        has_space=`$ECHO "$complete" | $GREP " "`
26956        if test "x$has_space" != x; then
26957          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26958$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26959        fi
26960        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26961      fi
26962  fi
26963
26964      # Now join together the path and the arguments once again
26965      if test "x$arguments" != xEOL; then
26966        new_complete="$new_path ${arguments% *}"
26967      else
26968        new_complete="$new_path"
26969      fi
26970
26971  if test "x$complete" != "x$new_complete"; then
26972      NM="$new_complete"
26973      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26974$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26975    fi
26976
26977    GNM="$NM"
26978
26979    if test -n "$ac_tool_prefix"; then
26980  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26981set dummy ${ac_tool_prefix}strip; ac_word=$2
26982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26983$as_echo_n "checking for $ac_word... " >&6; }
26984if test "${ac_cv_prog_STRIP+set}" = set; then :
26985  $as_echo_n "(cached) " >&6
26986else
26987  if test -n "$STRIP"; then
26988  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26989else
26990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26991for as_dir in $PATH
26992do
26993  IFS=$as_save_IFS
26994  test -z "$as_dir" && as_dir=.
26995    for ac_exec_ext in '' $ac_executable_extensions; do
26996  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26997    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26999    break 2
27000  fi
27001done
27002  done
27003IFS=$as_save_IFS
27004
27005fi
27006fi
27007STRIP=$ac_cv_prog_STRIP
27008if test -n "$STRIP"; then
27009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27010$as_echo "$STRIP" >&6; }
27011else
27012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27013$as_echo "no" >&6; }
27014fi
27015
27016
27017fi
27018if test -z "$ac_cv_prog_STRIP"; then
27019  ac_ct_STRIP=$STRIP
27020  # Extract the first word of "strip", so it can be a program name with args.
27021set dummy strip; ac_word=$2
27022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27023$as_echo_n "checking for $ac_word... " >&6; }
27024if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
27025  $as_echo_n "(cached) " >&6
27026else
27027  if test -n "$ac_ct_STRIP"; then
27028  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27029else
27030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27031for as_dir in $PATH
27032do
27033  IFS=$as_save_IFS
27034  test -z "$as_dir" && as_dir=.
27035    for ac_exec_ext in '' $ac_executable_extensions; do
27036  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27037    ac_cv_prog_ac_ct_STRIP="strip"
27038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27039    break 2
27040  fi
27041done
27042  done
27043IFS=$as_save_IFS
27044
27045fi
27046fi
27047ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27048if test -n "$ac_ct_STRIP"; then
27049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27050$as_echo "$ac_ct_STRIP" >&6; }
27051else
27052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27053$as_echo "no" >&6; }
27054fi
27055
27056  if test "x$ac_ct_STRIP" = x; then
27057    STRIP=""
27058  else
27059    case $cross_compiling:$ac_tool_warned in
27060yes:)
27061{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27062$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27063ac_tool_warned=yes ;;
27064esac
27065    STRIP=$ac_ct_STRIP
27066  fi
27067else
27068  STRIP="$ac_cv_prog_STRIP"
27069fi
27070
27071
27072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27073
27074  # First separate the path from the arguments. This will split at the first
27075  # space.
27076  complete="$STRIP"
27077  path="${complete%% *}"
27078  tmp="$complete EOL"
27079  arguments="${tmp#* }"
27080
27081  # Input might be given as Windows format, start by converting to
27082  # unix format.
27083  new_path=`$CYGPATH -u "$path"`
27084
27085  # Now try to locate executable using which
27086  new_path=`$WHICH "$new_path" 2> /dev/null`
27087  # bat and cmd files are not always considered executable in cygwin causing which
27088  # to not find them
27089  if test "x$new_path" = x \
27090           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27091           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27092    new_path=`$CYGPATH -u "$path"`
27093  fi
27094  if test "x$new_path" = x; then
27095    # Oops. Which didn't find the executable.
27096    # The splitting of arguments from the executable at a space might have been incorrect,
27097    # since paths with space are more likely in Windows. Give it another try with the whole
27098    # argument.
27099    path="$complete"
27100    arguments="EOL"
27101    new_path=`$CYGPATH -u "$path"`
27102    new_path=`$WHICH "$new_path" 2> /dev/null`
27103    # bat and cmd files are not always considered executable in cygwin causing which
27104    # to not find them
27105    if test "x$new_path" = x \
27106             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27107             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27108      new_path=`$CYGPATH -u "$path"`
27109    fi
27110    if test "x$new_path" = x; then
27111      # It's still not found. Now this is an unrecoverable error.
27112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27113$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27114      has_space=`$ECHO "$complete" | $GREP " "`
27115      if test "x$has_space" != x; then
27116        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27117$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27118      fi
27119      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27120    fi
27121  fi
27122
27123  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27124  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27125  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27126  # "foo.exe" is OK but "foo" is an error.
27127  #
27128  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27129  # It is also a way to make sure we got the proper file name for the real test later on.
27130  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27131  if test "x$test_shortpath" = x; then
27132    # Short path failed, file does not exist as specified.
27133    # Try adding .exe or .cmd
27134    if test -f "${new_path}.exe"; then
27135       input_to_shortpath="${new_path}.exe"
27136    elif test -f "${new_path}.cmd"; then
27137       input_to_shortpath="${new_path}.cmd"
27138    else
27139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27140$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27141      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27142$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27143      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27144    fi
27145  else
27146    input_to_shortpath="$new_path"
27147  fi
27148
27149  # Call helper function which possibly converts this using DOS-style short mode.
27150  # If so, the updated path is stored in $new_path.
27151  new_path="$input_to_shortpath"
27152
27153  input_path="$input_to_shortpath"
27154  # Check if we need to convert this using DOS-style short mode. If the path
27155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27156  # take no chances and rewrite it.
27157  # Note: m4 eats our [], so we need to use [ and ] instead.
27158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27159  if test "x$has_forbidden_chars" != x; then
27160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27161    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27162    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27163    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27164      # Going to short mode and back again did indeed matter. Since short mode is
27165      # case insensitive, let's make it lowercase to improve readability.
27166      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27167      # Now convert it back to Unix-stile (cygpath)
27168      input_path=`$CYGPATH -u "$shortmode_path"`
27169      new_path="$input_path"
27170    fi
27171  fi
27172
27173  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27174  if test "x$test_cygdrive_prefix" = x; then
27175    # As a simple fix, exclude /usr/bin since it's not a real path.
27176    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27177      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27178      # a path prefixed by /cygdrive for fixpath to work.
27179      new_path="$CYGWIN_ROOT_PATH$input_path"
27180    fi
27181  fi
27182
27183  # remove trailing .exe if any
27184  new_path="${new_path/%.exe/}"
27185
27186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27187
27188  # First separate the path from the arguments. This will split at the first
27189  # space.
27190  complete="$STRIP"
27191  path="${complete%% *}"
27192  tmp="$complete EOL"
27193  arguments="${tmp#* }"
27194
27195  # Input might be given as Windows format, start by converting to
27196  # unix format.
27197  new_path="$path"
27198
27199  windows_path="$new_path"
27200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27201    unix_path=`$CYGPATH -u "$windows_path"`
27202    new_path="$unix_path"
27203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27205    new_path="$unix_path"
27206  fi
27207
27208
27209  # Now try to locate executable using which
27210  new_path=`$WHICH "$new_path" 2> /dev/null`
27211
27212  if test "x$new_path" = x; then
27213    # Oops. Which didn't find the executable.
27214    # The splitting of arguments from the executable at a space might have been incorrect,
27215    # since paths with space are more likely in Windows. Give it another try with the whole
27216    # argument.
27217    path="$complete"
27218    arguments="EOL"
27219    new_path="$path"
27220
27221  windows_path="$new_path"
27222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27223    unix_path=`$CYGPATH -u "$windows_path"`
27224    new_path="$unix_path"
27225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27227    new_path="$unix_path"
27228  fi
27229
27230
27231    new_path=`$WHICH "$new_path" 2> /dev/null`
27232
27233    if test "x$new_path" = x; then
27234      # It's still not found. Now this is an unrecoverable error.
27235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27236$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27237      has_space=`$ECHO "$complete" | $GREP " "`
27238      if test "x$has_space" != x; then
27239        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27240$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27241      fi
27242      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27243    fi
27244  fi
27245
27246  # Now new_path has a complete unix path to the binary
27247  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27248    # Keep paths in /bin as-is, but remove trailing .exe if any
27249    new_path="${new_path/%.exe/}"
27250    # Do not save /bin paths to all_fixpath_prefixes!
27251  else
27252    # Not in mixed or Windows style, start by that.
27253    new_path=`cmd //c echo $new_path`
27254
27255  input_path="$new_path"
27256  # Check if we need to convert this using DOS-style short mode. If the path
27257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27258  # take no chances and rewrite it.
27259  # Note: m4 eats our [], so we need to use [ and ] instead.
27260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27261  if test "x$has_forbidden_chars" != x; then
27262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27263    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27264  fi
27265
27266    # Output is in $new_path
27267
27268  windows_path="$new_path"
27269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27270    unix_path=`$CYGPATH -u "$windows_path"`
27271    new_path="$unix_path"
27272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27274    new_path="$unix_path"
27275  fi
27276
27277    # remove trailing .exe if any
27278    new_path="${new_path/%.exe/}"
27279
27280    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27281    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27282  fi
27283
27284  else
27285    # We're on a posix platform. Hooray! :)
27286    # First separate the path from the arguments. This will split at the first
27287    # space.
27288    complete="$STRIP"
27289    path="${complete%% *}"
27290    tmp="$complete EOL"
27291    arguments="${tmp#* }"
27292
27293    # Cannot rely on the command "which" here since it doesn't always work.
27294    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27295    if test -z "$is_absolute_path"; then
27296      # Path to executable is not absolute. Find it.
27297      IFS_save="$IFS"
27298      IFS=:
27299      for p in $PATH; do
27300        if test -f "$p/$path" && test -x "$p/$path"; then
27301          new_path="$p/$path"
27302          break
27303        fi
27304      done
27305      IFS="$IFS_save"
27306    else
27307      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27308$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27309      new_path="$path"
27310    fi
27311
27312    if test "x$new_path" = x; then
27313        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27314$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27315        has_space=`$ECHO "$complete" | $GREP " "`
27316        if test "x$has_space" != x; then
27317          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27318$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27319        fi
27320        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27321      fi
27322  fi
27323
27324      # Now join together the path and the arguments once again
27325      if test "x$arguments" != xEOL; then
27326        new_complete="$new_path ${arguments% *}"
27327      else
27328        new_complete="$new_path"
27329      fi
27330
27331  if test "x$complete" != "x$new_complete"; then
27332      STRIP="$new_complete"
27333      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27334$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27335    fi
27336
27337fi
27338
27339# objcopy is used for moving debug symbols to separate files when
27340# full debug symbols are enabled.
27341if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27342    if test -n "$ac_tool_prefix"; then
27343  for ac_prog in gobjcopy objcopy
27344  do
27345    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27346set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27348$as_echo_n "checking for $ac_word... " >&6; }
27349if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
27350  $as_echo_n "(cached) " >&6
27351else
27352  if test -n "$OBJCOPY"; then
27353  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27354else
27355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27356for as_dir in $PATH
27357do
27358  IFS=$as_save_IFS
27359  test -z "$as_dir" && as_dir=.
27360    for ac_exec_ext in '' $ac_executable_extensions; do
27361  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27362    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27364    break 2
27365  fi
27366done
27367  done
27368IFS=$as_save_IFS
27369
27370fi
27371fi
27372OBJCOPY=$ac_cv_prog_OBJCOPY
27373if test -n "$OBJCOPY"; then
27374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27375$as_echo "$OBJCOPY" >&6; }
27376else
27377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27378$as_echo "no" >&6; }
27379fi
27380
27381
27382    test -n "$OBJCOPY" && break
27383  done
27384fi
27385if test -z "$OBJCOPY"; then
27386  ac_ct_OBJCOPY=$OBJCOPY
27387  for ac_prog in gobjcopy objcopy
27388do
27389  # Extract the first word of "$ac_prog", so it can be a program name with args.
27390set dummy $ac_prog; ac_word=$2
27391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27392$as_echo_n "checking for $ac_word... " >&6; }
27393if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
27394  $as_echo_n "(cached) " >&6
27395else
27396  if test -n "$ac_ct_OBJCOPY"; then
27397  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27398else
27399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27400for as_dir in $PATH
27401do
27402  IFS=$as_save_IFS
27403  test -z "$as_dir" && as_dir=.
27404    for ac_exec_ext in '' $ac_executable_extensions; do
27405  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27406    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27408    break 2
27409  fi
27410done
27411  done
27412IFS=$as_save_IFS
27413
27414fi
27415fi
27416ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27417if test -n "$ac_ct_OBJCOPY"; then
27418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27419$as_echo "$ac_ct_OBJCOPY" >&6; }
27420else
27421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27422$as_echo "no" >&6; }
27423fi
27424
27425
27426  test -n "$ac_ct_OBJCOPY" && break
27427done
27428
27429  if test "x$ac_ct_OBJCOPY" = x; then
27430    OBJCOPY=""
27431  else
27432    case $cross_compiling:$ac_tool_warned in
27433yes:)
27434{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27435$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27436ac_tool_warned=yes ;;
27437esac
27438    OBJCOPY=$ac_ct_OBJCOPY
27439  fi
27440fi
27441
27442    # Only call fixup if objcopy was found.
27443    if test -n "$OBJCOPY"; then
27444
27445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27446
27447  # First separate the path from the arguments. This will split at the first
27448  # space.
27449  complete="$OBJCOPY"
27450  path="${complete%% *}"
27451  tmp="$complete EOL"
27452  arguments="${tmp#* }"
27453
27454  # Input might be given as Windows format, start by converting to
27455  # unix format.
27456  new_path=`$CYGPATH -u "$path"`
27457
27458  # Now try to locate executable using which
27459  new_path=`$WHICH "$new_path" 2> /dev/null`
27460  # bat and cmd files are not always considered executable in cygwin causing which
27461  # to not find them
27462  if test "x$new_path" = x \
27463           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27464           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27465    new_path=`$CYGPATH -u "$path"`
27466  fi
27467  if test "x$new_path" = x; then
27468    # Oops. Which didn't find the executable.
27469    # The splitting of arguments from the executable at a space might have been incorrect,
27470    # since paths with space are more likely in Windows. Give it another try with the whole
27471    # argument.
27472    path="$complete"
27473    arguments="EOL"
27474    new_path=`$CYGPATH -u "$path"`
27475    new_path=`$WHICH "$new_path" 2> /dev/null`
27476    # bat and cmd files are not always considered executable in cygwin causing which
27477    # to not find them
27478    if test "x$new_path" = x \
27479             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27480             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27481      new_path=`$CYGPATH -u "$path"`
27482    fi
27483    if test "x$new_path" = x; then
27484      # It's still not found. Now this is an unrecoverable error.
27485      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27486$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27487      has_space=`$ECHO "$complete" | $GREP " "`
27488      if test "x$has_space" != x; then
27489        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27490$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27491      fi
27492      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27493    fi
27494  fi
27495
27496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27499  # "foo.exe" is OK but "foo" is an error.
27500  #
27501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27502  # It is also a way to make sure we got the proper file name for the real test later on.
27503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27504  if test "x$test_shortpath" = x; then
27505    # Short path failed, file does not exist as specified.
27506    # Try adding .exe or .cmd
27507    if test -f "${new_path}.exe"; then
27508       input_to_shortpath="${new_path}.exe"
27509    elif test -f "${new_path}.cmd"; then
27510       input_to_shortpath="${new_path}.cmd"
27511    else
27512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27513$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27514      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27515$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27516      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27517    fi
27518  else
27519    input_to_shortpath="$new_path"
27520  fi
27521
27522  # Call helper function which possibly converts this using DOS-style short mode.
27523  # If so, the updated path is stored in $new_path.
27524  new_path="$input_to_shortpath"
27525
27526  input_path="$input_to_shortpath"
27527  # Check if we need to convert this using DOS-style short mode. If the path
27528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27529  # take no chances and rewrite it.
27530  # Note: m4 eats our [], so we need to use [ and ] instead.
27531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27532  if test "x$has_forbidden_chars" != x; then
27533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27534    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27535    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27536    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27537      # Going to short mode and back again did indeed matter. Since short mode is
27538      # case insensitive, let's make it lowercase to improve readability.
27539      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27540      # Now convert it back to Unix-stile (cygpath)
27541      input_path=`$CYGPATH -u "$shortmode_path"`
27542      new_path="$input_path"
27543    fi
27544  fi
27545
27546  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27547  if test "x$test_cygdrive_prefix" = x; then
27548    # As a simple fix, exclude /usr/bin since it's not a real path.
27549    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27550      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27551      # a path prefixed by /cygdrive for fixpath to work.
27552      new_path="$CYGWIN_ROOT_PATH$input_path"
27553    fi
27554  fi
27555
27556  # remove trailing .exe if any
27557  new_path="${new_path/%.exe/}"
27558
27559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27560
27561  # First separate the path from the arguments. This will split at the first
27562  # space.
27563  complete="$OBJCOPY"
27564  path="${complete%% *}"
27565  tmp="$complete EOL"
27566  arguments="${tmp#* }"
27567
27568  # Input might be given as Windows format, start by converting to
27569  # unix format.
27570  new_path="$path"
27571
27572  windows_path="$new_path"
27573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27574    unix_path=`$CYGPATH -u "$windows_path"`
27575    new_path="$unix_path"
27576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27578    new_path="$unix_path"
27579  fi
27580
27581
27582  # Now try to locate executable using which
27583  new_path=`$WHICH "$new_path" 2> /dev/null`
27584
27585  if test "x$new_path" = x; then
27586    # Oops. Which didn't find the executable.
27587    # The splitting of arguments from the executable at a space might have been incorrect,
27588    # since paths with space are more likely in Windows. Give it another try with the whole
27589    # argument.
27590    path="$complete"
27591    arguments="EOL"
27592    new_path="$path"
27593
27594  windows_path="$new_path"
27595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27596    unix_path=`$CYGPATH -u "$windows_path"`
27597    new_path="$unix_path"
27598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27600    new_path="$unix_path"
27601  fi
27602
27603
27604    new_path=`$WHICH "$new_path" 2> /dev/null`
27605
27606    if test "x$new_path" = x; then
27607      # It's still not found. Now this is an unrecoverable error.
27608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27609$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27610      has_space=`$ECHO "$complete" | $GREP " "`
27611      if test "x$has_space" != x; then
27612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27614      fi
27615      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27616    fi
27617  fi
27618
27619  # Now new_path has a complete unix path to the binary
27620  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27621    # Keep paths in /bin as-is, but remove trailing .exe if any
27622    new_path="${new_path/%.exe/}"
27623    # Do not save /bin paths to all_fixpath_prefixes!
27624  else
27625    # Not in mixed or Windows style, start by that.
27626    new_path=`cmd //c echo $new_path`
27627
27628  input_path="$new_path"
27629  # Check if we need to convert this using DOS-style short mode. If the path
27630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27631  # take no chances and rewrite it.
27632  # Note: m4 eats our [], so we need to use [ and ] instead.
27633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27634  if test "x$has_forbidden_chars" != x; then
27635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27637  fi
27638
27639    # Output is in $new_path
27640
27641  windows_path="$new_path"
27642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27643    unix_path=`$CYGPATH -u "$windows_path"`
27644    new_path="$unix_path"
27645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27647    new_path="$unix_path"
27648  fi
27649
27650    # remove trailing .exe if any
27651    new_path="${new_path/%.exe/}"
27652
27653    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27654    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27655  fi
27656
27657  else
27658    # We're on a posix platform. Hooray! :)
27659    # First separate the path from the arguments. This will split at the first
27660    # space.
27661    complete="$OBJCOPY"
27662    path="${complete%% *}"
27663    tmp="$complete EOL"
27664    arguments="${tmp#* }"
27665
27666    # Cannot rely on the command "which" here since it doesn't always work.
27667    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27668    if test -z "$is_absolute_path"; then
27669      # Path to executable is not absolute. Find it.
27670      IFS_save="$IFS"
27671      IFS=:
27672      for p in $PATH; do
27673        if test -f "$p/$path" && test -x "$p/$path"; then
27674          new_path="$p/$path"
27675          break
27676        fi
27677      done
27678      IFS="$IFS_save"
27679    else
27680      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27681$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27682      new_path="$path"
27683    fi
27684
27685    if test "x$new_path" = x; then
27686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27687$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27688        has_space=`$ECHO "$complete" | $GREP " "`
27689        if test "x$has_space" != x; then
27690          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27691$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27692        fi
27693        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27694      fi
27695  fi
27696
27697      # Now join together the path and the arguments once again
27698      if test "x$arguments" != xEOL; then
27699        new_complete="$new_path ${arguments% *}"
27700      else
27701        new_complete="$new_path"
27702      fi
27703
27704  if test "x$complete" != "x$new_complete"; then
27705      OBJCOPY="$new_complete"
27706      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27707$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27708    fi
27709
27710    fi
27711fi
27712
27713if test -n "$ac_tool_prefix"; then
27714  for ac_prog in gobjdump objdump
27715  do
27716    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27717set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27719$as_echo_n "checking for $ac_word... " >&6; }
27720if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
27721  $as_echo_n "(cached) " >&6
27722else
27723  if test -n "$OBJDUMP"; then
27724  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27725else
27726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27727for as_dir in $PATH
27728do
27729  IFS=$as_save_IFS
27730  test -z "$as_dir" && as_dir=.
27731    for ac_exec_ext in '' $ac_executable_extensions; do
27732  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27733    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27735    break 2
27736  fi
27737done
27738  done
27739IFS=$as_save_IFS
27740
27741fi
27742fi
27743OBJDUMP=$ac_cv_prog_OBJDUMP
27744if test -n "$OBJDUMP"; then
27745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27746$as_echo "$OBJDUMP" >&6; }
27747else
27748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27749$as_echo "no" >&6; }
27750fi
27751
27752
27753    test -n "$OBJDUMP" && break
27754  done
27755fi
27756if test -z "$OBJDUMP"; then
27757  ac_ct_OBJDUMP=$OBJDUMP
27758  for ac_prog in gobjdump objdump
27759do
27760  # Extract the first word of "$ac_prog", so it can be a program name with args.
27761set dummy $ac_prog; ac_word=$2
27762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27763$as_echo_n "checking for $ac_word... " >&6; }
27764if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
27765  $as_echo_n "(cached) " >&6
27766else
27767  if test -n "$ac_ct_OBJDUMP"; then
27768  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27769else
27770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27771for as_dir in $PATH
27772do
27773  IFS=$as_save_IFS
27774  test -z "$as_dir" && as_dir=.
27775    for ac_exec_ext in '' $ac_executable_extensions; do
27776  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27777    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27779    break 2
27780  fi
27781done
27782  done
27783IFS=$as_save_IFS
27784
27785fi
27786fi
27787ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27788if test -n "$ac_ct_OBJDUMP"; then
27789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27790$as_echo "$ac_ct_OBJDUMP" >&6; }
27791else
27792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27793$as_echo "no" >&6; }
27794fi
27795
27796
27797  test -n "$ac_ct_OBJDUMP" && break
27798done
27799
27800  if test "x$ac_ct_OBJDUMP" = x; then
27801    OBJDUMP=""
27802  else
27803    case $cross_compiling:$ac_tool_warned in
27804yes:)
27805{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27806$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27807ac_tool_warned=yes ;;
27808esac
27809    OBJDUMP=$ac_ct_OBJDUMP
27810  fi
27811fi
27812
27813if test "x$OBJDUMP" != x; then
27814  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27815
27816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27817
27818  # First separate the path from the arguments. This will split at the first
27819  # space.
27820  complete="$OBJDUMP"
27821  path="${complete%% *}"
27822  tmp="$complete EOL"
27823  arguments="${tmp#* }"
27824
27825  # Input might be given as Windows format, start by converting to
27826  # unix format.
27827  new_path=`$CYGPATH -u "$path"`
27828
27829  # Now try to locate executable using which
27830  new_path=`$WHICH "$new_path" 2> /dev/null`
27831  # bat and cmd files are not always considered executable in cygwin causing which
27832  # to not find them
27833  if test "x$new_path" = x \
27834           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27835           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27836    new_path=`$CYGPATH -u "$path"`
27837  fi
27838  if test "x$new_path" = x; then
27839    # Oops. Which didn't find the executable.
27840    # The splitting of arguments from the executable at a space might have been incorrect,
27841    # since paths with space are more likely in Windows. Give it another try with the whole
27842    # argument.
27843    path="$complete"
27844    arguments="EOL"
27845    new_path=`$CYGPATH -u "$path"`
27846    new_path=`$WHICH "$new_path" 2> /dev/null`
27847    # bat and cmd files are not always considered executable in cygwin causing which
27848    # to not find them
27849    if test "x$new_path" = x \
27850             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27851             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27852      new_path=`$CYGPATH -u "$path"`
27853    fi
27854    if test "x$new_path" = x; then
27855      # It's still not found. Now this is an unrecoverable error.
27856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27857$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27858      has_space=`$ECHO "$complete" | $GREP " "`
27859      if test "x$has_space" != x; then
27860        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27861$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27862      fi
27863      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27864    fi
27865  fi
27866
27867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27870  # "foo.exe" is OK but "foo" is an error.
27871  #
27872  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27873  # It is also a way to make sure we got the proper file name for the real test later on.
27874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27875  if test "x$test_shortpath" = x; then
27876    # Short path failed, file does not exist as specified.
27877    # Try adding .exe or .cmd
27878    if test -f "${new_path}.exe"; then
27879       input_to_shortpath="${new_path}.exe"
27880    elif test -f "${new_path}.cmd"; then
27881       input_to_shortpath="${new_path}.cmd"
27882    else
27883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27884$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27885      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27886$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27887      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27888    fi
27889  else
27890    input_to_shortpath="$new_path"
27891  fi
27892
27893  # Call helper function which possibly converts this using DOS-style short mode.
27894  # If so, the updated path is stored in $new_path.
27895  new_path="$input_to_shortpath"
27896
27897  input_path="$input_to_shortpath"
27898  # Check if we need to convert this using DOS-style short mode. If the path
27899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27900  # take no chances and rewrite it.
27901  # Note: m4 eats our [], so we need to use [ and ] instead.
27902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27903  if test "x$has_forbidden_chars" != x; then
27904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27908      # Going to short mode and back again did indeed matter. Since short mode is
27909      # case insensitive, let's make it lowercase to improve readability.
27910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27911      # Now convert it back to Unix-stile (cygpath)
27912      input_path=`$CYGPATH -u "$shortmode_path"`
27913      new_path="$input_path"
27914    fi
27915  fi
27916
27917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27918  if test "x$test_cygdrive_prefix" = x; then
27919    # As a simple fix, exclude /usr/bin since it's not a real path.
27920    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27922      # a path prefixed by /cygdrive for fixpath to work.
27923      new_path="$CYGWIN_ROOT_PATH$input_path"
27924    fi
27925  fi
27926
27927  # remove trailing .exe if any
27928  new_path="${new_path/%.exe/}"
27929
27930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27931
27932  # First separate the path from the arguments. This will split at the first
27933  # space.
27934  complete="$OBJDUMP"
27935  path="${complete%% *}"
27936  tmp="$complete EOL"
27937  arguments="${tmp#* }"
27938
27939  # Input might be given as Windows format, start by converting to
27940  # unix format.
27941  new_path="$path"
27942
27943  windows_path="$new_path"
27944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27945    unix_path=`$CYGPATH -u "$windows_path"`
27946    new_path="$unix_path"
27947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27949    new_path="$unix_path"
27950  fi
27951
27952
27953  # Now try to locate executable using which
27954  new_path=`$WHICH "$new_path" 2> /dev/null`
27955
27956  if test "x$new_path" = x; then
27957    # Oops. Which didn't find the executable.
27958    # The splitting of arguments from the executable at a space might have been incorrect,
27959    # since paths with space are more likely in Windows. Give it another try with the whole
27960    # argument.
27961    path="$complete"
27962    arguments="EOL"
27963    new_path="$path"
27964
27965  windows_path="$new_path"
27966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27967    unix_path=`$CYGPATH -u "$windows_path"`
27968    new_path="$unix_path"
27969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27971    new_path="$unix_path"
27972  fi
27973
27974
27975    new_path=`$WHICH "$new_path" 2> /dev/null`
27976
27977    if test "x$new_path" = x; then
27978      # It's still not found. Now this is an unrecoverable error.
27979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27980$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27981      has_space=`$ECHO "$complete" | $GREP " "`
27982      if test "x$has_space" != x; then
27983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27985      fi
27986      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27987    fi
27988  fi
27989
27990  # Now new_path has a complete unix path to the binary
27991  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27992    # Keep paths in /bin as-is, but remove trailing .exe if any
27993    new_path="${new_path/%.exe/}"
27994    # Do not save /bin paths to all_fixpath_prefixes!
27995  else
27996    # Not in mixed or Windows style, start by that.
27997    new_path=`cmd //c echo $new_path`
27998
27999  input_path="$new_path"
28000  # Check if we need to convert this using DOS-style short mode. If the path
28001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28002  # take no chances and rewrite it.
28003  # Note: m4 eats our [], so we need to use [ and ] instead.
28004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28005  if test "x$has_forbidden_chars" != x; then
28006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28008  fi
28009
28010    # Output is in $new_path
28011
28012  windows_path="$new_path"
28013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28014    unix_path=`$CYGPATH -u "$windows_path"`
28015    new_path="$unix_path"
28016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28018    new_path="$unix_path"
28019  fi
28020
28021    # remove trailing .exe if any
28022    new_path="${new_path/%.exe/}"
28023
28024    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28025    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28026  fi
28027
28028  else
28029    # We're on a posix platform. Hooray! :)
28030    # First separate the path from the arguments. This will split at the first
28031    # space.
28032    complete="$OBJDUMP"
28033    path="${complete%% *}"
28034    tmp="$complete EOL"
28035    arguments="${tmp#* }"
28036
28037    # Cannot rely on the command "which" here since it doesn't always work.
28038    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28039    if test -z "$is_absolute_path"; then
28040      # Path to executable is not absolute. Find it.
28041      IFS_save="$IFS"
28042      IFS=:
28043      for p in $PATH; do
28044        if test -f "$p/$path" && test -x "$p/$path"; then
28045          new_path="$p/$path"
28046          break
28047        fi
28048      done
28049      IFS="$IFS_save"
28050    else
28051      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28052$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28053      new_path="$path"
28054    fi
28055
28056    if test "x$new_path" = x; then
28057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28058$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28059        has_space=`$ECHO "$complete" | $GREP " "`
28060        if test "x$has_space" != x; then
28061          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28062$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28063        fi
28064        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28065      fi
28066  fi
28067
28068      # Now join together the path and the arguments once again
28069      if test "x$arguments" != xEOL; then
28070        new_complete="$new_path ${arguments% *}"
28071      else
28072        new_complete="$new_path"
28073      fi
28074
28075  if test "x$complete" != "x$new_complete"; then
28076      OBJDUMP="$new_complete"
28077      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28078$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28079    fi
28080
28081fi
28082
28083if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28084   # Extract the first word of "lipo", so it can be a program name with args.
28085set dummy lipo; ac_word=$2
28086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28087$as_echo_n "checking for $ac_word... " >&6; }
28088if test "${ac_cv_path_LIPO+set}" = set; then :
28089  $as_echo_n "(cached) " >&6
28090else
28091  case $LIPO in
28092  [\\/]* | ?:[\\/]*)
28093  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28094  ;;
28095  *)
28096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28097for as_dir in $PATH
28098do
28099  IFS=$as_save_IFS
28100  test -z "$as_dir" && as_dir=.
28101    for ac_exec_ext in '' $ac_executable_extensions; do
28102  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28103    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28105    break 2
28106  fi
28107done
28108  done
28109IFS=$as_save_IFS
28110
28111  ;;
28112esac
28113fi
28114LIPO=$ac_cv_path_LIPO
28115if test -n "$LIPO"; then
28116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28117$as_echo "$LIPO" >&6; }
28118else
28119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28120$as_echo "no" >&6; }
28121fi
28122
28123
28124
28125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28126
28127  # First separate the path from the arguments. This will split at the first
28128  # space.
28129  complete="$LIPO"
28130  path="${complete%% *}"
28131  tmp="$complete EOL"
28132  arguments="${tmp#* }"
28133
28134  # Input might be given as Windows format, start by converting to
28135  # unix format.
28136  new_path=`$CYGPATH -u "$path"`
28137
28138  # Now try to locate executable using which
28139  new_path=`$WHICH "$new_path" 2> /dev/null`
28140  # bat and cmd files are not always considered executable in cygwin causing which
28141  # to not find them
28142  if test "x$new_path" = x \
28143           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28144           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28145    new_path=`$CYGPATH -u "$path"`
28146  fi
28147  if test "x$new_path" = x; then
28148    # Oops. Which didn't find the executable.
28149    # The splitting of arguments from the executable at a space might have been incorrect,
28150    # since paths with space are more likely in Windows. Give it another try with the whole
28151    # argument.
28152    path="$complete"
28153    arguments="EOL"
28154    new_path=`$CYGPATH -u "$path"`
28155    new_path=`$WHICH "$new_path" 2> /dev/null`
28156    # bat and cmd files are not always considered executable in cygwin causing which
28157    # to not find them
28158    if test "x$new_path" = x \
28159             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28160             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28161      new_path=`$CYGPATH -u "$path"`
28162    fi
28163    if test "x$new_path" = x; then
28164      # It's still not found. Now this is an unrecoverable error.
28165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28166$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28167      has_space=`$ECHO "$complete" | $GREP " "`
28168      if test "x$has_space" != x; then
28169        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28170$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28171      fi
28172      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28173    fi
28174  fi
28175
28176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28179  # "foo.exe" is OK but "foo" is an error.
28180  #
28181  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28182  # It is also a way to make sure we got the proper file name for the real test later on.
28183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28184  if test "x$test_shortpath" = x; then
28185    # Short path failed, file does not exist as specified.
28186    # Try adding .exe or .cmd
28187    if test -f "${new_path}.exe"; then
28188       input_to_shortpath="${new_path}.exe"
28189    elif test -f "${new_path}.cmd"; then
28190       input_to_shortpath="${new_path}.cmd"
28191    else
28192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28193$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28194      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28195$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28196      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28197    fi
28198  else
28199    input_to_shortpath="$new_path"
28200  fi
28201
28202  # Call helper function which possibly converts this using DOS-style short mode.
28203  # If so, the updated path is stored in $new_path.
28204  new_path="$input_to_shortpath"
28205
28206  input_path="$input_to_shortpath"
28207  # Check if we need to convert this using DOS-style short mode. If the path
28208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28209  # take no chances and rewrite it.
28210  # Note: m4 eats our [], so we need to use [ and ] instead.
28211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28212  if test "x$has_forbidden_chars" != x; then
28213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28217      # Going to short mode and back again did indeed matter. Since short mode is
28218      # case insensitive, let's make it lowercase to improve readability.
28219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28220      # Now convert it back to Unix-stile (cygpath)
28221      input_path=`$CYGPATH -u "$shortmode_path"`
28222      new_path="$input_path"
28223    fi
28224  fi
28225
28226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28227  if test "x$test_cygdrive_prefix" = x; then
28228    # As a simple fix, exclude /usr/bin since it's not a real path.
28229    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28231      # a path prefixed by /cygdrive for fixpath to work.
28232      new_path="$CYGWIN_ROOT_PATH$input_path"
28233    fi
28234  fi
28235
28236  # remove trailing .exe if any
28237  new_path="${new_path/%.exe/}"
28238
28239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28240
28241  # First separate the path from the arguments. This will split at the first
28242  # space.
28243  complete="$LIPO"
28244  path="${complete%% *}"
28245  tmp="$complete EOL"
28246  arguments="${tmp#* }"
28247
28248  # Input might be given as Windows format, start by converting to
28249  # unix format.
28250  new_path="$path"
28251
28252  windows_path="$new_path"
28253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28254    unix_path=`$CYGPATH -u "$windows_path"`
28255    new_path="$unix_path"
28256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28258    new_path="$unix_path"
28259  fi
28260
28261
28262  # Now try to locate executable using which
28263  new_path=`$WHICH "$new_path" 2> /dev/null`
28264
28265  if test "x$new_path" = x; then
28266    # Oops. Which didn't find the executable.
28267    # The splitting of arguments from the executable at a space might have been incorrect,
28268    # since paths with space are more likely in Windows. Give it another try with the whole
28269    # argument.
28270    path="$complete"
28271    arguments="EOL"
28272    new_path="$path"
28273
28274  windows_path="$new_path"
28275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28276    unix_path=`$CYGPATH -u "$windows_path"`
28277    new_path="$unix_path"
28278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28280    new_path="$unix_path"
28281  fi
28282
28283
28284    new_path=`$WHICH "$new_path" 2> /dev/null`
28285
28286    if test "x$new_path" = x; then
28287      # It's still not found. Now this is an unrecoverable error.
28288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28289$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28290      has_space=`$ECHO "$complete" | $GREP " "`
28291      if test "x$has_space" != x; then
28292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28294      fi
28295      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28296    fi
28297  fi
28298
28299  # Now new_path has a complete unix path to the binary
28300  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28301    # Keep paths in /bin as-is, but remove trailing .exe if any
28302    new_path="${new_path/%.exe/}"
28303    # Do not save /bin paths to all_fixpath_prefixes!
28304  else
28305    # Not in mixed or Windows style, start by that.
28306    new_path=`cmd //c echo $new_path`
28307
28308  input_path="$new_path"
28309  # Check if we need to convert this using DOS-style short mode. If the path
28310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28311  # take no chances and rewrite it.
28312  # Note: m4 eats our [], so we need to use [ and ] instead.
28313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28314  if test "x$has_forbidden_chars" != x; then
28315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28317  fi
28318
28319    # Output is in $new_path
28320
28321  windows_path="$new_path"
28322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28323    unix_path=`$CYGPATH -u "$windows_path"`
28324    new_path="$unix_path"
28325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28327    new_path="$unix_path"
28328  fi
28329
28330    # remove trailing .exe if any
28331    new_path="${new_path/%.exe/}"
28332
28333    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28334    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28335  fi
28336
28337  else
28338    # We're on a posix platform. Hooray! :)
28339    # First separate the path from the arguments. This will split at the first
28340    # space.
28341    complete="$LIPO"
28342    path="${complete%% *}"
28343    tmp="$complete EOL"
28344    arguments="${tmp#* }"
28345
28346    # Cannot rely on the command "which" here since it doesn't always work.
28347    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28348    if test -z "$is_absolute_path"; then
28349      # Path to executable is not absolute. Find it.
28350      IFS_save="$IFS"
28351      IFS=:
28352      for p in $PATH; do
28353        if test -f "$p/$path" && test -x "$p/$path"; then
28354          new_path="$p/$path"
28355          break
28356        fi
28357      done
28358      IFS="$IFS_save"
28359    else
28360      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28361$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28362      new_path="$path"
28363    fi
28364
28365    if test "x$new_path" = x; then
28366        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28367$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28368        has_space=`$ECHO "$complete" | $GREP " "`
28369        if test "x$has_space" != x; then
28370          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28371$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28372        fi
28373        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28374      fi
28375  fi
28376
28377      # Now join together the path and the arguments once again
28378      if test "x$arguments" != xEOL; then
28379        new_complete="$new_path ${arguments% *}"
28380      else
28381        new_complete="$new_path"
28382      fi
28383
28384  if test "x$complete" != "x$new_complete"; then
28385      LIPO="$new_complete"
28386      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28387$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28388    fi
28389
28390fi
28391
28392
28393
28394# Restore old path without tools dir
28395PATH="$OLD_PATH"
28396
28397
28398# FIXME: Currently we must test this after paths but before flags. Fix!
28399
28400# And we can test some aspects on the target using configure macros.
28401
28402
28403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28404$as_echo_n "checking for ANSI C header files... " >&6; }
28405if test "${ac_cv_header_stdc+set}" = set; then :
28406  $as_echo_n "(cached) " >&6
28407else
28408  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28409/* end confdefs.h.  */
28410#include <stdlib.h>
28411#include <stdarg.h>
28412#include <string.h>
28413#include <float.h>
28414
28415int
28416main ()
28417{
28418
28419  ;
28420  return 0;
28421}
28422_ACEOF
28423if ac_fn_cxx_try_compile "$LINENO"; then :
28424  ac_cv_header_stdc=yes
28425else
28426  ac_cv_header_stdc=no
28427fi
28428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28429
28430if test $ac_cv_header_stdc = yes; then
28431  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28432  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28433/* end confdefs.h.  */
28434#include <string.h>
28435
28436_ACEOF
28437if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28438  $EGREP "memchr" >/dev/null 2>&1; then :
28439
28440else
28441  ac_cv_header_stdc=no
28442fi
28443rm -f conftest*
28444
28445fi
28446
28447if test $ac_cv_header_stdc = yes; then
28448  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28449  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28450/* end confdefs.h.  */
28451#include <stdlib.h>
28452
28453_ACEOF
28454if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28455  $EGREP "free" >/dev/null 2>&1; then :
28456
28457else
28458  ac_cv_header_stdc=no
28459fi
28460rm -f conftest*
28461
28462fi
28463
28464if test $ac_cv_header_stdc = yes; then
28465  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28466  if test "$cross_compiling" = yes; then :
28467  :
28468else
28469  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28470/* end confdefs.h.  */
28471#include <ctype.h>
28472#include <stdlib.h>
28473#if ((' ' & 0x0FF) == 0x020)
28474# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28475# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28476#else
28477# define ISLOWER(c) \
28478		   (('a' <= (c) && (c) <= 'i') \
28479		     || ('j' <= (c) && (c) <= 'r') \
28480		     || ('s' <= (c) && (c) <= 'z'))
28481# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28482#endif
28483
28484#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28485int
28486main ()
28487{
28488  int i;
28489  for (i = 0; i < 256; i++)
28490    if (XOR (islower (i), ISLOWER (i))
28491	|| toupper (i) != TOUPPER (i))
28492      return 2;
28493  return 0;
28494}
28495_ACEOF
28496if ac_fn_cxx_try_run "$LINENO"; then :
28497
28498else
28499  ac_cv_header_stdc=no
28500fi
28501rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28502  conftest.$ac_objext conftest.beam conftest.$ac_ext
28503fi
28504
28505fi
28506fi
28507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28508$as_echo "$ac_cv_header_stdc" >&6; }
28509if test $ac_cv_header_stdc = yes; then
28510
28511$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28512
28513fi
28514
28515# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28516for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28517		  inttypes.h stdint.h unistd.h
28518do :
28519  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28520ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28521"
28522if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28523  cat >>confdefs.h <<_ACEOF
28524#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28525_ACEOF
28526
28527fi
28528
28529done
28530
28531
28532
28533###############################################################################
28534#
28535# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28536# (The JVM can use 32 or 64 bit Java pointers but that decision
28537# is made at runtime.)
28538#
28539
28540if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28541  # Always specify -m flags on Solaris
28542
28543  # keep track of c/cxx flags that we added outselves...
28544  #   to prevent emitting warning...
28545  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28546  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28547  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28548
28549  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28550  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28551  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28552
28553  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28554  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28555  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28556
28557elif test "x$COMPILE_TYPE" = xreduced; then
28558  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28559    # Specify -m if running reduced on other Posix platforms
28560
28561  # keep track of c/cxx flags that we added outselves...
28562  #   to prevent emitting warning...
28563  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28564  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28565  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28566
28567  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28568  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28569  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28570
28571  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28572  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28573  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28574
28575  fi
28576fi
28577
28578# Make compilation sanity check
28579for ac_header in stdio.h
28580do :
28581  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28582if test "x$ac_cv_header_stdio_h" = x""yes; then :
28583  cat >>confdefs.h <<_ACEOF
28584#define HAVE_STDIO_H 1
28585_ACEOF
28586
28587else
28588
28589  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28590$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28591  if test "x$COMPILE_TYPE" = xreduced; then
28592    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28593$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28594  elif test "x$COMPILE_TYPE" = xcross; then
28595    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28596$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28597  fi
28598  as_fn_error $? "Cannot continue." "$LINENO" 5
28599
28600fi
28601
28602done
28603
28604
28605# The cast to long int works around a bug in the HP C Compiler
28606# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28607# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28608# This bug is HP SR number 8606223364.
28609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28610$as_echo_n "checking size of int *... " >&6; }
28611if test "${ac_cv_sizeof_int_p+set}" = set; then :
28612  $as_echo_n "(cached) " >&6
28613else
28614  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28615
28616else
28617  if test "$ac_cv_type_int_p" = yes; then
28618     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28619$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28620as_fn_error 77 "cannot compute sizeof (int *)
28621See \`config.log' for more details" "$LINENO" 5 ; }
28622   else
28623     ac_cv_sizeof_int_p=0
28624   fi
28625fi
28626
28627fi
28628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28629$as_echo "$ac_cv_sizeof_int_p" >&6; }
28630
28631
28632
28633cat >>confdefs.h <<_ACEOF
28634#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28635_ACEOF
28636
28637
28638
28639if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28640  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28641  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28642fi
28643
28644if test "x$SIZEOF_INT_P" = x; then
28645    # The test failed, lets stick to the assumed value.
28646    { $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
28647$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28648else
28649    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28650
28651    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28652        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
28653    fi
28654fi
28655
28656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28657$as_echo_n "checking for target address size... " >&6; }
28658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28659$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28660
28661
28662###############################################################################
28663#
28664# Is the target little of big endian?
28665#
28666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28667$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28668if test "${ac_cv_c_bigendian+set}" = set; then :
28669  $as_echo_n "(cached) " >&6
28670else
28671  ac_cv_c_bigendian=unknown
28672    # See if we're dealing with a universal compiler.
28673    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28674/* end confdefs.h.  */
28675#ifndef __APPLE_CC__
28676	       not a universal capable compiler
28677	     #endif
28678	     typedef int dummy;
28679
28680_ACEOF
28681if ac_fn_cxx_try_compile "$LINENO"; then :
28682
28683	# Check for potential -arch flags.  It is not universal unless
28684	# there are at least two -arch flags with different values.
28685	ac_arch=
28686	ac_prev=
28687	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28688	 if test -n "$ac_prev"; then
28689	   case $ac_word in
28690	     i?86 | x86_64 | ppc | ppc64)
28691	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28692		 ac_arch=$ac_word
28693	       else
28694		 ac_cv_c_bigendian=universal
28695		 break
28696	       fi
28697	       ;;
28698	   esac
28699	   ac_prev=
28700	 elif test "x$ac_word" = "x-arch"; then
28701	   ac_prev=arch
28702	 fi
28703       done
28704fi
28705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28706    if test $ac_cv_c_bigendian = unknown; then
28707      # See if sys/param.h defines the BYTE_ORDER macro.
28708      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28709/* end confdefs.h.  */
28710#include <sys/types.h>
28711	     #include <sys/param.h>
28712
28713int
28714main ()
28715{
28716#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28717		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28718		     && LITTLE_ENDIAN)
28719	      bogus endian macros
28720	     #endif
28721
28722  ;
28723  return 0;
28724}
28725_ACEOF
28726if ac_fn_cxx_try_compile "$LINENO"; then :
28727  # It does; now see whether it defined to BIG_ENDIAN or not.
28728	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28729/* end confdefs.h.  */
28730#include <sys/types.h>
28731		#include <sys/param.h>
28732
28733int
28734main ()
28735{
28736#if BYTE_ORDER != BIG_ENDIAN
28737		 not big endian
28738		#endif
28739
28740  ;
28741  return 0;
28742}
28743_ACEOF
28744if ac_fn_cxx_try_compile "$LINENO"; then :
28745  ac_cv_c_bigendian=yes
28746else
28747  ac_cv_c_bigendian=no
28748fi
28749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28750fi
28751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28752    fi
28753    if test $ac_cv_c_bigendian = unknown; then
28754      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28755      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28756/* end confdefs.h.  */
28757#include <limits.h>
28758
28759int
28760main ()
28761{
28762#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28763	      bogus endian macros
28764	     #endif
28765
28766  ;
28767  return 0;
28768}
28769_ACEOF
28770if ac_fn_cxx_try_compile "$LINENO"; then :
28771  # It does; now see whether it defined to _BIG_ENDIAN or not.
28772	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28773/* end confdefs.h.  */
28774#include <limits.h>
28775
28776int
28777main ()
28778{
28779#ifndef _BIG_ENDIAN
28780		 not big endian
28781		#endif
28782
28783  ;
28784  return 0;
28785}
28786_ACEOF
28787if ac_fn_cxx_try_compile "$LINENO"; then :
28788  ac_cv_c_bigendian=yes
28789else
28790  ac_cv_c_bigendian=no
28791fi
28792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28793fi
28794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28795    fi
28796    if test $ac_cv_c_bigendian = unknown; then
28797      # Compile a test program.
28798      if test "$cross_compiling" = yes; then :
28799  # Try to guess by grepping values from an object file.
28800	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28801/* end confdefs.h.  */
28802short int ascii_mm[] =
28803		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28804		short int ascii_ii[] =
28805		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28806		int use_ascii (int i) {
28807		  return ascii_mm[i] + ascii_ii[i];
28808		}
28809		short int ebcdic_ii[] =
28810		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28811		short int ebcdic_mm[] =
28812		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28813		int use_ebcdic (int i) {
28814		  return ebcdic_mm[i] + ebcdic_ii[i];
28815		}
28816		extern int foo;
28817
28818int
28819main ()
28820{
28821return use_ascii (foo) == use_ebcdic (foo);
28822  ;
28823  return 0;
28824}
28825_ACEOF
28826if ac_fn_cxx_try_compile "$LINENO"; then :
28827  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28828	      ac_cv_c_bigendian=yes
28829	    fi
28830	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28831	      if test "$ac_cv_c_bigendian" = unknown; then
28832		ac_cv_c_bigendian=no
28833	      else
28834		# finding both strings is unlikely to happen, but who knows?
28835		ac_cv_c_bigendian=unknown
28836	      fi
28837	    fi
28838fi
28839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28840else
28841  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28842/* end confdefs.h.  */
28843$ac_includes_default
28844int
28845main ()
28846{
28847
28848	     /* Are we little or big endian?  From Harbison&Steele.  */
28849	     union
28850	     {
28851	       long int l;
28852	       char c[sizeof (long int)];
28853	     } u;
28854	     u.l = 1;
28855	     return u.c[sizeof (long int) - 1] == 1;
28856
28857  ;
28858  return 0;
28859}
28860_ACEOF
28861if ac_fn_cxx_try_run "$LINENO"; then :
28862  ac_cv_c_bigendian=no
28863else
28864  ac_cv_c_bigendian=yes
28865fi
28866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28867  conftest.$ac_objext conftest.beam conftest.$ac_ext
28868fi
28869
28870    fi
28871fi
28872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28873$as_echo "$ac_cv_c_bigendian" >&6; }
28874 case $ac_cv_c_bigendian in #(
28875   yes)
28876     ENDIAN="big";; #(
28877   no)
28878     ENDIAN="little" ;; #(
28879   universal)
28880     ENDIAN="universal_endianness"
28881     ;; #(
28882   *)
28883     ENDIAN="unknown" ;;
28884 esac
28885
28886
28887if test "x$ENDIAN" = xuniversal_endianness; then
28888    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28889fi
28890if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28891    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
28892fi
28893
28894
28895# Configure flags for the tools
28896
28897
28898###############################################################################
28899#
28900# How to compile shared libraries.
28901#
28902
28903if test "x$GCC" = xyes; then
28904    COMPILER_NAME=gcc
28905    PICFLAG="-fPIC"
28906    LIBRARY_PREFIX=lib
28907    SHARED_LIBRARY='lib$1.so'
28908    STATIC_LIBRARY='lib$1.a'
28909    SHARED_LIBRARY_FLAGS="-shared"
28910    SHARED_LIBRARY_SUFFIX='.so'
28911    STATIC_LIBRARY_SUFFIX='.a'
28912    OBJ_SUFFIX='.o'
28913    EXE_SUFFIX=''
28914    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28915    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28916    C_FLAG_REORDER=''
28917    CXX_FLAG_REORDER=''
28918    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28919    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28920    LD="$CC"
28921    LDEXE="$CC"
28922    LDCXX="$CXX"
28923    LDEXECXX="$CXX"
28924    POST_STRIP_CMD="$STRIP -g"
28925
28926    # Linking is different on MacOSX
28927    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28928        # Might change in the future to clang.
28929        COMPILER_NAME=gcc
28930        SHARED_LIBRARY='lib$1.dylib'
28931        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28932        SHARED_LIBRARY_SUFFIX='.dylib'
28933        EXE_SUFFIX=''
28934        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28935        SET_SHARED_LIBRARY_MAPFILE=''
28936        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28937        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28938        POST_STRIP_CMD="$STRIP -S"
28939    fi
28940else
28941    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28942        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28943        COMPILER_NAME=ossc
28944        PICFLAG="-KPIC"
28945        LIBRARY_PREFIX=lib
28946        SHARED_LIBRARY='lib$1.so'
28947        STATIC_LIBRARY='lib$1.a'
28948        SHARED_LIBRARY_FLAGS="-G"
28949        SHARED_LIBRARY_SUFFIX='.so'
28950        STATIC_LIBRARY_SUFFIX='.a'
28951        OBJ_SUFFIX='.o'
28952        EXE_SUFFIX=''
28953        SET_SHARED_LIBRARY_NAME=''
28954        SET_SHARED_LIBRARY_MAPFILE='-M$1'
28955	C_FLAG_REORDER='-xF'
28956	CXX_FLAG_REORDER='-xF'
28957        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28958        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28959        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28960        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28961        CFLAGS_JDKLIB_EXTRA='-xstrconst'
28962        POST_STRIP_CMD="$STRIP -x"
28963        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28964    fi
28965    if test "x$OPENJDK_TARGET_OS" = xwindows; then
28966        # If it is not gcc, then assume it is the MS Visual Studio compiler
28967        COMPILER_NAME=cl
28968        PICFLAG=""
28969        LIBRARY_PREFIX=
28970        SHARED_LIBRARY='$1.dll'
28971        STATIC_LIBRARY='$1.lib'
28972        SHARED_LIBRARY_FLAGS="-LD"
28973        SHARED_LIBRARY_SUFFIX='.dll'
28974        STATIC_LIBRARY_SUFFIX='.lib'
28975        OBJ_SUFFIX='.obj'
28976        EXE_SUFFIX='.exe'
28977        SET_SHARED_LIBRARY_NAME=''
28978        SET_SHARED_LIBRARY_MAPFILE=''
28979        SET_SHARED_LIBRARY_ORIGIN=''
28980        SET_EXECUTABLE_ORIGIN=''
28981    fi
28982fi
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000
29001
29002# The (cross) compiler is now configured, we can now test capabilities
29003# of the target platform.
29004
29005
29006
29007###############################################################################
29008#
29009# Setup the opt flags for different compilers
29010# and different operating systems.
29011#
29012
29013#
29014# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29015#
29016if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29017    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29018    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29019    CFLAGS="$CFLAGS -mstackrealign"
29020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29021$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29022    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29023/* end confdefs.h.  */
29024int main() { return 0; }
29025_ACEOF
29026if ac_fn_cxx_try_link "$LINENO"; then :
29027
29028		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29029$as_echo "yes" >&6; }
29030
29031else
29032
29033		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29034$as_echo "no" >&6; }
29035	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29036
29037fi
29038rm -f core conftest.err conftest.$ac_objext \
29039    conftest$ac_exeext conftest.$ac_ext
29040fi
29041
29042C_FLAG_DEPS="-MMD -MF"
29043CXX_FLAG_DEPS="-MMD -MF"
29044
29045case $COMPILER_TYPE in
29046  CC )
29047    D_FLAG="-g"
29048    case $COMPILER_NAME in
29049      gcc )
29050      	case $OPENJDK_TARGET_OS in
29051	  macosx )
29052	    # On MacOSX we optimize for size, something
29053	    # we should do for all platforms?
29054	    C_O_FLAG_HI="-Os"
29055	    C_O_FLAG_NORM="-Os"
29056	    C_O_FLAG_NONE=""
29057	    ;;
29058	  *)
29059	    C_O_FLAG_HI="-O3"
29060	    C_O_FLAG_NORM="-O2"
29061	    C_O_FLAG_NONE="-O0"
29062	    CFLAGS_DEBUG_SYMBOLS="-g"
29063	    CXXFLAGS_DEBUG_SYMBOLS="-g"
29064	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29065	       CFLAGS_DEBUG_SYMBOLS="-g1"
29066	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
29067	    fi
29068	    ;;
29069	esac
29070        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29071        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29072        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29073        ;;
29074      ossc )
29075        #
29076        # Forte has different names for this with their C++ compiler...
29077        #
29078        C_FLAG_DEPS="-xMMD -xMF"
29079        CXX_FLAG_DEPS="-xMMD -xMF"
29080
29081        # Extra options used with HIGHEST
29082        #
29083        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29084        #          done with care, there are some assumptions below that need to
29085        #          be understood about the use of pointers, and IEEE behavior.
29086        #
29087        # Use non-standard floating point mode (not IEEE 754)
29088        CC_HIGHEST="$CC_HIGHEST -fns"
29089        # Do some simplification of floating point arithmetic (not IEEE 754)
29090        CC_HIGHEST="$CC_HIGHEST -fsimple"
29091        # Use single precision floating point with 'float'
29092        CC_HIGHEST="$CC_HIGHEST -fsingle"
29093        # Assume memory references via basic pointer types do not alias
29094        #   (Source with excessing pointer casting and data access with mixed
29095        #    pointer types are not recommended)
29096        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29097        # Use intrinsic or inline versions for math/std functions
29098        #   (If you expect perfect errno behavior, do not use this)
29099        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29100        # Loop data dependency optimizations (need -xO3 or higher)
29101        CC_HIGHEST="$CC_HIGHEST -xdepend"
29102        # Pointer parameters to functions do not overlap
29103        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29104        #    If you pass in multiple pointers to the same data, do not use this)
29105        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29106        # Inline some library routines
29107        #   (If you expect perfect errno behavior, do not use this)
29108        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29109        # Use optimized math routines
29110        #   (If you expect perfect errno behavior, do not use this)
29111        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29112        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29113
29114        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29115          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29116          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29117        fi
29118
29119        case $OPENJDK_TARGET_CPU_ARCH in
29120          x86)
29121            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29122            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29123            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29124            C_O_FLAG_NONE="-xregs=no%frameptr"
29125            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29126            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29127            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29128            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29129            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29130               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29131               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29132            fi
29133            ;;
29134          sparc)
29135            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29136            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29137            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29138            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29139            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29140            C_O_FLAG_NONE=""
29141            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29142            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29143            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29144            CXX_O_FLAG_NONE=""
29145            ;;
29146        esac
29147
29148    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29149    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29150    esac
29151    ;;
29152  CL )
29153    D_FLAG=
29154    C_O_FLAG_HIGHEST="-O2"
29155    C_O_FLAG_HI="-O1"
29156    C_O_FLAG_NORM="-O1"
29157    C_O_FLAG_NONE="-Od"
29158    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29159    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29160    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29161    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29162    ;;
29163esac
29164
29165if test -z "$C_O_FLAG_HIGHEST"; then
29166   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29167fi
29168
29169if test -z "$CXX_O_FLAG_HIGHEST"; then
29170   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29171fi
29172
29173
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29187   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29188$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29189fi
29190
29191if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29192   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29193$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29194fi
29195
29196if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29197   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29198$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29199fi
29200
29201
29202# Check whether --with-extra-cflags was given.
29203if test "${with_extra_cflags+set}" = set; then :
29204  withval=$with_extra_cflags;
29205fi
29206
29207
29208
29209# Check whether --with-extra-cxxflags was given.
29210if test "${with_extra_cxxflags+set}" = set; then :
29211  withval=$with_extra_cxxflags;
29212fi
29213
29214
29215
29216# Check whether --with-extra-ldflags was given.
29217if test "${with_extra_ldflags+set}" = set; then :
29218  withval=$with_extra_ldflags;
29219fi
29220
29221
29222CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29223CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29224LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29225
29226# Hotspot needs these set in their legacy form
29227LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29228LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29229LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29230
29231
29232
29233
29234
29235###############################################################################
29236#
29237# Now setup the CFLAGS and LDFLAGS for the JDK build.
29238# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29239#
29240case $COMPILER_NAME in
29241      gcc )
29242      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29243                          -pipe \
29244                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29245	  case $OPENJDK_TARGET_CPU_ARCH in
29246	  arm )
29247            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29248	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29249	  ;;
29250	  ppc )
29251            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29252	  ;;
29253	  * )
29254	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29255	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29256          ;;
29257	  esac
29258          ;;
29259      ossc )
29260          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29261          case $OPENJDK_TARGET_CPU_ARCH in
29262          x86 )
29263            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29264       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29265          ;;
29266          esac
29267
29268      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29269      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29270
29271          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29272          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29273          ;;
29274      cl )
29275          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29276               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29277	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29278	       -DWIN32 -DIAL"
29279          case $OPENJDK_TARGET_CPU in
29280              x86 )
29281                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29282                  ;;
29283              x86_64 )
29284                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29285                  ;;
29286          esac
29287          ;;
29288esac
29289
29290###############################################################################
29291
29292CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29293
29294# The package path is used only on macosx?
29295PACKAGE_PATH=/opt/local
29296
29297
29298if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29299    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29300    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29301    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29302    #   Note: -Dmacro         is the same as    #define macro 1
29303    #         -Dmacro=	    is the same as    #define macro
29304    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29305        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29306    else
29307        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29308    fi
29309else
29310    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29311fi
29312if test "x$OPENJDK_TARGET_OS" = xlinux; then
29313    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29314fi
29315if test "x$OPENJDK_TARGET_OS" = xwindows; then
29316    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29317fi
29318if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29319    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29320fi
29321if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29322    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29323    # Setting these parameters makes it an error to link to macosx APIs that are
29324    # newer than the given OS version and makes the linked binaries compatible even
29325    # if built on a newer version of the OS.
29326    # The expected format is X.Y.Z
29327    MACOSX_VERSION_MIN=10.7.0
29328
29329    # The macro takes the version with no dots, ex: 1070
29330    # Let the flags variables get resolved in make for easier override on make
29331    # command line.
29332    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29333    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29334fi
29335if test "x$OPENJDK_TARGET_OS" = xbsd; then
29336    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29337fi
29338if test "x$DEBUG_LEVEL" = xrelease; then
29339    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29340    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29341        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29342    fi
29343else
29344    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29345fi
29346
29347CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29348CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29349
29350CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29351        -I${JDK_OUTPUTDIR}/include \
29352        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29353        -I${JDK_TOPDIR}/src/share/javavm/export \
29354        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29355        -I${JDK_TOPDIR}/src/share/native/common \
29356        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29357
29358# The shared libraries are compiled using the picflag.
29359CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29360CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29361
29362# Executable flags
29363CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29364CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29365
29366# Now this is odd. The JDK native libraries have to link against libjvm.so
29367# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29368# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29369# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29370# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29371# libraries will link to whatever is in memory. Yuck.
29372#
29373# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29374if test "x$COMPILER_NAME" = xcl; then
29375    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29376    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29377        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29378    fi
29379    # TODO: make -debug optional "--disable-full-debug-symbols"
29380    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29381    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29382    LDFLAGS_JDKLIB_SUFFIX=""
29383    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29384        LDFLAGS_STACK_SIZE=1048576
29385    else
29386        LDFLAGS_STACK_SIZE=327680
29387    fi
29388    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29389else
29390    if test "x$COMPILER_NAME" = xgcc; then
29391        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29392        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29393        if test -n "$HAS_GNU_HASH"; then
29394            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29395        fi
29396        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29397          # And since we now know that the linker is gnu, then add -z defs, to forbid
29398          # undefined symbols in object files.
29399          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29400          if test "x$DEBUG_LEVEL" = "xrelease"; then
29401              # When building release libraries, tell the linker optimize them.
29402              # Should this be supplied to the OSS linker as well?
29403              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29404          fi
29405        fi
29406    fi
29407    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29408                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29409
29410    # On some platforms (mac) the linker warns about non existing -L dirs.
29411    # Add server first if available. Linking aginst client does not always produce the same results.
29412    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29413    # Default to server for other variants.
29414    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29415        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29416    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29417        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29418    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29419        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29420    else
29421        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29422    fi
29423
29424    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29425    if test "x$COMPILER_NAME" = xossc; then
29426        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29427    fi
29428
29429    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29430    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29431        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29432    fi
29433fi
29434
29435# Adjust flags according to debug level.
29436case $DEBUG_LEVEL in
29437      fastdebug )
29438              CFLAGS="$CFLAGS $D_FLAG"
29439              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29440              ;;
29441      slowdebug )
29442              CFLAGS="$CFLAGS $D_FLAG"
29443	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29444	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29445	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29446	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29447              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29448              ;;
29449esac
29450
29451
29452
29453
29454
29455
29456
29457
29458
29459
29460
29461
29462
29463
29464
29465
29466  # Some Zero and Shark settings.
29467  # ZERO_ARCHFLAG tells the compiler which mode to build for
29468  case "${OPENJDK_TARGET_CPU}" in
29469    s390)
29470      ZERO_ARCHFLAG="-m31"
29471      ;;
29472    *)
29473      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29474  esac
29475
29476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29477$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29478  supports=yes
29479
29480  saved_cflags="$CFLAGS"
29481  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29482  ac_ext=c
29483ac_cpp='$CPP $CPPFLAGS'
29484ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29485ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29486ac_compiler_gnu=$ac_cv_c_compiler_gnu
29487
29488  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29489/* end confdefs.h.  */
29490
29491    int i;
29492
29493_ACEOF
29494if ac_fn_c_try_compile "$LINENO"; then :
29495
29496else
29497  supports=no
29498fi
29499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29500  ac_ext=cpp
29501ac_cpp='$CXXCPP $CPPFLAGS'
29502ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29503ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29504ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29505
29506  CFLAGS="$saved_cflags"
29507
29508  saved_cxxflags="$CXXFLAGS"
29509  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29510  ac_ext=cpp
29511ac_cpp='$CXXCPP $CPPFLAGS'
29512ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29513ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29514ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29515
29516  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29517/* end confdefs.h.  */
29518
29519    int i;
29520
29521_ACEOF
29522if ac_fn_cxx_try_compile "$LINENO"; then :
29523
29524else
29525  supports=no
29526fi
29527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29528  ac_ext=cpp
29529ac_cpp='$CXXCPP $CPPFLAGS'
29530ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29531ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29532ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29533
29534  CXXFLAGS="$saved_cxxflags"
29535
29536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29537$as_echo "$supports" >&6; }
29538  if test "x$supports" = "xyes" ; then
29539    :
29540  else
29541    ZERO_ARCHFLAG=""
29542  fi
29543
29544
29545
29546  # Check that the compiler supports -mX flags
29547  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29548
29549  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29550$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29551  supports=yes
29552
29553  saved_cflags="$CFLAGS"
29554  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29555  ac_ext=c
29556ac_cpp='$CPP $CPPFLAGS'
29557ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29558ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29559ac_compiler_gnu=$ac_cv_c_compiler_gnu
29560
29561  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29562/* end confdefs.h.  */
29563
29564    int i;
29565
29566_ACEOF
29567if ac_fn_c_try_compile "$LINENO"; then :
29568
29569else
29570  supports=no
29571fi
29572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29573  ac_ext=cpp
29574ac_cpp='$CXXCPP $CPPFLAGS'
29575ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29576ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29577ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29578
29579  CFLAGS="$saved_cflags"
29580
29581  saved_cxxflags="$CXXFLAGS"
29582  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29583  ac_ext=cpp
29584ac_cpp='$CXXCPP $CPPFLAGS'
29585ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29586ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29587ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29588
29589  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29590/* end confdefs.h.  */
29591
29592    int i;
29593
29594_ACEOF
29595if ac_fn_cxx_try_compile "$LINENO"; then :
29596
29597else
29598  supports=no
29599fi
29600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29601  ac_ext=cpp
29602ac_cpp='$CXXCPP $CPPFLAGS'
29603ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29604ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29605ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29606
29607  CXXFLAGS="$saved_cxxflags"
29608
29609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29610$as_echo "$supports" >&6; }
29611  if test "x$supports" = "xyes" ; then
29612    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29613  else
29614    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29615  fi
29616
29617
29618
29619
29620# Setup debug symbols (need objcopy from the toolchain for that)
29621
29622#
29623# ENABLE_DEBUG_SYMBOLS
29624# This must be done after the toolchain is setup, since we're looking at objcopy.
29625#
29626# Check whether --enable-debug-symbols was given.
29627if test "${enable_debug_symbols+set}" = set; then :
29628  enableval=$enable_debug_symbols;
29629fi
29630
29631
29632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29633$as_echo_n "checking if we should generate debug symbols... " >&6; }
29634
29635if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29636   # explicit enabling of enable-debug-symbols and can't find objcopy
29637   #   this is an error
29638   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29639fi
29640
29641if test "x$enable_debug_symbols" = "xyes"; then
29642  ENABLE_DEBUG_SYMBOLS=true
29643elif test "x$enable_debug_symbols" = "xno"; then
29644  ENABLE_DEBUG_SYMBOLS=false
29645else
29646  # default on macosx is false
29647  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29648    ENABLE_DEBUG_SYMBOLS=false
29649  # Default is on if objcopy is found, otherwise off
29650  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29651    ENABLE_DEBUG_SYMBOLS=true
29652  else
29653    ENABLE_DEBUG_SYMBOLS=false
29654  fi
29655fi
29656
29657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29658$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29659
29660#
29661# ZIP_DEBUGINFO_FILES
29662#
29663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29664$as_echo_n "checking if we should zip debug-info files... " >&6; }
29665# Check whether --enable-zip-debug-info was given.
29666if test "${enable_zip_debug_info+set}" = set; then :
29667  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29668else
29669  enable_zip_debug_info="yes"
29670fi
29671
29672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29673$as_echo "${enable_zip_debug_info}" >&6; }
29674
29675if test "x${enable_zip_debug_info}" = "xno"; then
29676   ZIP_DEBUGINFO_FILES=false
29677else
29678   ZIP_DEBUGINFO_FILES=true
29679fi
29680
29681
29682
29683
29684
29685
29686
29687###############################################################################
29688#
29689# Check dependencies for external and internal libraries.
29690#
29691###############################################################################
29692
29693
29694
29695###############################################################################
29696#
29697# OS specific settings that we never will need to probe.
29698#
29699if test "x$OPENJDK_TARGET_OS" = xlinux; then
29700    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29701$as_echo_n "checking what is not needed on Linux?... " >&6; }
29702    PULSE_NOT_NEEDED=yes
29703    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29704$as_echo "pulse" >&6; }
29705fi
29706
29707if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29709$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29710    ALSA_NOT_NEEDED=yes
29711    PULSE_NOT_NEEDED=yes
29712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29713$as_echo "alsa pulse" >&6; }
29714fi
29715
29716if test "x$OPENJDK_TARGET_OS" = xwindows; then
29717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29718$as_echo_n "checking what is not needed on Windows?... " >&6; }
29719    CUPS_NOT_NEEDED=yes
29720    ALSA_NOT_NEEDED=yes
29721    PULSE_NOT_NEEDED=yes
29722    X11_NOT_NEEDED=yes
29723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29724$as_echo "alsa cups pulse x11" >&6; }
29725fi
29726
29727if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29729$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29730    ALSA_NOT_NEEDED=yes
29731    PULSE_NOT_NEEDED=yes
29732    X11_NOT_NEEDED=yes
29733    FREETYPE2_NOT_NEEDED=yes
29734    # If the java runtime framework is disabled, then we need X11.
29735    # This will be adjusted below.
29736    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29737$as_echo "alsa pulse x11" >&6; }
29738fi
29739
29740if test "x$OPENJDK_TARGET_OS" = xbsd; then
29741    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29742$as_echo_n "checking what is not needed on bsd?... " >&6; }
29743    ALSA_NOT_NEEDED=yes
29744    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29745$as_echo "alsa" >&6; }
29746fi
29747
29748if test "x$OPENJDK" = "xfalse"; then
29749    FREETYPE2_NOT_NEEDED=yes
29750fi
29751
29752if test "x$SUPPORT_HEADFUL" = xno; then
29753    X11_NOT_NEEDED=yes
29754fi
29755
29756###############################################################################
29757#
29758# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29759# that uses this API.
29760#
29761# Check whether --enable-macosx-runtime-support was given.
29762if test "${enable_macosx_runtime_support+set}" = set; then :
29763  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29764else
29765  MACOSX_RUNTIME_SUPPORT="no"
29766fi
29767
29768
29769USE_MACOSX_RUNTIME_SUPPORT=no
29770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29771$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29772if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29773    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29774        MACOSX_RUNTIME_SUPPORT=yes
29775        USE_MACOSX_RUNTIME_SUPPORT=yes
29776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29777$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29778    else
29779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29780$as_echo "yes, but explicitly disabled." >&6; }
29781    fi
29782else
29783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29784$as_echo "no" >&6; }
29785fi
29786
29787if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29788    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29789$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29790    X11_NOT_NEEDED=
29791    FREETYPE2_NOT_NEEDED=
29792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29793$as_echo "alsa pulse" >&6; }
29794fi
29795
29796
29797
29798###############################################################################
29799#
29800# Check for X Windows
29801#
29802
29803# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29804# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29805# --x-libraries for the sysroot, if that seems to be correct.
29806if test "x$SYS_ROOT" != "x/"; then
29807  if test "x$x_includes" = xNONE; then
29808    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29809      x_includes="$SYS_ROOT/usr/X11R6/include"
29810    fi
29811  fi
29812  if test "x$x_libraries" = xNONE; then
29813    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29814      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29815    fi
29816  fi
29817fi
29818
29819# Now let autoconf do it's magic
29820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29821$as_echo_n "checking for X... " >&6; }
29822
29823
29824# Check whether --with-x was given.
29825if test "${with_x+set}" = set; then :
29826  withval=$with_x;
29827fi
29828
29829# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29830if test "x$with_x" = xno; then
29831  # The user explicitly disabled X.
29832  have_x=disabled
29833else
29834  case $x_includes,$x_libraries in #(
29835    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
29836    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
29837  $as_echo_n "(cached) " >&6
29838else
29839  # One or both of the vars are not set, and there is no cached value.
29840ac_x_includes=no ac_x_libraries=no
29841rm -f -r conftest.dir
29842if mkdir conftest.dir; then
29843  cd conftest.dir
29844  cat >Imakefile <<'_ACEOF'
29845incroot:
29846	@echo incroot='${INCROOT}'
29847usrlibdir:
29848	@echo usrlibdir='${USRLIBDIR}'
29849libdir:
29850	@echo libdir='${LIBDIR}'
29851_ACEOF
29852  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29853    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29854    for ac_var in incroot usrlibdir libdir; do
29855      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29856    done
29857    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29858    for ac_extension in a so sl dylib la dll; do
29859      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29860	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29861	ac_im_usrlibdir=$ac_im_libdir; break
29862      fi
29863    done
29864    # Screen out bogus values from the imake configuration.  They are
29865    # bogus both because they are the default anyway, and because
29866    # using them would break gcc on systems where it needs fixed includes.
29867    case $ac_im_incroot in
29868	/usr/include) ac_x_includes= ;;
29869	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29870    esac
29871    case $ac_im_usrlibdir in
29872	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29873	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29874    esac
29875  fi
29876  cd ..
29877  rm -f -r conftest.dir
29878fi
29879
29880# Standard set of common directories for X headers.
29881# Check X11 before X11Rn because it is often a symlink to the current release.
29882ac_x_header_dirs='
29883/usr/X11/include
29884/usr/X11R7/include
29885/usr/X11R6/include
29886/usr/X11R5/include
29887/usr/X11R4/include
29888
29889/usr/include/X11
29890/usr/include/X11R7
29891/usr/include/X11R6
29892/usr/include/X11R5
29893/usr/include/X11R4
29894
29895/usr/local/X11/include
29896/usr/local/X11R7/include
29897/usr/local/X11R6/include
29898/usr/local/X11R5/include
29899/usr/local/X11R4/include
29900
29901/usr/local/include/X11
29902/usr/local/include/X11R7
29903/usr/local/include/X11R6
29904/usr/local/include/X11R5
29905/usr/local/include/X11R4
29906
29907/usr/X386/include
29908/usr/x386/include
29909/usr/XFree86/include/X11
29910
29911/usr/include
29912/usr/local/include
29913/usr/unsupported/include
29914/usr/athena/include
29915/usr/local/x11r5/include
29916/usr/lpp/Xamples/include
29917
29918/usr/openwin/include
29919/usr/openwin/share/include'
29920
29921if test "$ac_x_includes" = no; then
29922  # Guess where to find include files, by looking for Xlib.h.
29923  # First, try using that file with no special directory specified.
29924  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29925/* end confdefs.h.  */
29926#include <X11/Xlib.h>
29927_ACEOF
29928if ac_fn_cxx_try_cpp "$LINENO"; then :
29929  # We can compile using X headers with no special include directory.
29930ac_x_includes=
29931else
29932  for ac_dir in $ac_x_header_dirs; do
29933  if test -r "$ac_dir/X11/Xlib.h"; then
29934    ac_x_includes=$ac_dir
29935    break
29936  fi
29937done
29938fi
29939rm -f conftest.err conftest.i conftest.$ac_ext
29940fi # $ac_x_includes = no
29941
29942if test "$ac_x_libraries" = no; then
29943  # Check for the libraries.
29944  # See if we find them without any special options.
29945  # Don't add to $LIBS permanently.
29946  ac_save_LIBS=$LIBS
29947  LIBS="-lX11 $LIBS"
29948  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29949/* end confdefs.h.  */
29950#include <X11/Xlib.h>
29951int
29952main ()
29953{
29954XrmInitialize ()
29955  ;
29956  return 0;
29957}
29958_ACEOF
29959if ac_fn_cxx_try_link "$LINENO"; then :
29960  LIBS=$ac_save_LIBS
29961# We can link X programs with no special library path.
29962ac_x_libraries=
29963else
29964  LIBS=$ac_save_LIBS
29965for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29966do
29967  # Don't even attempt the hair of trying to link an X program!
29968  for ac_extension in a so sl dylib la dll; do
29969    if test -r "$ac_dir/libX11.$ac_extension"; then
29970      ac_x_libraries=$ac_dir
29971      break 2
29972    fi
29973  done
29974done
29975fi
29976rm -f core conftest.err conftest.$ac_objext \
29977    conftest$ac_exeext conftest.$ac_ext
29978fi # $ac_x_libraries = no
29979
29980case $ac_x_includes,$ac_x_libraries in #(
29981  no,* | *,no | *\'*)
29982    # Didn't find X, or a directory has "'" in its name.
29983    ac_cv_have_x="have_x=no";; #(
29984  *)
29985    # Record where we found X for the cache.
29986    ac_cv_have_x="have_x=yes\
29987	ac_x_includes='$ac_x_includes'\
29988	ac_x_libraries='$ac_x_libraries'"
29989esac
29990fi
29991;; #(
29992    *) have_x=yes;;
29993  esac
29994  eval "$ac_cv_have_x"
29995fi # $with_x != no
29996
29997if test "$have_x" != yes; then
29998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29999$as_echo "$have_x" >&6; }
30000  no_x=yes
30001else
30002  # If each of the values was on the command line, it overrides each guess.
30003  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30004  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30005  # Update the cache value to reflect the command line values.
30006  ac_cv_have_x="have_x=yes\
30007	ac_x_includes='$x_includes'\
30008	ac_x_libraries='$x_libraries'"
30009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30010$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30011fi
30012
30013if test "$no_x" = yes; then
30014  # Not all programs may use this symbol, but it does not hurt to define it.
30015
30016$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30017
30018  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30019else
30020  if test -n "$x_includes"; then
30021    X_CFLAGS="$X_CFLAGS -I$x_includes"
30022  fi
30023
30024  # It would also be nice to do this for all -L options, not just this one.
30025  if test -n "$x_libraries"; then
30026    X_LIBS="$X_LIBS -L$x_libraries"
30027    # For Solaris; some versions of Sun CC require a space after -R and
30028    # others require no space.  Words are not sufficient . . . .
30029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30030$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30031    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30032    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30033    ac_cxx_werror_flag=yes
30034    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30035/* end confdefs.h.  */
30036
30037int
30038main ()
30039{
30040
30041  ;
30042  return 0;
30043}
30044_ACEOF
30045if ac_fn_cxx_try_link "$LINENO"; then :
30046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30047$as_echo "no" >&6; }
30048       X_LIBS="$X_LIBS -R$x_libraries"
30049else
30050  LIBS="$ac_xsave_LIBS -R $x_libraries"
30051       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30052/* end confdefs.h.  */
30053
30054int
30055main ()
30056{
30057
30058  ;
30059  return 0;
30060}
30061_ACEOF
30062if ac_fn_cxx_try_link "$LINENO"; then :
30063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30064$as_echo "yes" >&6; }
30065	  X_LIBS="$X_LIBS -R $x_libraries"
30066else
30067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30068$as_echo "neither works" >&6; }
30069fi
30070rm -f core conftest.err conftest.$ac_objext \
30071    conftest$ac_exeext conftest.$ac_ext
30072fi
30073rm -f core conftest.err conftest.$ac_objext \
30074    conftest$ac_exeext conftest.$ac_ext
30075    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30076    LIBS=$ac_xsave_LIBS
30077  fi
30078
30079  # Check for system-dependent libraries X programs must link with.
30080  # Do this before checking for the system-independent R6 libraries
30081  # (-lICE), since we may need -lsocket or whatever for X linking.
30082
30083  if test "$ISC" = yes; then
30084    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30085  else
30086    # Martyn Johnson says this is needed for Ultrix, if the X
30087    # libraries were built with DECnet support.  And Karl Berry says
30088    # the Alpha needs dnet_stub (dnet does not exist).
30089    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30090    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30091/* end confdefs.h.  */
30092
30093/* Override any GCC internal prototype to avoid an error.
30094   Use char because int might match the return type of a GCC
30095   builtin and then its argument prototype would still apply.  */
30096#ifdef __cplusplus
30097extern "C"
30098#endif
30099char XOpenDisplay ();
30100int
30101main ()
30102{
30103return XOpenDisplay ();
30104  ;
30105  return 0;
30106}
30107_ACEOF
30108if ac_fn_cxx_try_link "$LINENO"; then :
30109
30110else
30111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30112$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30113if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
30114  $as_echo_n "(cached) " >&6
30115else
30116  ac_check_lib_save_LIBS=$LIBS
30117LIBS="-ldnet  $LIBS"
30118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30119/* end confdefs.h.  */
30120
30121/* Override any GCC internal prototype to avoid an error.
30122   Use char because int might match the return type of a GCC
30123   builtin and then its argument prototype would still apply.  */
30124#ifdef __cplusplus
30125extern "C"
30126#endif
30127char dnet_ntoa ();
30128int
30129main ()
30130{
30131return dnet_ntoa ();
30132  ;
30133  return 0;
30134}
30135_ACEOF
30136if ac_fn_cxx_try_link "$LINENO"; then :
30137  ac_cv_lib_dnet_dnet_ntoa=yes
30138else
30139  ac_cv_lib_dnet_dnet_ntoa=no
30140fi
30141rm -f core conftest.err conftest.$ac_objext \
30142    conftest$ac_exeext conftest.$ac_ext
30143LIBS=$ac_check_lib_save_LIBS
30144fi
30145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30146$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30147if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
30148  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30149fi
30150
30151    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30152      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30153$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30154if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
30155  $as_echo_n "(cached) " >&6
30156else
30157  ac_check_lib_save_LIBS=$LIBS
30158LIBS="-ldnet_stub  $LIBS"
30159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30160/* end confdefs.h.  */
30161
30162/* Override any GCC internal prototype to avoid an error.
30163   Use char because int might match the return type of a GCC
30164   builtin and then its argument prototype would still apply.  */
30165#ifdef __cplusplus
30166extern "C"
30167#endif
30168char dnet_ntoa ();
30169int
30170main ()
30171{
30172return dnet_ntoa ();
30173  ;
30174  return 0;
30175}
30176_ACEOF
30177if ac_fn_cxx_try_link "$LINENO"; then :
30178  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30179else
30180  ac_cv_lib_dnet_stub_dnet_ntoa=no
30181fi
30182rm -f core conftest.err conftest.$ac_objext \
30183    conftest$ac_exeext conftest.$ac_ext
30184LIBS=$ac_check_lib_save_LIBS
30185fi
30186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30187$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30188if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
30189  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30190fi
30191
30192    fi
30193fi
30194rm -f core conftest.err conftest.$ac_objext \
30195    conftest$ac_exeext conftest.$ac_ext
30196    LIBS="$ac_xsave_LIBS"
30197
30198    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30199    # to get the SysV transport functions.
30200    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30201    # needs -lnsl.
30202    # The nsl library prevents programs from opening the X display
30203    # on Irix 5.2, according to T.E. Dickey.
30204    # The functions gethostbyname, getservbyname, and inet_addr are
30205    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30206    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30207if test "x$ac_cv_func_gethostbyname" = x""yes; then :
30208
30209fi
30210
30211    if test $ac_cv_func_gethostbyname = no; then
30212      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30213$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30214if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
30215  $as_echo_n "(cached) " >&6
30216else
30217  ac_check_lib_save_LIBS=$LIBS
30218LIBS="-lnsl  $LIBS"
30219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30220/* end confdefs.h.  */
30221
30222/* Override any GCC internal prototype to avoid an error.
30223   Use char because int might match the return type of a GCC
30224   builtin and then its argument prototype would still apply.  */
30225#ifdef __cplusplus
30226extern "C"
30227#endif
30228char gethostbyname ();
30229int
30230main ()
30231{
30232return gethostbyname ();
30233  ;
30234  return 0;
30235}
30236_ACEOF
30237if ac_fn_cxx_try_link "$LINENO"; then :
30238  ac_cv_lib_nsl_gethostbyname=yes
30239else
30240  ac_cv_lib_nsl_gethostbyname=no
30241fi
30242rm -f core conftest.err conftest.$ac_objext \
30243    conftest$ac_exeext conftest.$ac_ext
30244LIBS=$ac_check_lib_save_LIBS
30245fi
30246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30247$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30248if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
30249  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30250fi
30251
30252      if test $ac_cv_lib_nsl_gethostbyname = no; then
30253	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30254$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30255if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
30256  $as_echo_n "(cached) " >&6
30257else
30258  ac_check_lib_save_LIBS=$LIBS
30259LIBS="-lbsd  $LIBS"
30260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30261/* end confdefs.h.  */
30262
30263/* Override any GCC internal prototype to avoid an error.
30264   Use char because int might match the return type of a GCC
30265   builtin and then its argument prototype would still apply.  */
30266#ifdef __cplusplus
30267extern "C"
30268#endif
30269char gethostbyname ();
30270int
30271main ()
30272{
30273return gethostbyname ();
30274  ;
30275  return 0;
30276}
30277_ACEOF
30278if ac_fn_cxx_try_link "$LINENO"; then :
30279  ac_cv_lib_bsd_gethostbyname=yes
30280else
30281  ac_cv_lib_bsd_gethostbyname=no
30282fi
30283rm -f core conftest.err conftest.$ac_objext \
30284    conftest$ac_exeext conftest.$ac_ext
30285LIBS=$ac_check_lib_save_LIBS
30286fi
30287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30288$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30289if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
30290  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30291fi
30292
30293      fi
30294    fi
30295
30296    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30297    # socket/setsockopt and other routines are undefined under SCO ODT
30298    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30299    # on later versions), says Simon Leinen: it contains gethostby*
30300    # variants that don't use the name server (or something).  -lsocket
30301    # must be given before -lnsl if both are needed.  We assume that
30302    # if connect needs -lnsl, so does gethostbyname.
30303    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30304if test "x$ac_cv_func_connect" = x""yes; then :
30305
30306fi
30307
30308    if test $ac_cv_func_connect = no; then
30309      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30310$as_echo_n "checking for connect in -lsocket... " >&6; }
30311if test "${ac_cv_lib_socket_connect+set}" = set; then :
30312  $as_echo_n "(cached) " >&6
30313else
30314  ac_check_lib_save_LIBS=$LIBS
30315LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30317/* end confdefs.h.  */
30318
30319/* Override any GCC internal prototype to avoid an error.
30320   Use char because int might match the return type of a GCC
30321   builtin and then its argument prototype would still apply.  */
30322#ifdef __cplusplus
30323extern "C"
30324#endif
30325char connect ();
30326int
30327main ()
30328{
30329return connect ();
30330  ;
30331  return 0;
30332}
30333_ACEOF
30334if ac_fn_cxx_try_link "$LINENO"; then :
30335  ac_cv_lib_socket_connect=yes
30336else
30337  ac_cv_lib_socket_connect=no
30338fi
30339rm -f core conftest.err conftest.$ac_objext \
30340    conftest$ac_exeext conftest.$ac_ext
30341LIBS=$ac_check_lib_save_LIBS
30342fi
30343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30344$as_echo "$ac_cv_lib_socket_connect" >&6; }
30345if test "x$ac_cv_lib_socket_connect" = x""yes; then :
30346  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30347fi
30348
30349    fi
30350
30351    # Guillermo Gomez says -lposix is necessary on A/UX.
30352    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30353if test "x$ac_cv_func_remove" = x""yes; then :
30354
30355fi
30356
30357    if test $ac_cv_func_remove = no; then
30358      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30359$as_echo_n "checking for remove in -lposix... " >&6; }
30360if test "${ac_cv_lib_posix_remove+set}" = set; then :
30361  $as_echo_n "(cached) " >&6
30362else
30363  ac_check_lib_save_LIBS=$LIBS
30364LIBS="-lposix  $LIBS"
30365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30366/* end confdefs.h.  */
30367
30368/* Override any GCC internal prototype to avoid an error.
30369   Use char because int might match the return type of a GCC
30370   builtin and then its argument prototype would still apply.  */
30371#ifdef __cplusplus
30372extern "C"
30373#endif
30374char remove ();
30375int
30376main ()
30377{
30378return remove ();
30379  ;
30380  return 0;
30381}
30382_ACEOF
30383if ac_fn_cxx_try_link "$LINENO"; then :
30384  ac_cv_lib_posix_remove=yes
30385else
30386  ac_cv_lib_posix_remove=no
30387fi
30388rm -f core conftest.err conftest.$ac_objext \
30389    conftest$ac_exeext conftest.$ac_ext
30390LIBS=$ac_check_lib_save_LIBS
30391fi
30392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30393$as_echo "$ac_cv_lib_posix_remove" >&6; }
30394if test "x$ac_cv_lib_posix_remove" = x""yes; then :
30395  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30396fi
30397
30398    fi
30399
30400    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30401    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30402if test "x$ac_cv_func_shmat" = x""yes; then :
30403
30404fi
30405
30406    if test $ac_cv_func_shmat = no; then
30407      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30408$as_echo_n "checking for shmat in -lipc... " >&6; }
30409if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
30410  $as_echo_n "(cached) " >&6
30411else
30412  ac_check_lib_save_LIBS=$LIBS
30413LIBS="-lipc  $LIBS"
30414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30415/* end confdefs.h.  */
30416
30417/* Override any GCC internal prototype to avoid an error.
30418   Use char because int might match the return type of a GCC
30419   builtin and then its argument prototype would still apply.  */
30420#ifdef __cplusplus
30421extern "C"
30422#endif
30423char shmat ();
30424int
30425main ()
30426{
30427return shmat ();
30428  ;
30429  return 0;
30430}
30431_ACEOF
30432if ac_fn_cxx_try_link "$LINENO"; then :
30433  ac_cv_lib_ipc_shmat=yes
30434else
30435  ac_cv_lib_ipc_shmat=no
30436fi
30437rm -f core conftest.err conftest.$ac_objext \
30438    conftest$ac_exeext conftest.$ac_ext
30439LIBS=$ac_check_lib_save_LIBS
30440fi
30441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30442$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30443if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
30444  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30445fi
30446
30447    fi
30448  fi
30449
30450  # Check for libraries that X11R6 Xt/Xaw programs need.
30451  ac_save_LDFLAGS=$LDFLAGS
30452  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30453  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30454  # check for ICE first), but we must link in the order -lSM -lICE or
30455  # we get undefined symbols.  So assume we have SM if we have ICE.
30456  # These have to be linked with before -lX11, unlike the other
30457  # libraries we check for below, so use a different variable.
30458  # John Interrante, Karl Berry
30459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30460$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30461if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
30462  $as_echo_n "(cached) " >&6
30463else
30464  ac_check_lib_save_LIBS=$LIBS
30465LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30467/* end confdefs.h.  */
30468
30469/* Override any GCC internal prototype to avoid an error.
30470   Use char because int might match the return type of a GCC
30471   builtin and then its argument prototype would still apply.  */
30472#ifdef __cplusplus
30473extern "C"
30474#endif
30475char IceConnectionNumber ();
30476int
30477main ()
30478{
30479return IceConnectionNumber ();
30480  ;
30481  return 0;
30482}
30483_ACEOF
30484if ac_fn_cxx_try_link "$LINENO"; then :
30485  ac_cv_lib_ICE_IceConnectionNumber=yes
30486else
30487  ac_cv_lib_ICE_IceConnectionNumber=no
30488fi
30489rm -f core conftest.err conftest.$ac_objext \
30490    conftest$ac_exeext conftest.$ac_ext
30491LIBS=$ac_check_lib_save_LIBS
30492fi
30493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30494$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30495if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
30496  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30497fi
30498
30499  LDFLAGS=$ac_save_LDFLAGS
30500
30501fi
30502
30503
30504# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30505# this doesn't make sense so we remove it.
30506if test "x$COMPILE_TYPE" = xcross; then
30507  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30508fi
30509
30510if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30511
30512    # Print a helpful message on how to acquire the necessary build dependency.
30513    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30514    MISSING_DEPENDENCY=x11
30515    PKGHANDLER_COMMAND=
30516
30517    case $PKGHANDLER in
30518	apt-get)
30519                apt_help     $MISSING_DEPENDENCY ;;
30520    yum)
30521                yum_help     $MISSING_DEPENDENCY ;;
30522	port)
30523                port_help    $MISSING_DEPENDENCY ;;
30524	pkgutil)
30525                pkgutil_help $MISSING_DEPENDENCY ;;
30526	pkgadd)
30527                pkgadd_help  $MISSING_DEPENDENCY ;;
30528    * )
30529      break ;;
30530    esac
30531
30532    if test "x$PKGHANDLER_COMMAND" != x; then
30533        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30534    fi
30535
30536    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30537fi
30538
30539# Some of the old makefiles require a setting of OPENWIN_HOME
30540# Since the X11R6 directory has disappeared on later Linuxes,
30541# we need to probe for it.
30542if test "x$OPENJDK_TARGET_OS" = xlinux; then
30543    if test -d "$SYS_ROOT/usr/X11R6"; then
30544        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30545    fi
30546    if test -d "$SYS_ROOT/usr/include/X11"; then
30547        OPENWIN_HOME="$SYS_ROOT/usr"
30548    fi
30549fi
30550if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30551    OPENWIN_HOME="/usr/openwin"
30552fi
30553
30554
30555
30556#
30557# Weird Sol10 something check...TODO change to try compile
30558#
30559if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30560  if test "`uname -r`" = "5.10"; then
30561     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30562     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30563     fi
30564  fi
30565fi
30566
30567ac_ext=c
30568ac_cpp='$CPP $CPPFLAGS'
30569ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30570ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30571ac_compiler_gnu=$ac_cv_c_compiler_gnu
30572
30573OLD_CFLAGS="$CFLAGS"
30574CFLAGS="$CFLAGS $X_CFLAGS"
30575
30576# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30577for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30578do :
30579  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30580ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30581                   # include <X11/Xutil.h>
30582
30583"
30584if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30585  cat >>confdefs.h <<_ACEOF
30586#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30587_ACEOF
30588 X11_A_OK=yes
30589else
30590  X11_A_OK=no; break
30591fi
30592
30593done
30594
30595
30596CFLAGS="$OLD_CFLAGS"
30597ac_ext=cpp
30598ac_cpp='$CXXCPP $CPPFLAGS'
30599ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30600ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30601ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30602
30603
30604if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30605
30606    # Print a helpful message on how to acquire the necessary build dependency.
30607    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30608    MISSING_DEPENDENCY=x11
30609    PKGHANDLER_COMMAND=
30610
30611    case $PKGHANDLER in
30612	apt-get)
30613                apt_help     $MISSING_DEPENDENCY ;;
30614    yum)
30615                yum_help     $MISSING_DEPENDENCY ;;
30616	port)
30617                port_help    $MISSING_DEPENDENCY ;;
30618	pkgutil)
30619                pkgutil_help $MISSING_DEPENDENCY ;;
30620	pkgadd)
30621                pkgadd_help  $MISSING_DEPENDENCY ;;
30622    * )
30623      break ;;
30624    esac
30625
30626    if test "x$PKGHANDLER_COMMAND" != x; then
30627        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30628    fi
30629
30630    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30631fi
30632
30633
30634
30635
30636
30637
30638###############################################################################
30639#
30640# The common unix printing system cups is used to print from java.
30641#
30642
30643# Check whether --with-cups was given.
30644if test "${with_cups+set}" = set; then :
30645  withval=$with_cups;
30646fi
30647
30648
30649# Check whether --with-cups-include was given.
30650if test "${with_cups_include+set}" = set; then :
30651  withval=$with_cups_include;
30652fi
30653
30654
30655if test "x$CUPS_NOT_NEEDED" = xyes; then
30656	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30657		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30658$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30659	fi
30660	CUPS_CFLAGS=
30661else
30662	CUPS_FOUND=no
30663
30664	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30665	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30666	fi
30667
30668	if test "x${with_cups}" != x; then
30669	    CUPS_CFLAGS="-I${with_cups}/include"
30670	    CUPS_FOUND=yes
30671	fi
30672	if test "x${with_cups_include}" != x; then
30673	    CUPS_CFLAGS="-I${with_cups_include}"
30674	    CUPS_FOUND=yes
30675	fi
30676	if test "x$CUPS_FOUND" = xno; then
30677
30678
30679    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30680        # Source the builddeps file again, to make sure it uses the latest variables!
30681        . $builddepsfile
30682        # Look for a target and build machine specific resource!
30683        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30684        if test "x$resource" = x; then
30685            # Ok, lets instead look for a target specific resource
30686            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30687        fi
30688        if test "x$resource" = x; then
30689            # Ok, lets instead look for a build specific resource
30690            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30691        fi
30692        if test "x$resource" = x; then
30693            # Ok, lets instead look for a generic resource
30694            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30695            resource=${builddep_cups}
30696        fi
30697        if test "x$resource" != x; then
30698            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30699$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30700	    # If the resource in the builddeps.conf file is an existing directory,
30701	    # for example /java/linux/cups
30702	    if test -d ${resource}; then
30703	       depdir=${resource}
30704	    else
30705
30706# cups is for example mymodule
30707# $resource is for example libs/general/libmymod_1_2_3.zip
30708# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30709# $with_builddeps_dir is for example /localhome/builddeps
30710# depdir is the name of the variable into which we store the depdir, eg MYMOD
30711# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30712# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30713    filename=`basename $resource`
30714    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30715    filebase=${filename%%.*}
30716    extension=${filename#*.}
30717    installdir=$with_builddeps_dir/$filebase
30718    if test ! -f $installdir/$filename.unpacked; then
30719        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30720$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30721        if test ! -d $installdir; then
30722            mkdir -p $installdir
30723        fi
30724        if test ! -d $installdir; then
30725            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30726        fi
30727        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30728        touch $tmpfile
30729        if test ! -f $tmpfile; then
30730            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30731        fi
30732
30733    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30734    # $tmpfile is the local file name for the downloaded file.
30735    VALID_TOOL=no
30736    if test "x$BDEPS_FTP" = xwget; then
30737       VALID_TOOL=yes
30738       wget -O $tmpfile $with_builddeps_server/$resource
30739    fi
30740    if test "x$BDEPS_FTP" = xlftp; then
30741       VALID_TOOL=yes
30742       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30743    fi
30744    if test "x$BDEPS_FTP" = xftp; then
30745        VALID_TOOL=yes
30746        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30747        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30748        FTPUSERPWD=${FTPSERVER%%@*}
30749        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30750            FTPUSER=${userpwd%%:*}
30751            FTPPWD=${userpwd#*@}
30752            FTPSERVER=${FTPSERVER#*@}
30753        else
30754            FTPUSER=ftp
30755            FTPPWD=ftp
30756        fi
30757        # the "pass" command does not work on some
30758        # ftp clients (read ftp.exe) but if it works,
30759        # passive mode is better!
30760        (\
30761            echo "user $FTPUSER $FTPPWD"        ;\
30762            echo "pass"                         ;\
30763            echo "bin"                          ;\
30764            echo "get $FTPPATH $tmpfile"              ;\
30765        ) | ftp -in $FTPSERVER
30766    fi
30767    if test "x$VALID_TOOL" != xyes; then
30768       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30769    fi
30770
30771        mv $tmpfile $installdir/$filename
30772        if test ! -s $installdir/$filename; then
30773            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30774        fi
30775        case "$extension" in
30776            zip)  echo "Unzipping $installdir/$filename..."
30777               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30778            ;;
30779            tar.gz) echo "Untaring $installdir/$filename..."
30780               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30781            ;;
30782            tgz) echo "Untaring $installdir/$filename..."
30783               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30784            ;;
30785            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30786            ;;
30787        esac
30788    fi
30789    if test -f $installdir/$filename.unpacked; then
30790        depdir=$installdir
30791    fi
30792
30793	    fi
30794            # Source the builddeps file again, because in the previous command, the depdir
30795            # was updated to point at the current build dependency install directory.
30796            . $builddepsfile
30797            # Now extract variables from the builddeps.conf files.
30798            theroot=${builddep_cups_ROOT}
30799            thecflags=${builddep_cups_CFLAGS}
30800            thelibs=${builddep_cups_LIBS}
30801            if test "x$depdir" = x; then
30802                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30803            fi
30804            CUPS=$depdir
30805            if test "x$theroot" != x; then
30806               CUPS="$theroot"
30807            fi
30808            if test "x$thecflags" != x; then
30809               CUPS_CFLAGS="$thecflags"
30810            fi
30811            if test "x$thelibs" != x; then
30812               CUPS_LIBS="$thelibs"
30813            fi
30814            CUPS_FOUND=yes
30815
30816        fi
30817
30818    fi
30819
30820	fi
30821	if test "x$CUPS_FOUND" = xno; then
30822	    # Are the cups headers installed in the default /usr/include location?
30823	    for ac_header in cups/cups.h cups/ppd.h
30824do :
30825  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30826ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30827if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30828  cat >>confdefs.h <<_ACEOF
30829#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30830_ACEOF
30831 CUPS_FOUND=yes
30832	                      CUPS_CFLAGS=
30833	                      DEFAULT_CUPS=yes
30834fi
30835
30836done
30837
30838	fi
30839	if test "x$CUPS_FOUND" = xno; then
30840	    # Getting nervous now? Lets poke around for standard Solaris third-party
30841	    # package installation locations.
30842	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30843$as_echo_n "checking for cups headers... " >&6; }
30844	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30845	       # An SFW package seems to be installed!
30846	       CUPS_FOUND=yes
30847	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30848	    elif test -s /opt/csw/include/cups/cups.h; then
30849	       # A CSW package seems to be installed!
30850	       CUPS_FOUND=yes
30851	       CUPS_CFLAGS="-I/opt/csw/include"
30852	    fi
30853	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30854$as_echo "$CUPS_FOUND" >&6; }
30855	fi
30856	if test "x$CUPS_FOUND" = xno; then
30857
30858    # Print a helpful message on how to acquire the necessary build dependency.
30859    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30860    MISSING_DEPENDENCY=cups
30861    PKGHANDLER_COMMAND=
30862
30863    case $PKGHANDLER in
30864	apt-get)
30865                apt_help     $MISSING_DEPENDENCY ;;
30866    yum)
30867                yum_help     $MISSING_DEPENDENCY ;;
30868	port)
30869                port_help    $MISSING_DEPENDENCY ;;
30870	pkgutil)
30871                pkgutil_help $MISSING_DEPENDENCY ;;
30872	pkgadd)
30873                pkgadd_help  $MISSING_DEPENDENCY ;;
30874    * )
30875      break ;;
30876    esac
30877
30878    if test "x$PKGHANDLER_COMMAND" != x; then
30879        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30880    fi
30881
30882	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30883	fi
30884fi
30885
30886
30887
30888
30889
30890
30891###############################################################################
30892#
30893# The ubiquitous freetype2 library is used to render fonts.
30894#
30895
30896# Check whether --with-freetype was given.
30897if test "${with_freetype+set}" = set; then :
30898  withval=$with_freetype;
30899fi
30900
30901
30902# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30903USING_SYSTEM_FT_LIB=false
30904
30905if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30906	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30907		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30908$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30909	fi
30910	FREETYPE2_CFLAGS=
30911	FREETYPE2_LIBS=
30912        FREETYPE2_LIB_PATH=
30913else
30914	FREETYPE2_FOUND=no
30915
30916	if test "x$with_freetype" != x; then
30917
30918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30919
30920  # Input might be given as Windows format, start by converting to
30921  # unix format.
30922  path="$with_freetype"
30923  new_path=`$CYGPATH -u "$path"`
30924
30925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30928  # "foo.exe" is OK but "foo" is an error.
30929  #
30930  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30931  # It is also a way to make sure we got the proper file name for the real test later on.
30932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30933  if test "x$test_shortpath" = x; then
30934    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30935$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30936    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30937  fi
30938
30939  # Call helper function which possibly converts this using DOS-style short mode.
30940  # If so, the updated path is stored in $new_path.
30941
30942  input_path="$new_path"
30943  # Check if we need to convert this using DOS-style short mode. If the path
30944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30945  # take no chances and rewrite it.
30946  # Note: m4 eats our [], so we need to use [ and ] instead.
30947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30948  if test "x$has_forbidden_chars" != x; then
30949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30950    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30951    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30952    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30953      # Going to short mode and back again did indeed matter. Since short mode is
30954      # case insensitive, let's make it lowercase to improve readability.
30955      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30956      # Now convert it back to Unix-stile (cygpath)
30957      input_path=`$CYGPATH -u "$shortmode_path"`
30958      new_path="$input_path"
30959    fi
30960  fi
30961
30962  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30963  if test "x$test_cygdrive_prefix" = x; then
30964    # As a simple fix, exclude /usr/bin since it's not a real path.
30965    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30966      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30967      # a path prefixed by /cygdrive for fixpath to work.
30968      new_path="$CYGWIN_ROOT_PATH$input_path"
30969    fi
30970  fi
30971
30972
30973  if test "x$path" != "x$new_path"; then
30974    with_freetype="$new_path"
30975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30976$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30977  fi
30978
30979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30980
30981  path="$with_freetype"
30982  has_colon=`$ECHO $path | $GREP ^.:`
30983  new_path="$path"
30984  if test "x$has_colon" = x; then
30985    # Not in mixed or Windows style, start by that.
30986    new_path=`cmd //c echo $path`
30987  fi
30988
30989
30990  input_path="$new_path"
30991  # Check if we need to convert this using DOS-style short mode. If the path
30992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30993  # take no chances and rewrite it.
30994  # Note: m4 eats our [], so we need to use [ and ] instead.
30995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30996  if test "x$has_forbidden_chars" != x; then
30997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30999  fi
31000
31001
31002  windows_path="$new_path"
31003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31004    unix_path=`$CYGPATH -u "$windows_path"`
31005    new_path="$unix_path"
31006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31008    new_path="$unix_path"
31009  fi
31010
31011  if test "x$path" != "x$new_path"; then
31012    with_freetype="$new_path"
31013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31014$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31015  fi
31016
31017  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31018  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31019
31020  else
31021    # We're on a posix platform. Hooray! :)
31022    path="$with_freetype"
31023    has_space=`$ECHO "$path" | $GREP " "`
31024    if test "x$has_space" != x; then
31025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31026$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31027      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31028    fi
31029
31030    # Use eval to expand a potential ~
31031    eval path="$path"
31032    if test ! -f "$path" && test ! -d "$path"; then
31033      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31034    fi
31035
31036    with_freetype="`cd "$path"; $THEPWDCMD -L`"
31037  fi
31038
31039	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31040            FREETYPE2_LIB_PATH="$with_freetype/lib"
31041            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31042                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31043                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31044            fi
31045            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31046                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31047            fi
31048	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31049            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31050                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31051            fi
31052 	    FREETYPE2_FOUND=yes
31053   	    if test "x$FREETYPE2_FOUND" = xyes; then
31054	        # Verify that the directories exist
31055                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31056		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31057		fi
31058	        # List the contents of the lib.
31059		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31060                if test "x$FREETYPELIB" = x; then
31061		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31062		fi
31063	        # Check one h-file
31064                if ! test -s "$with_freetype/include/ft2build.h"; then
31065		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31066		fi
31067            fi
31068        fi
31069	if test "x$FREETYPE2_FOUND" = xno; then
31070
31071
31072    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31073        # Source the builddeps file again, to make sure it uses the latest variables!
31074        . $builddepsfile
31075        # Look for a target and build machine specific resource!
31076        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31077        if test "x$resource" = x; then
31078            # Ok, lets instead look for a target specific resource
31079            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31080        fi
31081        if test "x$resource" = x; then
31082            # Ok, lets instead look for a build specific resource
31083            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31084        fi
31085        if test "x$resource" = x; then
31086            # Ok, lets instead look for a generic resource
31087            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31088            resource=${builddep_freetype2}
31089        fi
31090        if test "x$resource" != x; then
31091            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31092$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31093	    # If the resource in the builddeps.conf file is an existing directory,
31094	    # for example /java/linux/cups
31095	    if test -d ${resource}; then
31096	       depdir=${resource}
31097	    else
31098
31099# freetype2 is for example mymodule
31100# $resource is for example libs/general/libmymod_1_2_3.zip
31101# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31102# $with_builddeps_dir is for example /localhome/builddeps
31103# depdir is the name of the variable into which we store the depdir, eg MYMOD
31104# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31105# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31106    filename=`basename $resource`
31107    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31108    filebase=${filename%%.*}
31109    extension=${filename#*.}
31110    installdir=$with_builddeps_dir/$filebase
31111    if test ! -f $installdir/$filename.unpacked; then
31112        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31113$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31114        if test ! -d $installdir; then
31115            mkdir -p $installdir
31116        fi
31117        if test ! -d $installdir; then
31118            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31119        fi
31120        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31121        touch $tmpfile
31122        if test ! -f $tmpfile; then
31123            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31124        fi
31125
31126    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31127    # $tmpfile is the local file name for the downloaded file.
31128    VALID_TOOL=no
31129    if test "x$BDEPS_FTP" = xwget; then
31130       VALID_TOOL=yes
31131       wget -O $tmpfile $with_builddeps_server/$resource
31132    fi
31133    if test "x$BDEPS_FTP" = xlftp; then
31134       VALID_TOOL=yes
31135       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31136    fi
31137    if test "x$BDEPS_FTP" = xftp; then
31138        VALID_TOOL=yes
31139        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31140        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31141        FTPUSERPWD=${FTPSERVER%%@*}
31142        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31143            FTPUSER=${userpwd%%:*}
31144            FTPPWD=${userpwd#*@}
31145            FTPSERVER=${FTPSERVER#*@}
31146        else
31147            FTPUSER=ftp
31148            FTPPWD=ftp
31149        fi
31150        # the "pass" command does not work on some
31151        # ftp clients (read ftp.exe) but if it works,
31152        # passive mode is better!
31153        (\
31154            echo "user $FTPUSER $FTPPWD"        ;\
31155            echo "pass"                         ;\
31156            echo "bin"                          ;\
31157            echo "get $FTPPATH $tmpfile"              ;\
31158        ) | ftp -in $FTPSERVER
31159    fi
31160    if test "x$VALID_TOOL" != xyes; then
31161       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31162    fi
31163
31164        mv $tmpfile $installdir/$filename
31165        if test ! -s $installdir/$filename; then
31166            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31167        fi
31168        case "$extension" in
31169            zip)  echo "Unzipping $installdir/$filename..."
31170               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31171            ;;
31172            tar.gz) echo "Untaring $installdir/$filename..."
31173               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31174            ;;
31175            tgz) echo "Untaring $installdir/$filename..."
31176               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31177            ;;
31178            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31179            ;;
31180        esac
31181    fi
31182    if test -f $installdir/$filename.unpacked; then
31183        depdir=$installdir
31184    fi
31185
31186	    fi
31187            # Source the builddeps file again, because in the previous command, the depdir
31188            # was updated to point at the current build dependency install directory.
31189            . $builddepsfile
31190            # Now extract variables from the builddeps.conf files.
31191            theroot=${builddep_freetype2_ROOT}
31192            thecflags=${builddep_freetype2_CFLAGS}
31193            thelibs=${builddep_freetype2_LIBS}
31194            if test "x$depdir" = x; then
31195                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31196            fi
31197            FREETYPE2=$depdir
31198            if test "x$theroot" != x; then
31199               FREETYPE2="$theroot"
31200            fi
31201            if test "x$thecflags" != x; then
31202               FREETYPE2_CFLAGS="$thecflags"
31203            fi
31204            if test "x$thelibs" != x; then
31205               FREETYPE2_LIBS="$thelibs"
31206            fi
31207            FREETYPE2_FOUND=yes
31208            else FREETYPE2_FOUND=no
31209
31210        fi
31211        else FREETYPE2_FOUND=no
31212
31213    fi
31214
31215            USING_SYSTEM_FT_LIB=true
31216	fi
31217	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31218            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31219
31220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31221
31222  # Input might be given as Windows format, start by converting to
31223  # unix format.
31224  path="$FREETYPELOCATION"
31225  new_path=`$CYGPATH -u "$path"`
31226
31227  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31228  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31229  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31230  # "foo.exe" is OK but "foo" is an error.
31231  #
31232  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31233  # It is also a way to make sure we got the proper file name for the real test later on.
31234  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31235  if test "x$test_shortpath" = x; then
31236    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31237$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31238    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31239  fi
31240
31241  # Call helper function which possibly converts this using DOS-style short mode.
31242  # If so, the updated path is stored in $new_path.
31243
31244  input_path="$new_path"
31245  # Check if we need to convert this using DOS-style short mode. If the path
31246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31247  # take no chances and rewrite it.
31248  # Note: m4 eats our [], so we need to use [ and ] instead.
31249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31250  if test "x$has_forbidden_chars" != x; then
31251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31252    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31253    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31254    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31255      # Going to short mode and back again did indeed matter. Since short mode is
31256      # case insensitive, let's make it lowercase to improve readability.
31257      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31258      # Now convert it back to Unix-stile (cygpath)
31259      input_path=`$CYGPATH -u "$shortmode_path"`
31260      new_path="$input_path"
31261    fi
31262  fi
31263
31264  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31265  if test "x$test_cygdrive_prefix" = x; then
31266    # As a simple fix, exclude /usr/bin since it's not a real path.
31267    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31268      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31269      # a path prefixed by /cygdrive for fixpath to work.
31270      new_path="$CYGWIN_ROOT_PATH$input_path"
31271    fi
31272  fi
31273
31274
31275  if test "x$path" != "x$new_path"; then
31276    FREETYPELOCATION="$new_path"
31277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31278$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31279  fi
31280
31281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31282
31283  path="$FREETYPELOCATION"
31284  has_colon=`$ECHO $path | $GREP ^.:`
31285  new_path="$path"
31286  if test "x$has_colon" = x; then
31287    # Not in mixed or Windows style, start by that.
31288    new_path=`cmd //c echo $path`
31289  fi
31290
31291
31292  input_path="$new_path"
31293  # Check if we need to convert this using DOS-style short mode. If the path
31294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31295  # take no chances and rewrite it.
31296  # Note: m4 eats our [], so we need to use [ and ] instead.
31297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31298  if test "x$has_forbidden_chars" != x; then
31299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31301  fi
31302
31303
31304  windows_path="$new_path"
31305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31306    unix_path=`$CYGPATH -u "$windows_path"`
31307    new_path="$unix_path"
31308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31310    new_path="$unix_path"
31311  fi
31312
31313  if test "x$path" != "x$new_path"; then
31314    FREETYPELOCATION="$new_path"
31315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31316$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31317  fi
31318
31319  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31320  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31321
31322  else
31323    # We're on a posix platform. Hooray! :)
31324    path="$FREETYPELOCATION"
31325    has_space=`$ECHO "$path" | $GREP " "`
31326    if test "x$has_space" != x; then
31327      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31328$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31329      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31330    fi
31331
31332    # Use eval to expand a potential ~
31333    eval path="$path"
31334    if test ! -f "$path" && test ! -d "$path"; then
31335      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31336    fi
31337
31338    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31339  fi
31340
31341	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31342$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31343	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31344	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31345	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31346 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31347                if ! test -s "$FREETYPE2_LIBS"; then
31348		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31349		fi
31350                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31351		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31352		fi
31353                USING_SYSTEM_FT_LIB=true
31354                FREETYPE2_FOUND=yes
31355	    fi
31356	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31357$as_echo "$FREETYPE2_FOUND" >&6; }
31358        fi
31359	if test "x$FREETYPE2_FOUND" = xno; then
31360
31361pkg_failed=no
31362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31363$as_echo_n "checking for FREETYPE2... " >&6; }
31364
31365if test -n "$FREETYPE2_CFLAGS"; then
31366    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31367 elif test -n "$PKG_CONFIG"; then
31368    if test -n "$PKG_CONFIG" && \
31369    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31370  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31371  ac_status=$?
31372  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31373  test $ac_status = 0; }; then
31374  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31375else
31376  pkg_failed=yes
31377fi
31378 else
31379    pkg_failed=untried
31380fi
31381if test -n "$FREETYPE2_LIBS"; then
31382    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31383 elif test -n "$PKG_CONFIG"; then
31384    if test -n "$PKG_CONFIG" && \
31385    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31386  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31387  ac_status=$?
31388  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31389  test $ac_status = 0; }; then
31390  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31391else
31392  pkg_failed=yes
31393fi
31394 else
31395    pkg_failed=untried
31396fi
31397
31398
31399
31400if test $pkg_failed = yes; then
31401
31402if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31403        _pkg_short_errors_supported=yes
31404else
31405        _pkg_short_errors_supported=no
31406fi
31407        if test $_pkg_short_errors_supported = yes; then
31408	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31409        else
31410	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31411        fi
31412	# Put the nasty error message in config.log where it belongs
31413	echo "$FREETYPE2_PKG_ERRORS" >&5
31414
31415	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31416$as_echo "no" >&6; }
31417                FREETYPE2_FOUND=no
31418elif test $pkg_failed = untried; then
31419	FREETYPE2_FOUND=no
31420else
31421	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31422	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31424$as_echo "yes" >&6; }
31425	FREETYPE2_FOUND=yes
31426fi
31427            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31428            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31429            USING_SYSTEM_FT_LIB=true
31430            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31431            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31432              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31433            fi
31434	fi
31435	if test "x$FREETYPE2_FOUND" = xno; then
31436	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31437$as_echo_n "checking for freetype in some standard locations... " >&6; }
31438
31439	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
31440	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
31441	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
31442	    fi
31443	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
31444	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
31445	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31446	    fi
31447
31448	    PREV_CXXCFLAGS="$CXXFLAGS"
31449	    PREV_LDFLAGS="$LDFLAGS"
31450	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31451	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31452	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31453/* end confdefs.h.  */
31454#include<ft2build.h>
31455	                    #include FT_FREETYPE_H
31456	                   int main() { return 0; }
31457
31458_ACEOF
31459if ac_fn_cxx_try_link "$LINENO"; then :
31460
31461	                      # Yes, the default cflags and libs did the trick.
31462	                      FREETYPE2_FOUND=yes
31463	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31464	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31465
31466else
31467
31468	                      FREETYPE2_FOUND=no
31469
31470fi
31471rm -f core conftest.err conftest.$ac_objext \
31472    conftest$ac_exeext conftest.$ac_ext
31473            CXXCFLAGS="$PREV_CXXFLAGS"
31474	    LDFLAGS="$PREV_LDFLAGS"
31475	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31476$as_echo "$FREETYPE2_FOUND" >&6; }
31477            USING_SYSTEM_FT_LIB=true
31478	fi
31479	if test "x$FREETYPE2_FOUND" = xno; then
31480
31481    # Print a helpful message on how to acquire the necessary build dependency.
31482    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31483    MISSING_DEPENDENCY=freetype2
31484    PKGHANDLER_COMMAND=
31485
31486    case $PKGHANDLER in
31487	apt-get)
31488                apt_help     $MISSING_DEPENDENCY ;;
31489    yum)
31490                yum_help     $MISSING_DEPENDENCY ;;
31491	port)
31492                port_help    $MISSING_DEPENDENCY ;;
31493	pkgutil)
31494                pkgutil_help $MISSING_DEPENDENCY ;;
31495	pkgadd)
31496                pkgadd_help  $MISSING_DEPENDENCY ;;
31497    * )
31498      break ;;
31499    esac
31500
31501    if test "x$PKGHANDLER_COMMAND" != x; then
31502        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31503    fi
31504
31505		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31506	fi
31507
31508        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31509            # AC_CHECK_LIB does not support use of cl.exe
31510            PREV_LDFLAGS="$LDFLAGS"
31511            LDFLAGS="$FREETYPE2_LIBS"
31512            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31513$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31514if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
31515  $as_echo_n "(cached) " >&6
31516else
31517  ac_check_lib_save_LIBS=$LIBS
31518LIBS="-lfreetype  $LIBS"
31519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31520/* end confdefs.h.  */
31521
31522/* Override any GCC internal prototype to avoid an error.
31523   Use char because int might match the return type of a GCC
31524   builtin and then its argument prototype would still apply.  */
31525#ifdef __cplusplus
31526extern "C"
31527#endif
31528char FT_Init_FreeType ();
31529int
31530main ()
31531{
31532return FT_Init_FreeType ();
31533  ;
31534  return 0;
31535}
31536_ACEOF
31537if ac_fn_cxx_try_link "$LINENO"; then :
31538  ac_cv_lib_freetype_FT_Init_FreeType=yes
31539else
31540  ac_cv_lib_freetype_FT_Init_FreeType=no
31541fi
31542rm -f core conftest.err conftest.$ac_objext \
31543    conftest$ac_exeext conftest.$ac_ext
31544LIBS=$ac_check_lib_save_LIBS
31545fi
31546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31547$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31548if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
31549  FREETYPE2_FOUND=true
31550else
31551  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31552fi
31553
31554            LDFLAGS="$PREV_LDFLAGS"
31555        fi
31556fi
31557
31558
31559
31560
31561
31562
31563
31564
31565
31566###############################################################################
31567#
31568# Check for alsa headers and libraries. Used on Linux/GNU systems.
31569#
31570
31571# Check whether --with-alsa was given.
31572if test "${with_alsa+set}" = set; then :
31573  withval=$with_alsa;
31574fi
31575
31576
31577# Check whether --with-alsa-include was given.
31578if test "${with_alsa_include+set}" = set; then :
31579  withval=$with_alsa_include;
31580fi
31581
31582
31583# Check whether --with-alsa-lib was given.
31584if test "${with_alsa_lib+set}" = set; then :
31585  withval=$with_alsa_lib;
31586fi
31587
31588
31589if test "x$ALSA_NOT_NEEDED" = xyes; then
31590	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31591		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31592$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31593	fi
31594	ALSA_CFLAGS=
31595	ALSA_LIBS=
31596else
31597	ALSA_FOUND=no
31598
31599	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31600	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31601	fi
31602
31603	if test "x${with_alsa}" != x; then
31604	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31605	    ALSA_CFLAGS="-I${with_alsa}/include"
31606	    ALSA_FOUND=yes
31607	fi
31608	if test "x${with_alsa_include}" != x; then
31609	    ALSA_CFLAGS="-I${with_alsa_include}"
31610	    ALSA_FOUND=yes
31611	fi
31612	if test "x${with_alsa_lib}" != x; then
31613	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31614	    ALSA_FOUND=yes
31615	fi
31616	if test "x$ALSA_FOUND" = xno; then
31617
31618
31619    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31620        # Source the builddeps file again, to make sure it uses the latest variables!
31621        . $builddepsfile
31622        # Look for a target and build machine specific resource!
31623        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31624        if test "x$resource" = x; then
31625            # Ok, lets instead look for a target specific resource
31626            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31627        fi
31628        if test "x$resource" = x; then
31629            # Ok, lets instead look for a build specific resource
31630            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31631        fi
31632        if test "x$resource" = x; then
31633            # Ok, lets instead look for a generic resource
31634            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31635            resource=${builddep_alsa}
31636        fi
31637        if test "x$resource" != x; then
31638            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31639$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31640	    # If the resource in the builddeps.conf file is an existing directory,
31641	    # for example /java/linux/cups
31642	    if test -d ${resource}; then
31643	       depdir=${resource}
31644	    else
31645
31646# alsa is for example mymodule
31647# $resource is for example libs/general/libmymod_1_2_3.zip
31648# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31649# $with_builddeps_dir is for example /localhome/builddeps
31650# depdir is the name of the variable into which we store the depdir, eg MYMOD
31651# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31652# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31653    filename=`basename $resource`
31654    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31655    filebase=${filename%%.*}
31656    extension=${filename#*.}
31657    installdir=$with_builddeps_dir/$filebase
31658    if test ! -f $installdir/$filename.unpacked; then
31659        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31660$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31661        if test ! -d $installdir; then
31662            mkdir -p $installdir
31663        fi
31664        if test ! -d $installdir; then
31665            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31666        fi
31667        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31668        touch $tmpfile
31669        if test ! -f $tmpfile; then
31670            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31671        fi
31672
31673    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31674    # $tmpfile is the local file name for the downloaded file.
31675    VALID_TOOL=no
31676    if test "x$BDEPS_FTP" = xwget; then
31677       VALID_TOOL=yes
31678       wget -O $tmpfile $with_builddeps_server/$resource
31679    fi
31680    if test "x$BDEPS_FTP" = xlftp; then
31681       VALID_TOOL=yes
31682       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31683    fi
31684    if test "x$BDEPS_FTP" = xftp; then
31685        VALID_TOOL=yes
31686        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31687        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31688        FTPUSERPWD=${FTPSERVER%%@*}
31689        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31690            FTPUSER=${userpwd%%:*}
31691            FTPPWD=${userpwd#*@}
31692            FTPSERVER=${FTPSERVER#*@}
31693        else
31694            FTPUSER=ftp
31695            FTPPWD=ftp
31696        fi
31697        # the "pass" command does not work on some
31698        # ftp clients (read ftp.exe) but if it works,
31699        # passive mode is better!
31700        (\
31701            echo "user $FTPUSER $FTPPWD"        ;\
31702            echo "pass"                         ;\
31703            echo "bin"                          ;\
31704            echo "get $FTPPATH $tmpfile"              ;\
31705        ) | ftp -in $FTPSERVER
31706    fi
31707    if test "x$VALID_TOOL" != xyes; then
31708       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31709    fi
31710
31711        mv $tmpfile $installdir/$filename
31712        if test ! -s $installdir/$filename; then
31713            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31714        fi
31715        case "$extension" in
31716            zip)  echo "Unzipping $installdir/$filename..."
31717               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31718            ;;
31719            tar.gz) echo "Untaring $installdir/$filename..."
31720               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31721            ;;
31722            tgz) echo "Untaring $installdir/$filename..."
31723               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31724            ;;
31725            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31726            ;;
31727        esac
31728    fi
31729    if test -f $installdir/$filename.unpacked; then
31730        depdir=$installdir
31731    fi
31732
31733	    fi
31734            # Source the builddeps file again, because in the previous command, the depdir
31735            # was updated to point at the current build dependency install directory.
31736            . $builddepsfile
31737            # Now extract variables from the builddeps.conf files.
31738            theroot=${builddep_alsa_ROOT}
31739            thecflags=${builddep_alsa_CFLAGS}
31740            thelibs=${builddep_alsa_LIBS}
31741            if test "x$depdir" = x; then
31742                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31743            fi
31744            ALSA=$depdir
31745            if test "x$theroot" != x; then
31746               ALSA="$theroot"
31747            fi
31748            if test "x$thecflags" != x; then
31749               ALSA_CFLAGS="$thecflags"
31750            fi
31751            if test "x$thelibs" != x; then
31752               ALSA_LIBS="$thelibs"
31753            fi
31754            ALSA_FOUND=yes
31755            else ALSA_FOUND=no
31756
31757        fi
31758        else ALSA_FOUND=no
31759
31760    fi
31761
31762	fi
31763	if test "x$ALSA_FOUND" = xno; then
31764
31765pkg_failed=no
31766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31767$as_echo_n "checking for ALSA... " >&6; }
31768
31769if test -n "$ALSA_CFLAGS"; then
31770    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31771 elif test -n "$PKG_CONFIG"; then
31772    if test -n "$PKG_CONFIG" && \
31773    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31774  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31775  ac_status=$?
31776  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31777  test $ac_status = 0; }; then
31778  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31779else
31780  pkg_failed=yes
31781fi
31782 else
31783    pkg_failed=untried
31784fi
31785if test -n "$ALSA_LIBS"; then
31786    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31787 elif test -n "$PKG_CONFIG"; then
31788    if test -n "$PKG_CONFIG" && \
31789    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31790  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31791  ac_status=$?
31792  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31793  test $ac_status = 0; }; then
31794  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31795else
31796  pkg_failed=yes
31797fi
31798 else
31799    pkg_failed=untried
31800fi
31801
31802
31803
31804if test $pkg_failed = yes; then
31805
31806if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31807        _pkg_short_errors_supported=yes
31808else
31809        _pkg_short_errors_supported=no
31810fi
31811        if test $_pkg_short_errors_supported = yes; then
31812	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31813        else
31814	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31815        fi
31816	# Put the nasty error message in config.log where it belongs
31817	echo "$ALSA_PKG_ERRORS" >&5
31818
31819	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31820$as_echo "no" >&6; }
31821                ALSA_FOUND=no
31822elif test $pkg_failed = untried; then
31823	ALSA_FOUND=no
31824else
31825	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31826	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31828$as_echo "yes" >&6; }
31829	ALSA_FOUND=yes
31830fi
31831	fi
31832	if test "x$ALSA_FOUND" = xno; then
31833	    for ac_header in alsa/asoundlib.h
31834do :
31835  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31836if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
31837  cat >>confdefs.h <<_ACEOF
31838#define HAVE_ALSA_ASOUNDLIB_H 1
31839_ACEOF
31840 ALSA_FOUND=yes
31841	                      ALSA_CFLAGS=-Iignoreme
31842	                      ALSA_LIBS=-lasound
31843	                      DEFAULT_ALSA=yes
31844else
31845  ALSA_FOUND=no
31846fi
31847
31848done
31849
31850	fi
31851	if test "x$ALSA_FOUND" = xno; then
31852
31853    # Print a helpful message on how to acquire the necessary build dependency.
31854    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31855    MISSING_DEPENDENCY=alsa
31856    PKGHANDLER_COMMAND=
31857
31858    case $PKGHANDLER in
31859	apt-get)
31860                apt_help     $MISSING_DEPENDENCY ;;
31861    yum)
31862                yum_help     $MISSING_DEPENDENCY ;;
31863	port)
31864                port_help    $MISSING_DEPENDENCY ;;
31865	pkgutil)
31866                pkgutil_help $MISSING_DEPENDENCY ;;
31867	pkgadd)
31868                pkgadd_help  $MISSING_DEPENDENCY ;;
31869    * )
31870      break ;;
31871    esac
31872
31873    if test "x$PKGHANDLER_COMMAND" != x; then
31874        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31875    fi
31876
31877	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31878	fi
31879fi
31880
31881
31882
31883
31884
31885
31886
31887###############################################################################
31888#
31889# Check for the jpeg library
31890#
31891
31892USE_EXTERNAL_LIBJPEG=true
31893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31894$as_echo_n "checking for main in -ljpeg... " >&6; }
31895if test "${ac_cv_lib_jpeg_main+set}" = set; then :
31896  $as_echo_n "(cached) " >&6
31897else
31898  ac_check_lib_save_LIBS=$LIBS
31899LIBS="-ljpeg  $LIBS"
31900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31901/* end confdefs.h.  */
31902
31903
31904int
31905main ()
31906{
31907return main ();
31908  ;
31909  return 0;
31910}
31911_ACEOF
31912if ac_fn_cxx_try_link "$LINENO"; then :
31913  ac_cv_lib_jpeg_main=yes
31914else
31915  ac_cv_lib_jpeg_main=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_jpeg_main" >&5
31922$as_echo "$ac_cv_lib_jpeg_main" >&6; }
31923if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
31924  cat >>confdefs.h <<_ACEOF
31925#define HAVE_LIBJPEG 1
31926_ACEOF
31927
31928  LIBS="-ljpeg $LIBS"
31929
31930else
31931   USE_EXTERNAL_LIBJPEG=false
31932               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31933$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31934
31935fi
31936
31937
31938
31939###############################################################################
31940#
31941# Check for the gif library
31942#
31943
31944
31945# Check whether --with-giflib was given.
31946if test "${with_giflib+set}" = set; then :
31947  withval=$with_giflib;
31948fi
31949
31950
31951
31952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
31953$as_echo_n "checking for which giflib to use... " >&6; }
31954
31955# default is bundled
31956DEFAULT_GIFLIB=bundled
31957
31958#
31959# if user didn't specify, use DEFAULT_GIFLIB
31960#
31961if test "x${with_giflib}" = "x"; then
31962    with_giflib=${DEFAULT_GIFLIB}
31963fi
31964
31965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
31966$as_echo "${with_giflib}" >&6; }
31967
31968if test "x${with_giflib}" = "xbundled"; then
31969    USE_EXTERNAL_LIBGIF=false
31970elif test "x${with_giflib}" = "xsystem"; then
31971    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31972if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
31973
31974else
31975   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
31976fi
31977
31978
31979    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
31980$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
31981if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
31982  $as_echo_n "(cached) " >&6
31983else
31984  ac_check_lib_save_LIBS=$LIBS
31985LIBS="-lgif  $LIBS"
31986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31987/* end confdefs.h.  */
31988
31989/* Override any GCC internal prototype to avoid an error.
31990   Use char because int might match the return type of a GCC
31991   builtin and then its argument prototype would still apply.  */
31992#ifdef __cplusplus
31993extern "C"
31994#endif
31995char DGifGetCode ();
31996int
31997main ()
31998{
31999return DGifGetCode ();
32000  ;
32001  return 0;
32002}
32003_ACEOF
32004if ac_fn_cxx_try_link "$LINENO"; then :
32005  ac_cv_lib_gif_DGifGetCode=yes
32006else
32007  ac_cv_lib_gif_DGifGetCode=no
32008fi
32009rm -f core conftest.err conftest.$ac_objext \
32010    conftest$ac_exeext conftest.$ac_ext
32011LIBS=$ac_check_lib_save_LIBS
32012fi
32013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32014$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32015if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
32016  cat >>confdefs.h <<_ACEOF
32017#define HAVE_LIBGIF 1
32018_ACEOF
32019
32020  LIBS="-lgif $LIBS"
32021
32022else
32023   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32024fi
32025
32026
32027    USE_EXTERNAL_LIBGIF=true
32028else
32029    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32030fi
32031
32032
32033###############################################################################
32034#
32035# Check for the zlib library
32036#
32037
32038
32039# Check whether --with-zlib was given.
32040if test "${with_zlib+set}" = set; then :
32041  withval=$with_zlib;
32042fi
32043
32044
32045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32046$as_echo_n "checking for compress in -lz... " >&6; }
32047if test "${ac_cv_lib_z_compress+set}" = set; then :
32048  $as_echo_n "(cached) " >&6
32049else
32050  ac_check_lib_save_LIBS=$LIBS
32051LIBS="-lz  $LIBS"
32052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32053/* end confdefs.h.  */
32054
32055/* Override any GCC internal prototype to avoid an error.
32056   Use char because int might match the return type of a GCC
32057   builtin and then its argument prototype would still apply.  */
32058#ifdef __cplusplus
32059extern "C"
32060#endif
32061char compress ();
32062int
32063main ()
32064{
32065return compress ();
32066  ;
32067  return 0;
32068}
32069_ACEOF
32070if ac_fn_cxx_try_link "$LINENO"; then :
32071  ac_cv_lib_z_compress=yes
32072else
32073  ac_cv_lib_z_compress=no
32074fi
32075rm -f core conftest.err conftest.$ac_objext \
32076    conftest$ac_exeext conftest.$ac_ext
32077LIBS=$ac_check_lib_save_LIBS
32078fi
32079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32080$as_echo "$ac_cv_lib_z_compress" >&6; }
32081if test "x$ac_cv_lib_z_compress" = x""yes; then :
32082   ZLIB_FOUND=yes
32083else
32084   ZLIB_FOUND=no
32085fi
32086
32087
32088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32089$as_echo_n "checking for which zlib to use... " >&6; }
32090
32091DEFAULT_ZLIB=bundled
32092if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32093#
32094# On macosx default is system...on others default is
32095#
32096    DEFAULT_ZLIB=system
32097fi
32098
32099if test "x${ZLIB_FOUND}" != "xyes"; then
32100#
32101# If we don't find any system...set default to bundled
32102#
32103    DEFAULT_ZLIB=bundled
32104fi
32105
32106#
32107# If user didn't specify, use DEFAULT_ZLIB
32108#
32109if test "x${with_zlib}" = "x"; then
32110    with_zlib=${DEFAULT_ZLIB}
32111fi
32112
32113if test "x${with_zlib}" = "xbundled"; then
32114    USE_EXTERNAL_LIBZ=false
32115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32116$as_echo "bundled" >&6; }
32117elif test "x${with_zlib}" = "xsystem"; then
32118    if test "x${ZLIB_FOUND}" = "xyes"; then
32119        USE_EXTERNAL_LIBZ=true
32120        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32121$as_echo "system" >&6; }
32122    else
32123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32124$as_echo "system not found" >&6; }
32125        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32126    fi
32127else
32128    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32129fi
32130
32131
32132
32133###############################################################################
32134LIBZIP_CAN_USE_MMAP=true
32135
32136
32137
32138###############################################################################
32139#
32140# Check if altzone exists in time.h
32141#
32142
32143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32144/* end confdefs.h.  */
32145#include <time.h>
32146int
32147main ()
32148{
32149return (int)altzone;
32150  ;
32151  return 0;
32152}
32153_ACEOF
32154if ac_fn_cxx_try_link "$LINENO"; then :
32155  has_altzone=yes
32156else
32157  has_altzone=no
32158fi
32159rm -f core conftest.err conftest.$ac_objext \
32160    conftest$ac_exeext conftest.$ac_ext
32161if test "x$has_altzone" = xyes; then
32162
32163$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32164
32165fi
32166
32167###############################################################################
32168#
32169# Check the maths library
32170#
32171
32172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32173$as_echo_n "checking for cos in -lm... " >&6; }
32174if test "${ac_cv_lib_m_cos+set}" = set; then :
32175  $as_echo_n "(cached) " >&6
32176else
32177  ac_check_lib_save_LIBS=$LIBS
32178LIBS="-lm  $LIBS"
32179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32180/* end confdefs.h.  */
32181
32182/* Override any GCC internal prototype to avoid an error.
32183   Use char because int might match the return type of a GCC
32184   builtin and then its argument prototype would still apply.  */
32185#ifdef __cplusplus
32186extern "C"
32187#endif
32188char cos ();
32189int
32190main ()
32191{
32192return cos ();
32193  ;
32194  return 0;
32195}
32196_ACEOF
32197if ac_fn_cxx_try_link "$LINENO"; then :
32198  ac_cv_lib_m_cos=yes
32199else
32200  ac_cv_lib_m_cos=no
32201fi
32202rm -f core conftest.err conftest.$ac_objext \
32203    conftest$ac_exeext conftest.$ac_ext
32204LIBS=$ac_check_lib_save_LIBS
32205fi
32206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32207$as_echo "$ac_cv_lib_m_cos" >&6; }
32208if test "x$ac_cv_lib_m_cos" = x""yes; then :
32209  cat >>confdefs.h <<_ACEOF
32210#define HAVE_LIBM 1
32211_ACEOF
32212
32213  LIBS="-lm $LIBS"
32214
32215else
32216
32217                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32218$as_echo "$as_me: Maths library was not found" >&6;}
32219
32220fi
32221
32222
32223
32224###############################################################################
32225#
32226# Check for libdl.so
32227
32228save_LIBS="$LIBS"
32229LIBS=""
32230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32231$as_echo_n "checking for dlopen in -ldl... " >&6; }
32232if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
32233  $as_echo_n "(cached) " >&6
32234else
32235  ac_check_lib_save_LIBS=$LIBS
32236LIBS="-ldl  $LIBS"
32237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32238/* end confdefs.h.  */
32239
32240/* Override any GCC internal prototype to avoid an error.
32241   Use char because int might match the return type of a GCC
32242   builtin and then its argument prototype would still apply.  */
32243#ifdef __cplusplus
32244extern "C"
32245#endif
32246char dlopen ();
32247int
32248main ()
32249{
32250return dlopen ();
32251  ;
32252  return 0;
32253}
32254_ACEOF
32255if ac_fn_cxx_try_link "$LINENO"; then :
32256  ac_cv_lib_dl_dlopen=yes
32257else
32258  ac_cv_lib_dl_dlopen=no
32259fi
32260rm -f core conftest.err conftest.$ac_objext \
32261    conftest$ac_exeext conftest.$ac_ext
32262LIBS=$ac_check_lib_save_LIBS
32263fi
32264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32265$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32266if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
32267  cat >>confdefs.h <<_ACEOF
32268#define HAVE_LIBDL 1
32269_ACEOF
32270
32271  LIBS="-ldl $LIBS"
32272
32273fi
32274
32275LIBDL="$LIBS"
32276
32277LIBS="$save_LIBS"
32278
32279
32280
32281###############################################################################
32282#
32283# statically link libstdc++ before C++ ABI is stablized on Linux unless
32284# dynamic build is configured on command line.
32285#
32286
32287# Check whether --with-stdc++lib was given.
32288if test "${with_stdc__lib+set}" = set; then :
32289  withval=$with_stdc__lib;
32290    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32291        && test "x$with_stdc__lib" != xdefault; then
32292      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32293    fi
32294
32295else
32296  with_stdc__lib=default
32297
32298fi
32299
32300
32301if test "x$OPENJDK_TARGET_OS" = xlinux; then
32302    # Test if -lstdc++ works.
32303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32304$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32305    ac_ext=cpp
32306ac_cpp='$CXXCPP $CPPFLAGS'
32307ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32308ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32309ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32310
32311    OLD_CXXFLAGS="$CXXFLAGS"
32312    CXXFLAGS="$CXXFLAGS -lstdc++"
32313    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32314/* end confdefs.h.  */
32315
32316int
32317main ()
32318{
32319return 0;
32320  ;
32321  return 0;
32322}
32323_ACEOF
32324if ac_fn_cxx_try_link "$LINENO"; then :
32325  has_dynamic_libstdcxx=yes
32326else
32327  has_dynamic_libstdcxx=no
32328fi
32329rm -f core conftest.err conftest.$ac_objext \
32330    conftest$ac_exeext conftest.$ac_ext
32331    CXXFLAGS="$OLD_CXXFLAGS"
32332    ac_ext=cpp
32333ac_cpp='$CXXCPP $CPPFLAGS'
32334ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32335ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32336ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32337
32338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32339$as_echo "$has_dynamic_libstdcxx" >&6; }
32340
32341    # Test if stdc++ can be linked statically.
32342    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32343$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32344    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32345    ac_ext=cpp
32346ac_cpp='$CXXCPP $CPPFLAGS'
32347ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32348ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32349ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32350
32351    OLD_LIBS="$LIBS"
32352    OLD_CXX="$CXX"
32353    LIBS="$STATIC_STDCXX_FLAGS"
32354    CXX="$CC"
32355    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32356/* end confdefs.h.  */
32357
32358int
32359main ()
32360{
32361return 0;
32362  ;
32363  return 0;
32364}
32365_ACEOF
32366if ac_fn_cxx_try_link "$LINENO"; then :
32367  has_static_libstdcxx=yes
32368else
32369  has_static_libstdcxx=no
32370fi
32371rm -f core conftest.err conftest.$ac_objext \
32372    conftest$ac_exeext conftest.$ac_ext
32373    LIBS="$OLD_LIBS"
32374    CXX="$OLD_CXX"
32375    ac_ext=cpp
32376ac_cpp='$CXXCPP $CPPFLAGS'
32377ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32378ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32379ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32380
32381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32382$as_echo "$has_static_libstdcxx" >&6; }
32383
32384    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32385        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32386    fi
32387
32388    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32389        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32390    fi
32391
32392    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32393        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32394    fi
32395
32396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32397$as_echo_n "checking how to link with libstdc++... " >&6; }
32398    # If dynamic was requested, it's available since it would fail above otherwise.
32399    # If dynamic wasn't requested, go with static unless it isn't available.
32400    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32401        LIBCXX="$LIBCXX -lstdc++"
32402        LDCXX="$CXX"
32403        STATIC_CXX_SETTING="STATIC_CXX=false"
32404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32405$as_echo "dynamic" >&6; }
32406    else
32407        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32408        LDCXX="$CC"
32409        STATIC_CXX_SETTING="STATIC_CXX=true"
32410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32411$as_echo "static" >&6; }
32412    fi
32413fi
32414
32415
32416if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32417    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32418
32419pkg_failed=no
32420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32421$as_echo_n "checking for LIBFFI... " >&6; }
32422
32423if test -n "$LIBFFI_CFLAGS"; then
32424    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32425 elif test -n "$PKG_CONFIG"; then
32426    if test -n "$PKG_CONFIG" && \
32427    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32428  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32429  ac_status=$?
32430  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32431  test $ac_status = 0; }; then
32432  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32433else
32434  pkg_failed=yes
32435fi
32436 else
32437    pkg_failed=untried
32438fi
32439if test -n "$LIBFFI_LIBS"; then
32440    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32441 elif test -n "$PKG_CONFIG"; then
32442    if test -n "$PKG_CONFIG" && \
32443    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32444  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32445  ac_status=$?
32446  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32447  test $ac_status = 0; }; then
32448  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32449else
32450  pkg_failed=yes
32451fi
32452 else
32453    pkg_failed=untried
32454fi
32455
32456
32457
32458if test $pkg_failed = yes; then
32459
32460if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32461        _pkg_short_errors_supported=yes
32462else
32463        _pkg_short_errors_supported=no
32464fi
32465        if test $_pkg_short_errors_supported = yes; then
32466	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32467        else
32468	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32469        fi
32470	# Put the nasty error message in config.log where it belongs
32471	echo "$LIBFFI_PKG_ERRORS" >&5
32472
32473	as_fn_error $? "Package requirements (libffi) were not met:
32474
32475$LIBFFI_PKG_ERRORS
32476
32477Consider adjusting the PKG_CONFIG_PATH environment variable if you
32478installed software in a non-standard prefix.
32479
32480Alternatively, you may set the environment variables LIBFFI_CFLAGS
32481and LIBFFI_LIBS to avoid the need to call pkg-config.
32482See the pkg-config man page for more details.
32483" "$LINENO" 5
32484elif test $pkg_failed = untried; then
32485	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32486$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32487as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32488is in your PATH or set the PKG_CONFIG environment variable to the full
32489path to pkg-config.
32490
32491Alternatively, you may set the environment variables LIBFFI_CFLAGS
32492and LIBFFI_LIBS to avoid the need to call pkg-config.
32493See the pkg-config man page for more details.
32494
32495To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32496See \`config.log' for more details" "$LINENO" 5 ; }
32497else
32498	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32499	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32501$as_echo "yes" >&6; }
32502	:
32503fi
32504
32505fi
32506
32507if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32508    # Extract the first word of "llvm-config", so it can be a program name with args.
32509set dummy llvm-config; ac_word=$2
32510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32511$as_echo_n "checking for $ac_word... " >&6; }
32512if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
32513  $as_echo_n "(cached) " >&6
32514else
32515  if test -n "$LLVM_CONFIG"; then
32516  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32517else
32518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32519for as_dir in $PATH
32520do
32521  IFS=$as_save_IFS
32522  test -z "$as_dir" && as_dir=.
32523    for ac_exec_ext in '' $ac_executable_extensions; do
32524  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32525    ac_cv_prog_LLVM_CONFIG="llvm-config"
32526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32527    break 2
32528  fi
32529done
32530  done
32531IFS=$as_save_IFS
32532
32533fi
32534fi
32535LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32536if test -n "$LLVM_CONFIG"; then
32537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32538$as_echo "$LLVM_CONFIG" >&6; }
32539else
32540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32541$as_echo "no" >&6; }
32542fi
32543
32544
32545
32546    if test "x$LLVM_CONFIG" != xllvm-config; then
32547        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32548    fi
32549
32550    llvm_components="jit mcjit engine nativecodegen native"
32551    unset LLVM_CFLAGS
32552    for flag in $("$LLVM_CONFIG" --cxxflags); do
32553      if echo "${flag}" | grep -q '^-[ID]'; then
32554        if test "${flag}" != "-D_DEBUG" ; then
32555          if test "${LLVM_CFLAGS}" != "" ; then
32556            LLVM_CFLAGS="${LLVM_CFLAGS} "
32557          fi
32558          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32559        fi
32560      fi
32561    done
32562    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32563    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32564
32565    unset LLVM_LDFLAGS
32566    for flag in $("${LLVM_CONFIG}" --ldflags); do
32567      if echo "${flag}" | grep -q '^-L'; then
32568        if test "${LLVM_LDFLAGS}" != ""; then
32569          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32570        fi
32571        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32572      fi
32573    done
32574
32575    unset LLVM_LIBS
32576    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32577      if echo "${flag}" | grep -q '^-l'; then
32578        if test "${LLVM_LIBS}" != ""; then
32579          LLVM_LIBS="${LLVM_LIBS} "
32580        fi
32581        LLVM_LIBS="${LLVM_LIBS}${flag}"
32582      fi
32583    done
32584
32585
32586
32587
32588fi
32589
32590# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32591if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32592    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32593fi
32594
32595# TODO better (platform agnostic) test
32596if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32597    LIBCXX="-lstdc++"
32598fi
32599
32600
32601
32602
32603
32604# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32605
32606# When using cygwin or msys, we need a wrapper binary that renames
32607# /cygdrive/c/ arguments into c:/ arguments and peeks into
32608# @files and rewrites these too! This wrapper binary is
32609# called fixpath.
32610FIXPATH=
32611if test "x$OPENJDK_BUILD_OS" = xwindows; then
32612    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32613$as_echo_n "checking if fixpath can be created... " >&6; }
32614    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32615    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32616    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32617      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32618      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32619      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32620      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32621    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32622      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32623      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32624
32625      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32626      # @ was chosen as separator to minimize risk of other tools messing around with it
32627      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32628      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32629
32630      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32631    fi
32632    rm -f $OUTPUT_ROOT/fixpath*
32633    cd $OUTPUT_ROOT
32634    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32635    cd $CURDIR
32636
32637    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32638        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32639$as_echo "no" >&6; }
32640        cat $OUTPUT_ROOT/fixpath1.log
32641        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32642    fi
32643    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32644$as_echo "yes" >&6; }
32645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32646$as_echo_n "checking if fixpath.exe works... " >&6; }
32647    cd $OUTPUT_ROOT
32648    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32649    cd $CURDIR
32650    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32652$as_echo "no" >&6; }
32653        cat $OUTPUT_ROOT/fixpath2.log
32654        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32655    fi
32656    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32657$as_echo "yes" >&6; }
32658    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32659fi
32660
32661
32662
32663
32664###############################################################################
32665#
32666# We need to do some final tweaking, when everything else is done.
32667#
32668###############################################################################
32669
32670
32671HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32672
32673
32674# The name of the Service Agent jar.
32675SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32676if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32677  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32678fi
32679
32680
32681
32682
32683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32684$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32685
32686if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32687    ENABLE_INTREE_EC=yes
32688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32689$as_echo "yes" >&6; }
32690else
32691    ENABLE_INTREE_EC=no
32692    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32693$as_echo "no" >&6; }
32694fi
32695
32696
32697
32698
32699###############################################################################
32700#
32701# Configure parts of the build that only affect the build performance,
32702# not the result.
32703#
32704###############################################################################
32705
32706
32707  # How many cores do we have on this build system?
32708
32709# Check whether --with-num-cores was given.
32710if test "${with_num_cores+set}" = set; then :
32711  withval=$with_num_cores;
32712fi
32713
32714  if test "x$with_num_cores" = x; then
32715    # The number of cores were not specified, try to probe them.
32716
32717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32718$as_echo_n "checking for number of cores... " >&6; }
32719    NUM_CORES=1
32720    FOUND_CORES=no
32721
32722    if test -f /proc/cpuinfo; then
32723        # Looks like a Linux (or cygwin) system
32724        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32725        FOUND_CORES=yes
32726    elif test -x /usr/sbin/psrinfo; then
32727        # Looks like a Solaris system
32728        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32729        FOUND_CORES=yes
32730    elif test -x /usr/sbin/system_profiler; then
32731        # Looks like a MacOSX system
32732        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32733        FOUND_CORES=yes
32734    elif test -n "$NUMBER_OF_PROCESSORS"; then
32735        # On windows, look in the env
32736        NUM_CORES=$NUMBER_OF_PROCESSORS
32737        FOUND_CORES=yes
32738    fi
32739
32740    if test "x$FOUND_CORES" = xyes; then
32741        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32742$as_echo "$NUM_CORES" >&6; }
32743    else
32744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32745$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32747$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32748    fi
32749
32750
32751  else
32752    NUM_CORES=$with_num_cores
32753  fi
32754
32755
32756
32757  # How much memory do we have on this build system?
32758
32759# Check whether --with-memory-size was given.
32760if test "${with_memory_size+set}" = set; then :
32761  withval=$with_memory_size;
32762fi
32763
32764  if test "x$with_memory_size" = x; then
32765    # The memory size was not specified, try to probe it.
32766
32767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32768$as_echo_n "checking for memory size... " >&6; }
32769    # Default to 1024 MB
32770    MEMORY_SIZE=1024
32771    FOUND_MEM=no
32772
32773    if test -f /proc/meminfo; then
32774        # Looks like a Linux (or cygwin) system
32775        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32776        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32777        FOUND_MEM=yes
32778    elif test -x /usr/sbin/prtconf; then
32779        # Looks like a Solaris system
32780        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32781        FOUND_MEM=yes
32782    elif test -x /usr/sbin/system_profiler; then
32783        # Looks like a MacOSX system
32784        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32785        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32786        FOUND_MEM=yes
32787    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32788        # Windows, but without cygwin
32789        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32790        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32791        FOUND_MEM=yes
32792    fi
32793
32794    if test "x$FOUND_MEM" = xyes; then
32795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32796$as_echo "$MEMORY_SIZE MB" >&6; }
32797    else
32798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32799$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32800        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32801$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32802    fi
32803
32804  else
32805    MEMORY_SIZE=$with_memory_size
32806  fi
32807
32808
32809
32810  # Provide a decent default number of parallel jobs for make depending on
32811  # number of cores, amount of memory and machine architecture.
32812
32813# Check whether --with-jobs was given.
32814if test "${with_jobs+set}" = set; then :
32815  withval=$with_jobs;
32816fi
32817
32818  if test "x$with_jobs" = x; then
32819    # Number of jobs was not specified, calculate.
32820    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32821$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32822    # Approximate memory in GB, rounding up a bit.
32823    memory_gb=`expr $MEMORY_SIZE / 1100`
32824    # Pick the lowest of memory in gb and number of cores.
32825    if test "$memory_gb" -lt "$NUM_CORES"; then
32826      JOBS="$memory_gb"
32827    else
32828      JOBS="$NUM_CORES"
32829      # On bigger machines, leave some room for other processes to run
32830      if test "$JOBS" -gt "4"; then
32831        JOBS=`expr $JOBS '*' 90 / 100`
32832      fi
32833    fi
32834    # Cap number of jobs to 16
32835    if test "$JOBS" -gt "16"; then
32836      JOBS=16
32837    fi
32838    if test "$JOBS" -eq "0"; then
32839      JOBS=1
32840    fi
32841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32842$as_echo "$JOBS" >&6; }
32843  else
32844    JOBS=$with_jobs
32845  fi
32846
32847
32848
32849# Setup smart javac (after cores and memory have been setup)
32850
32851
32852# Check whether --with-sjavac-server-java was given.
32853if test "${with_sjavac_server_java+set}" = set; then :
32854  withval=$with_sjavac_server_java;
32855fi
32856
32857
32858if test "x$with_sjavac_server_java" != x; then
32859    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32860    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32861    if test "x$FOUND_VERSION" = x; then
32862        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32863    fi
32864else
32865    SJAVAC_SERVER_JAVA=""
32866    # Hotspot specific options.
32867
32868    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
32869    $ECHO "Command: $JAVA -verbosegc -version" >&5
32870    OUTPUT=`$JAVA -verbosegc -version 2>&1`
32871    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32872    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32873    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32874        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32875	JVM_ARG_OK=true
32876    else
32877	$ECHO "Arg failed:" >&5
32878	$ECHO "$OUTPUT" >&5
32879	JVM_ARG_OK=false
32880    fi
32881
32882    # JRockit specific options.
32883
32884    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
32885    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
32886    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
32887    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32888    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32889    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32890        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32891	JVM_ARG_OK=true
32892    else
32893	$ECHO "Arg failed:" >&5
32894	$ECHO "$OUTPUT" >&5
32895	JVM_ARG_OK=false
32896    fi
32897
32898    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32899fi
32900
32901
32902if test "$MEMORY_SIZE" -gt "2500"; then
32903
32904    $ECHO "Check if jvm arg is ok: -d64" >&5
32905    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
32906    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
32907    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32908    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32909    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32910        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32911	JVM_ARG_OK=true
32912    else
32913	$ECHO "Arg failed:" >&5
32914	$ECHO "$OUTPUT" >&5
32915	JVM_ARG_OK=false
32916    fi
32917
32918    if test "$JVM_ARG_OK" = true; then
32919        JVM_64BIT=true
32920	JVM_ARG_OK=false
32921    fi
32922    fi
32923
32924if test "$JVM_64BIT" = true; then
32925    if test "$MEMORY_SIZE" -gt "17000"; then
32926
32927    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
32928    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
32929    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
32930    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32931    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32932    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32933        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
32934	JVM_ARG_OK=true
32935    else
32936	$ECHO "Arg failed:" >&5
32937	$ECHO "$OUTPUT" >&5
32938	JVM_ARG_OK=false
32939    fi
32940
32941    fi
32942    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
32943
32944    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
32945    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
32946    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
32947    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32948    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32949    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32950        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
32951	JVM_ARG_OK=true
32952    else
32953	$ECHO "Arg failed:" >&5
32954	$ECHO "$OUTPUT" >&5
32955	JVM_ARG_OK=false
32956    fi
32957
32958    fi
32959    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
32960
32961    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
32962    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
32963    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
32964    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32965    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32966    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32967        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
32968	JVM_ARG_OK=true
32969    else
32970	$ECHO "Arg failed:" >&5
32971	$ECHO "$OUTPUT" >&5
32972	JVM_ARG_OK=false
32973    fi
32974
32975    fi
32976    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
32977
32978    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
32979    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
32980    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
32981    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32982    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32983    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32984        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
32985	JVM_ARG_OK=true
32986    else
32987	$ECHO "Arg failed:" >&5
32988	$ECHO "$OUTPUT" >&5
32989	JVM_ARG_OK=false
32990    fi
32991
32992    fi
32993fi
32994if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
32995
32996    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
32997    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
32998    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
32999    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33000    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33001    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33002        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33003	JVM_ARG_OK=true
33004    else
33005	$ECHO "Arg failed:" >&5
33006	$ECHO "$OUTPUT" >&5
33007	JVM_ARG_OK=false
33008    fi
33009
33010fi
33011if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33012
33013    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33014    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33015    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33016    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33017    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33018    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33019        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33020	JVM_ARG_OK=true
33021    else
33022	$ECHO "Arg failed:" >&5
33023	$ECHO "$OUTPUT" >&5
33024	JVM_ARG_OK=false
33025    fi
33026
33027fi
33028if test "$JVM_ARG_OK" = false; then
33029
33030    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33031    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33032    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33033    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33034    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33035    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33036        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33037	JVM_ARG_OK=true
33038    else
33039	$ECHO "Arg failed:" >&5
33040	$ECHO "$OUTPUT" >&5
33041	JVM_ARG_OK=false
33042    fi
33043
33044fi
33045
33046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33047$as_echo_n "checking whether to use sjavac... " >&6; }
33048# Check whether --enable-sjavac was given.
33049if test "${enable_sjavac+set}" = set; then :
33050  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33051else
33052  ENABLE_SJAVAC='no'
33053fi
33054
33055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33056$as_echo "$ENABLE_SJAVAC" >&6; }
33057
33058
33059if test "x$ENABLE_SJAVAC" = xyes; then
33060    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33061else
33062    SJAVAC_SERVER_DIR=
33063fi
33064
33065
33066
33067
33068# Can the C/C++ compiler use precompiled headers?
33069
33070
33071###############################################################################
33072#
33073# Can the C/C++ compiler use precompiled headers?
33074#
33075# Check whether --enable-precompiled-headers was given.
33076if test "${enable_precompiled_headers+set}" = set; then :
33077  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33078else
33079  ENABLE_PRECOMPH=yes
33080fi
33081
33082
33083USE_PRECOMPILED_HEADER=1
33084if test "x$ENABLE_PRECOMPH" = xno; then
33085    USE_PRECOMPILED_HEADER=0
33086fi
33087
33088if test "x$ENABLE_PRECOMPH" = xyes; then
33089    # Check that the compiler actually supports precomp headers.
33090    if test "x$GCC" = xyes; then
33091         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33092$as_echo_n "checking that precompiled headers work... " >&6; }
33093         echo "int alfa();" > conftest.h
33094         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33095         if test ! -f conftest.hpp.gch; then
33096             USE_PRECOMPILED_HEADER=0
33097             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33098$as_echo "no" >&6; }
33099         else
33100             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33101$as_echo "yes" >&6; }
33102         fi
33103         rm -f conftest.h conftest.hpp.gch
33104    fi
33105fi
33106
33107
33108
33109
33110# Setup use of ccache, if available
33111
33112    # Check whether --enable-ccache was given.
33113if test "${enable_ccache+set}" = set; then :
33114  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33115else
33116  ENABLE_CCACHE=yes
33117fi
33118
33119    if test "x$ENABLE_CCACHE" = xyes; then
33120        # Extract the first word of "ccache", so it can be a program name with args.
33121set dummy ccache; ac_word=$2
33122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33123$as_echo_n "checking for $ac_word... " >&6; }
33124if test "${ac_cv_path_CCACHE+set}" = set; then :
33125  $as_echo_n "(cached) " >&6
33126else
33127  case $CCACHE in
33128  [\\/]* | ?:[\\/]*)
33129  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33130  ;;
33131  *)
33132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33133for as_dir in $PATH
33134do
33135  IFS=$as_save_IFS
33136  test -z "$as_dir" && as_dir=.
33137    for ac_exec_ext in '' $ac_executable_extensions; do
33138  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33139    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33141    break 2
33142  fi
33143done
33144  done
33145IFS=$as_save_IFS
33146
33147  ;;
33148esac
33149fi
33150CCACHE=$ac_cv_path_CCACHE
33151if test -n "$CCACHE"; then
33152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33153$as_echo "$CCACHE" >&6; }
33154else
33155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33156$as_echo "no" >&6; }
33157fi
33158
33159
33160    else
33161        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33162$as_echo_n "checking for ccache... " >&6; }
33163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33164$as_echo "explicitly disabled" >&6; }
33165        CCACHE=
33166    fi
33167
33168
33169
33170# Check whether --with-ccache-dir was given.
33171if test "${with_ccache_dir+set}" = set; then :
33172  withval=$with_ccache_dir;
33173fi
33174
33175
33176    if test "x$with_ccache_dir" != x; then
33177        # When using a non home ccache directory, assume the use is to share ccache files
33178        # with other users. Thus change the umask.
33179        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33180    fi
33181    CCACHE_FOUND=""
33182    if test "x$CCACHE" != x; then
33183
33184    if test "x$CCACHE" != x; then
33185        CCACHE_FOUND="true"
33186        # Only use ccache if it is 3.1.4 or later, which supports
33187        # precompiled headers.
33188        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33189$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33190        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33191        if test "x$HAS_GOOD_CCACHE" = x; then
33192            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33193$as_echo "no, disabling ccache" >&6; }
33194            CCACHE=
33195        else
33196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33197$as_echo "yes" >&6; }
33198            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33199$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33200            PUSHED_FLAGS="$CXXFLAGS"
33201            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33202            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33203/* end confdefs.h.  */
33204
33205int
33206main ()
33207{
33208
33209  ;
33210  return 0;
33211}
33212_ACEOF
33213if ac_fn_cxx_try_compile "$LINENO"; then :
33214  CC_KNOWS_CCACHE_TRICK=yes
33215else
33216  CC_KNOWS_CCACHE_TRICK=no
33217fi
33218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33219            CXXFLAGS="$PUSHED_FLAGS"
33220            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33221                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33222$as_echo "yes" >&6; }
33223            else
33224                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33225$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33226                CCACHE=
33227            fi
33228        fi
33229    fi
33230
33231    if test "x$CCACHE" != x; then
33232        CCACHE_SLOPPINESS=time_macros
33233        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33234        CCACHE_FLAGS=-fpch-preprocess
33235
33236        if test "x$SET_CCACHE_DIR" != x; then
33237            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33238	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33239        fi
33240    fi
33241
33242    fi
33243
33244
33245###############################################################################
33246#
33247# And now the finish...
33248#
33249###############################################################################
33250
33251# Check for some common pitfalls
33252
33253  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33254    file_to_test="$SRC_ROOT/LICENSE"
33255    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33256      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
33257    fi
33258  fi
33259
33260
33261
33262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33263$as_echo_n "checking if build directory is on local disk... " >&6; }
33264
33265	# df -l lists only local disks; if the given directory is not found then
33266	# a non-zero exit code is given
33267  if test "x$DF" = x; then
33268    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33269      # msys does not have df; use Windows "net use" instead.
33270      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33271      if test "x$IS_NETWORK_DISK" = x; then
33272        OUTPUT_DIR_IS_LOCAL="yes"
33273      else
33274        OUTPUT_DIR_IS_LOCAL="no"
33275      fi
33276    else
33277      # No df here, say it's local
33278      OUTPUT_DIR_IS_LOCAL="yes"
33279    fi
33280  else
33281    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33282      OUTPUT_DIR_IS_LOCAL="yes"
33283    else
33284      OUTPUT_DIR_IS_LOCAL="no"
33285    fi
33286  fi
33287
33288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33289$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33290
33291
33292
33293# Check if the user has any old-style ALT_ variables set.
33294FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33295
33296# Before generating output files, test if they exist. If they do, this is a reconfigure.
33297# Since we can't properly handle the dependencies for this, warn the user about the situation
33298if test -e $OUTPUT_ROOT/spec.gmk; then
33299  IS_RECONFIGURE=yes
33300else
33301  IS_RECONFIGURE=no
33302fi
33303
33304if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33305  HIDE_PERFORMANCE_HINTS=yes
33306else
33307  HIDE_PERFORMANCE_HINTS=no
33308  # Hide it the next time around...
33309  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33310fi
33311
33312
33313
33314# At the end, call the custom hook. (Dummy macro if no custom sources available)
33315
33316
33317# We're messing a bit with internal autoconf variables to put the config.status
33318# in the output directory instead of the current directory.
33319CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33320# Create the actual output files. Now the main work of configure is done.
33321cat >confcache <<\_ACEOF
33322# This file is a shell script that caches the results of configure
33323# tests run on this system so they can be shared between configure
33324# scripts and configure runs, see configure's option --config-cache.
33325# It is not useful on other systems.  If it contains results you don't
33326# want to keep, you may remove or edit it.
33327#
33328# config.status only pays attention to the cache file if you give it
33329# the --recheck option to rerun configure.
33330#
33331# `ac_cv_env_foo' variables (set or unset) will be overridden when
33332# loading this file, other *unset* `ac_cv_foo' will be assigned the
33333# following values.
33334
33335_ACEOF
33336
33337# The following way of writing the cache mishandles newlines in values,
33338# but we know of no workaround that is simple, portable, and efficient.
33339# So, we kill variables containing newlines.
33340# Ultrix sh set writes to stderr and can't be redirected directly,
33341# and sets the high bit in the cache file unless we assign to the vars.
33342(
33343  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33344    eval ac_val=\$$ac_var
33345    case $ac_val in #(
33346    *${as_nl}*)
33347      case $ac_var in #(
33348      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33349$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33350      esac
33351      case $ac_var in #(
33352      _ | IFS | as_nl) ;; #(
33353      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33354      *) { eval $ac_var=; unset $ac_var;} ;;
33355      esac ;;
33356    esac
33357  done
33358
33359  (set) 2>&1 |
33360    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33361    *${as_nl}ac_space=\ *)
33362      # `set' does not quote correctly, so add quotes: double-quote
33363      # substitution turns \\\\ into \\, and sed turns \\ into \.
33364      sed -n \
33365	"s/'/'\\\\''/g;
33366	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33367      ;; #(
33368    *)
33369      # `set' quotes correctly as required by POSIX, so do not add quotes.
33370      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33371      ;;
33372    esac |
33373    sort
33374) |
33375  sed '
33376     /^ac_cv_env_/b end
33377     t clear
33378     :clear
33379     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33380     t end
33381     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33382     :end' >>confcache
33383if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33384  if test -w "$cache_file"; then
33385    test "x$cache_file" != "x/dev/null" &&
33386      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33387$as_echo "$as_me: updating cache $cache_file" >&6;}
33388    cat confcache >$cache_file
33389  else
33390    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33391$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33392  fi
33393fi
33394rm -f confcache
33395
33396test "x$prefix" = xNONE && prefix=$ac_default_prefix
33397# Let make expand exec_prefix.
33398test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33399
33400DEFS=-DHAVE_CONFIG_H
33401
33402ac_libobjs=
33403ac_ltlibobjs=
33404U=
33405for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33406  # 1. Remove the extension, and $U if already installed.
33407  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33408  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33409  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33410  #    will be set to the directory where LIBOBJS objects are built.
33411  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33412  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33413done
33414LIBOBJS=$ac_libobjs
33415
33416LTLIBOBJS=$ac_ltlibobjs
33417
33418
33419
33420: ${CONFIG_STATUS=./config.status}
33421ac_write_fail=0
33422ac_clean_files_save=$ac_clean_files
33423ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33424{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33425$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33426as_write_fail=0
33427cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33428#! $SHELL
33429# Generated by $as_me.
33430# Run this file to recreate the current configuration.
33431# Compiler output produced by configure, useful for debugging
33432# configure, is in config.log if it exists.
33433
33434debug=false
33435ac_cs_recheck=false
33436ac_cs_silent=false
33437
33438SHELL=\${CONFIG_SHELL-$SHELL}
33439export SHELL
33440_ASEOF
33441cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33442## -------------------- ##
33443## M4sh Initialization. ##
33444## -------------------- ##
33445
33446# Be more Bourne compatible
33447DUALCASE=1; export DUALCASE # for MKS sh
33448if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33449  emulate sh
33450  NULLCMD=:
33451  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33452  # is contrary to our usage.  Disable this feature.
33453  alias -g '${1+"$@"}'='"$@"'
33454  setopt NO_GLOB_SUBST
33455else
33456  case `(set -o) 2>/dev/null` in #(
33457  *posix*) :
33458    set -o posix ;; #(
33459  *) :
33460     ;;
33461esac
33462fi
33463
33464
33465as_nl='
33466'
33467export as_nl
33468# Printing a long string crashes Solaris 7 /usr/bin/printf.
33469as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33470as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33471as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33472# Prefer a ksh shell builtin over an external printf program on Solaris,
33473# but without wasting forks for bash or zsh.
33474if test -z "$BASH_VERSION$ZSH_VERSION" \
33475    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33476  as_echo='print -r --'
33477  as_echo_n='print -rn --'
33478elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33479  as_echo='printf %s\n'
33480  as_echo_n='printf %s'
33481else
33482  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33483    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33484    as_echo_n='/usr/ucb/echo -n'
33485  else
33486    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33487    as_echo_n_body='eval
33488      arg=$1;
33489      case $arg in #(
33490      *"$as_nl"*)
33491	expr "X$arg" : "X\\(.*\\)$as_nl";
33492	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33493      esac;
33494      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33495    '
33496    export as_echo_n_body
33497    as_echo_n='sh -c $as_echo_n_body as_echo'
33498  fi
33499  export as_echo_body
33500  as_echo='sh -c $as_echo_body as_echo'
33501fi
33502
33503# The user is always right.
33504if test "${PATH_SEPARATOR+set}" != set; then
33505  PATH_SEPARATOR=:
33506  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33507    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33508      PATH_SEPARATOR=';'
33509  }
33510fi
33511
33512
33513# IFS
33514# We need space, tab and new line, in precisely that order.  Quoting is
33515# there to prevent editors from complaining about space-tab.
33516# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33517# splitting by setting IFS to empty value.)
33518IFS=" ""	$as_nl"
33519
33520# Find who we are.  Look in the path if we contain no directory separator.
33521case $0 in #((
33522  *[\\/]* ) as_myself=$0 ;;
33523  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33524for as_dir in $PATH
33525do
33526  IFS=$as_save_IFS
33527  test -z "$as_dir" && as_dir=.
33528    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33529  done
33530IFS=$as_save_IFS
33531
33532     ;;
33533esac
33534# We did not find ourselves, most probably we were run as `sh COMMAND'
33535# in which case we are not to be found in the path.
33536if test "x$as_myself" = x; then
33537  as_myself=$0
33538fi
33539if test ! -f "$as_myself"; then
33540  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33541  exit 1
33542fi
33543
33544# Unset variables that we do not need and which cause bugs (e.g. in
33545# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33546# suppresses any "Segmentation fault" message there.  '((' could
33547# trigger a bug in pdksh 5.2.14.
33548for as_var in BASH_ENV ENV MAIL MAILPATH
33549do eval test x\${$as_var+set} = xset \
33550  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33551done
33552PS1='$ '
33553PS2='> '
33554PS4='+ '
33555
33556# NLS nuisances.
33557LC_ALL=C
33558export LC_ALL
33559LANGUAGE=C
33560export LANGUAGE
33561
33562# CDPATH.
33563(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33564
33565
33566# as_fn_error STATUS ERROR [LINENO LOG_FD]
33567# ----------------------------------------
33568# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33569# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33570# script with STATUS, using 1 if that was 0.
33571as_fn_error ()
33572{
33573  as_status=$1; test $as_status -eq 0 && as_status=1
33574  if test "$4"; then
33575    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33576    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33577  fi
33578  $as_echo "$as_me: error: $2" >&2
33579  as_fn_exit $as_status
33580} # as_fn_error
33581
33582
33583# as_fn_set_status STATUS
33584# -----------------------
33585# Set $? to STATUS, without forking.
33586as_fn_set_status ()
33587{
33588  return $1
33589} # as_fn_set_status
33590
33591# as_fn_exit STATUS
33592# -----------------
33593# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33594as_fn_exit ()
33595{
33596  set +e
33597  as_fn_set_status $1
33598  exit $1
33599} # as_fn_exit
33600
33601# as_fn_unset VAR
33602# ---------------
33603# Portably unset VAR.
33604as_fn_unset ()
33605{
33606  { eval $1=; unset $1;}
33607}
33608as_unset=as_fn_unset
33609# as_fn_append VAR VALUE
33610# ----------------------
33611# Append the text in VALUE to the end of the definition contained in VAR. Take
33612# advantage of any shell optimizations that allow amortized linear growth over
33613# repeated appends, instead of the typical quadratic growth present in naive
33614# implementations.
33615if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33616  eval 'as_fn_append ()
33617  {
33618    eval $1+=\$2
33619  }'
33620else
33621  as_fn_append ()
33622  {
33623    eval $1=\$$1\$2
33624  }
33625fi # as_fn_append
33626
33627# as_fn_arith ARG...
33628# ------------------
33629# Perform arithmetic evaluation on the ARGs, and store the result in the
33630# global $as_val. Take advantage of shells that can avoid forks. The arguments
33631# must be portable across $(()) and expr.
33632if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33633  eval 'as_fn_arith ()
33634  {
33635    as_val=$(( $* ))
33636  }'
33637else
33638  as_fn_arith ()
33639  {
33640    as_val=`expr "$@" || test $? -eq 1`
33641  }
33642fi # as_fn_arith
33643
33644
33645if expr a : '\(a\)' >/dev/null 2>&1 &&
33646   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33647  as_expr=expr
33648else
33649  as_expr=false
33650fi
33651
33652if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33653  as_basename=basename
33654else
33655  as_basename=false
33656fi
33657
33658if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33659  as_dirname=dirname
33660else
33661  as_dirname=false
33662fi
33663
33664as_me=`$as_basename -- "$0" ||
33665$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33666	 X"$0" : 'X\(//\)$' \| \
33667	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33668$as_echo X/"$0" |
33669    sed '/^.*\/\([^/][^/]*\)\/*$/{
33670	    s//\1/
33671	    q
33672	  }
33673	  /^X\/\(\/\/\)$/{
33674	    s//\1/
33675	    q
33676	  }
33677	  /^X\/\(\/\).*/{
33678	    s//\1/
33679	    q
33680	  }
33681	  s/.*/./; q'`
33682
33683# Avoid depending upon Character Ranges.
33684as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33685as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33686as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33687as_cr_digits='0123456789'
33688as_cr_alnum=$as_cr_Letters$as_cr_digits
33689
33690ECHO_C= ECHO_N= ECHO_T=
33691case `echo -n x` in #(((((
33692-n*)
33693  case `echo 'xy\c'` in
33694  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33695  xy)  ECHO_C='\c';;
33696  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33697       ECHO_T='	';;
33698  esac;;
33699*)
33700  ECHO_N='-n';;
33701esac
33702
33703rm -f conf$$ conf$$.exe conf$$.file
33704if test -d conf$$.dir; then
33705  rm -f conf$$.dir/conf$$.file
33706else
33707  rm -f conf$$.dir
33708  mkdir conf$$.dir 2>/dev/null
33709fi
33710if (echo >conf$$.file) 2>/dev/null; then
33711  if ln -s conf$$.file conf$$ 2>/dev/null; then
33712    as_ln_s='ln -s'
33713    # ... but there are two gotchas:
33714    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33715    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33716    # In both cases, we have to default to `cp -p'.
33717    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33718      as_ln_s='cp -p'
33719  elif ln conf$$.file conf$$ 2>/dev/null; then
33720    as_ln_s=ln
33721  else
33722    as_ln_s='cp -p'
33723  fi
33724else
33725  as_ln_s='cp -p'
33726fi
33727rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33728rmdir conf$$.dir 2>/dev/null
33729
33730
33731# as_fn_mkdir_p
33732# -------------
33733# Create "$as_dir" as a directory, including parents if necessary.
33734as_fn_mkdir_p ()
33735{
33736
33737  case $as_dir in #(
33738  -*) as_dir=./$as_dir;;
33739  esac
33740  test -d "$as_dir" || eval $as_mkdir_p || {
33741    as_dirs=
33742    while :; do
33743      case $as_dir in #(
33744      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33745      *) as_qdir=$as_dir;;
33746      esac
33747      as_dirs="'$as_qdir' $as_dirs"
33748      as_dir=`$as_dirname -- "$as_dir" ||
33749$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33750	 X"$as_dir" : 'X\(//\)[^/]' \| \
33751	 X"$as_dir" : 'X\(//\)$' \| \
33752	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33753$as_echo X"$as_dir" |
33754    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33755	    s//\1/
33756	    q
33757	  }
33758	  /^X\(\/\/\)[^/].*/{
33759	    s//\1/
33760	    q
33761	  }
33762	  /^X\(\/\/\)$/{
33763	    s//\1/
33764	    q
33765	  }
33766	  /^X\(\/\).*/{
33767	    s//\1/
33768	    q
33769	  }
33770	  s/.*/./; q'`
33771      test -d "$as_dir" && break
33772    done
33773    test -z "$as_dirs" || eval "mkdir $as_dirs"
33774  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33775
33776
33777} # as_fn_mkdir_p
33778if mkdir -p . 2>/dev/null; then
33779  as_mkdir_p='mkdir -p "$as_dir"'
33780else
33781  test -d ./-p && rmdir ./-p
33782  as_mkdir_p=false
33783fi
33784
33785if test -x / >/dev/null 2>&1; then
33786  as_test_x='test -x'
33787else
33788  if ls -dL / >/dev/null 2>&1; then
33789    as_ls_L_option=L
33790  else
33791    as_ls_L_option=
33792  fi
33793  as_test_x='
33794    eval sh -c '\''
33795      if test -d "$1"; then
33796	test -d "$1/.";
33797      else
33798	case $1 in #(
33799	-*)set "./$1";;
33800	esac;
33801	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
33802	???[sx]*):;;*)false;;esac;fi
33803    '\'' sh
33804  '
33805fi
33806as_executable_p=$as_test_x
33807
33808# Sed expression to map a string onto a valid CPP name.
33809as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33810
33811# Sed expression to map a string onto a valid variable name.
33812as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33813
33814
33815exec 6>&1
33816## ----------------------------------- ##
33817## Main body of $CONFIG_STATUS script. ##
33818## ----------------------------------- ##
33819_ASEOF
33820test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33821
33822cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33823# Save the log message, to keep $0 and so on meaningful, and to
33824# report actual input values of CONFIG_FILES etc. instead of their
33825# values after options handling.
33826ac_log="
33827This file was extended by OpenJDK $as_me jdk8, which was
33828generated by GNU Autoconf 2.67.  Invocation command line was
33829
33830  CONFIG_FILES    = $CONFIG_FILES
33831  CONFIG_HEADERS  = $CONFIG_HEADERS
33832  CONFIG_LINKS    = $CONFIG_LINKS
33833  CONFIG_COMMANDS = $CONFIG_COMMANDS
33834  $ $0 $@
33835
33836on `(hostname || uname -n) 2>/dev/null | sed 1q`
33837"
33838
33839_ACEOF
33840
33841case $ac_config_files in *"
33842"*) set x $ac_config_files; shift; ac_config_files=$*;;
33843esac
33844
33845case $ac_config_headers in *"
33846"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33847esac
33848
33849
33850cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33851# Files that config.status was made for.
33852config_files="$ac_config_files"
33853config_headers="$ac_config_headers"
33854
33855_ACEOF
33856
33857cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33858ac_cs_usage="\
33859\`$as_me' instantiates files and other configuration actions
33860from templates according to the current configuration.  Unless the files
33861and actions are specified as TAGs, all are instantiated by default.
33862
33863Usage: $0 [OPTION]... [TAG]...
33864
33865  -h, --help       print this help, then exit
33866  -V, --version    print version number and configuration settings, then exit
33867      --config     print configuration, then exit
33868  -q, --quiet, --silent
33869                   do not print progress messages
33870  -d, --debug      don't remove temporary files
33871      --recheck    update $as_me by reconfiguring in the same conditions
33872      --file=FILE[:TEMPLATE]
33873                   instantiate the configuration file FILE
33874      --header=FILE[:TEMPLATE]
33875                   instantiate the configuration header FILE
33876
33877Configuration files:
33878$config_files
33879
33880Configuration headers:
33881$config_headers
33882
33883Report bugs to <build-dev@openjdk.java.net>.
33884OpenJDK home page: <http://openjdk.java.net>."
33885
33886_ACEOF
33887cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33888ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33889ac_cs_version="\\
33890OpenJDK config.status jdk8
33891configured by $0, generated by GNU Autoconf 2.67,
33892  with options \\"\$ac_cs_config\\"
33893
33894Copyright (C) 2010 Free Software Foundation, Inc.
33895This config.status script is free software; the Free Software Foundation
33896gives unlimited permission to copy, distribute and modify it."
33897
33898ac_pwd='$ac_pwd'
33899srcdir='$srcdir'
33900AWK='$AWK'
33901test -n "\$AWK" || AWK=awk
33902_ACEOF
33903
33904cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33905# The default lists apply if the user does not specify any file.
33906ac_need_defaults=:
33907while test $# != 0
33908do
33909  case $1 in
33910  --*=?*)
33911    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33912    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33913    ac_shift=:
33914    ;;
33915  --*=)
33916    ac_option=`expr "X$1" : 'X\([^=]*\)='`
33917    ac_optarg=
33918    ac_shift=:
33919    ;;
33920  *)
33921    ac_option=$1
33922    ac_optarg=$2
33923    ac_shift=shift
33924    ;;
33925  esac
33926
33927  case $ac_option in
33928  # Handling of the options.
33929  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33930    ac_cs_recheck=: ;;
33931  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33932    $as_echo "$ac_cs_version"; exit ;;
33933  --config | --confi | --conf | --con | --co | --c )
33934    $as_echo "$ac_cs_config"; exit ;;
33935  --debug | --debu | --deb | --de | --d | -d )
33936    debug=: ;;
33937  --file | --fil | --fi | --f )
33938    $ac_shift
33939    case $ac_optarg in
33940    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33941    '') as_fn_error $? "missing file argument" ;;
33942    esac
33943    as_fn_append CONFIG_FILES " '$ac_optarg'"
33944    ac_need_defaults=false;;
33945  --header | --heade | --head | --hea )
33946    $ac_shift
33947    case $ac_optarg in
33948    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33949    esac
33950    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33951    ac_need_defaults=false;;
33952  --he | --h)
33953    # Conflict between --help and --header
33954    as_fn_error $? "ambiguous option: \`$1'
33955Try \`$0 --help' for more information.";;
33956  --help | --hel | -h )
33957    $as_echo "$ac_cs_usage"; exit ;;
33958  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33959  | -silent | --silent | --silen | --sile | --sil | --si | --s)
33960    ac_cs_silent=: ;;
33961
33962  # This is an error.
33963  -*) as_fn_error $? "unrecognized option: \`$1'
33964Try \`$0 --help' for more information." ;;
33965
33966  *) as_fn_append ac_config_targets " $1"
33967     ac_need_defaults=false ;;
33968
33969  esac
33970  shift
33971done
33972
33973ac_configure_extra_args=
33974
33975if $ac_cs_silent; then
33976  exec 6>/dev/null
33977  ac_configure_extra_args="$ac_configure_extra_args --silent"
33978fi
33979
33980_ACEOF
33981cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33982if \$ac_cs_recheck; then
33983  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33984  shift
33985  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33986  CONFIG_SHELL='$SHELL'
33987  export CONFIG_SHELL
33988  exec "\$@"
33989fi
33990
33991_ACEOF
33992cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33993exec 5>>config.log
33994{
33995  echo
33996  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33997## Running $as_me. ##
33998_ASBOX
33999  $as_echo "$ac_log"
34000} >&5
34001
34002_ACEOF
34003cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34004_ACEOF
34005
34006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34007
34008# Handling of arguments.
34009for ac_config_target in $ac_config_targets
34010do
34011  case $ac_config_target in
34012    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34013    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34014    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34015    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34016    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34017    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34018    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34019
34020  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
34021  esac
34022done
34023
34024
34025# If the user did not use the arguments to specify the items to instantiate,
34026# then the envvar interface is used.  Set only those that are not.
34027# We use the long form for the default assignment because of an extremely
34028# bizarre bug on SunOS 4.1.3.
34029if $ac_need_defaults; then
34030  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34031  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34032fi
34033
34034# Have a temporary directory for convenience.  Make it in the build tree
34035# simply because there is no reason against having it here, and in addition,
34036# creating and moving files from /tmp can sometimes cause problems.
34037# Hook for its removal unless debugging.
34038# Note that there is a small window in which the directory will not be cleaned:
34039# after its creation but before its name has been assigned to `$tmp'.
34040$debug ||
34041{
34042  tmp=
34043  trap 'exit_status=$?
34044  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34045' 0
34046  trap 'as_fn_exit 1' 1 2 13 15
34047}
34048# Create a (secure) tmp directory for tmp files.
34049
34050{
34051  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34052  test -n "$tmp" && test -d "$tmp"
34053}  ||
34054{
34055  tmp=./conf$$-$RANDOM
34056  (umask 077 && mkdir "$tmp")
34057} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34058
34059# Set up the scripts for CONFIG_FILES section.
34060# No need to generate them if there are no CONFIG_FILES.
34061# This happens for instance with `./config.status config.h'.
34062if test -n "$CONFIG_FILES"; then
34063
34064
34065ac_cr=`echo X | tr X '\015'`
34066# On cygwin, bash can eat \r inside `` if the user requested igncr.
34067# But we know of no other shell where ac_cr would be empty at this
34068# point, so we can use a bashism as a fallback.
34069if test "x$ac_cr" = x; then
34070  eval ac_cr=\$\'\\r\'
34071fi
34072ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34073if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34074  ac_cs_awk_cr='\\r'
34075else
34076  ac_cs_awk_cr=$ac_cr
34077fi
34078
34079echo 'BEGIN {' >"$tmp/subs1.awk" &&
34080_ACEOF
34081
34082
34083{
34084  echo "cat >conf$$subs.awk <<_ACEOF" &&
34085  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34086  echo "_ACEOF"
34087} >conf$$subs.sh ||
34088  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34089ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34090ac_delim='%!_!# '
34091for ac_last_try in false false false false false :; do
34092  . ./conf$$subs.sh ||
34093    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34094
34095  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34096  if test $ac_delim_n = $ac_delim_num; then
34097    break
34098  elif $ac_last_try; then
34099    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34100  else
34101    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34102  fi
34103done
34104rm -f conf$$subs.sh
34105
34106cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34107cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34108_ACEOF
34109sed -n '
34110h
34111s/^/S["/; s/!.*/"]=/
34112p
34113g
34114s/^[^!]*!//
34115:repl
34116t repl
34117s/'"$ac_delim"'$//
34118t delim
34119:nl
34120h
34121s/\(.\{148\}\)..*/\1/
34122t more1
34123s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34124p
34125n
34126b repl
34127:more1
34128s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34129p
34130g
34131s/.\{148\}//
34132t nl
34133:delim
34134h
34135s/\(.\{148\}\)..*/\1/
34136t more2
34137s/["\\]/\\&/g; s/^/"/; s/$/"/
34138p
34139b
34140:more2
34141s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34142p
34143g
34144s/.\{148\}//
34145t delim
34146' <conf$$subs.awk | sed '
34147/^[^""]/{
34148  N
34149  s/\n//
34150}
34151' >>$CONFIG_STATUS || ac_write_fail=1
34152rm -f conf$$subs.awk
34153cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34154_ACAWK
34155cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34156  for (key in S) S_is_set[key] = 1
34157  FS = ""
34158
34159}
34160{
34161  line = $ 0
34162  nfields = split(line, field, "@")
34163  substed = 0
34164  len = length(field[1])
34165  for (i = 2; i < nfields; i++) {
34166    key = field[i]
34167    keylen = length(key)
34168    if (S_is_set[key]) {
34169      value = S[key]
34170      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34171      len += length(value) + length(field[++i])
34172      substed = 1
34173    } else
34174      len += 1 + keylen
34175  }
34176
34177  print line
34178}
34179
34180_ACAWK
34181_ACEOF
34182cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34183if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34184  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34185else
34186  cat
34187fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34188  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34189_ACEOF
34190
34191# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34192# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34193# trailing colons and then remove the whole line if VPATH becomes empty
34194# (actually we leave an empty line to preserve line numbers).
34195if test "x$srcdir" = x.; then
34196  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34197h
34198s///
34199s/^/:/
34200s/[	 ]*$/:/
34201s/:\$(srcdir):/:/g
34202s/:\${srcdir}:/:/g
34203s/:@srcdir@:/:/g
34204s/^:*//
34205s/:*$//
34206x
34207s/\(=[	 ]*\).*/\1/
34208G
34209s/\n//
34210s/^[^=]*=[	 ]*$//
34211}'
34212fi
34213
34214cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34215fi # test -n "$CONFIG_FILES"
34216
34217# Set up the scripts for CONFIG_HEADERS section.
34218# No need to generate them if there are no CONFIG_HEADERS.
34219# This happens for instance with `./config.status Makefile'.
34220if test -n "$CONFIG_HEADERS"; then
34221cat >"$tmp/defines.awk" <<\_ACAWK ||
34222BEGIN {
34223_ACEOF
34224
34225# Transform confdefs.h into an awk script `defines.awk', embedded as
34226# here-document in config.status, that substitutes the proper values into
34227# config.h.in to produce config.h.
34228
34229# Create a delimiter string that does not exist in confdefs.h, to ease
34230# handling of long lines.
34231ac_delim='%!_!# '
34232for ac_last_try in false false :; do
34233  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34234  if test -z "$ac_t"; then
34235    break
34236  elif $ac_last_try; then
34237    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34238  else
34239    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34240  fi
34241done
34242
34243# For the awk script, D is an array of macro values keyed by name,
34244# likewise P contains macro parameters if any.  Preserve backslash
34245# newline sequences.
34246
34247ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34248sed -n '
34249s/.\{148\}/&'"$ac_delim"'/g
34250t rset
34251:rset
34252s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34253t def
34254d
34255:def
34256s/\\$//
34257t bsnl
34258s/["\\]/\\&/g
34259s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34260D["\1"]=" \3"/p
34261s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34262d
34263:bsnl
34264s/["\\]/\\&/g
34265s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34266D["\1"]=" \3\\\\\\n"\\/p
34267t cont
34268s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34269t cont
34270d
34271:cont
34272n
34273s/.\{148\}/&'"$ac_delim"'/g
34274t clear
34275:clear
34276s/\\$//
34277t bsnlc
34278s/["\\]/\\&/g; s/^/"/; s/$/"/p
34279d
34280:bsnlc
34281s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34282b cont
34283' <confdefs.h | sed '
34284s/'"$ac_delim"'/"\\\
34285"/g' >>$CONFIG_STATUS || ac_write_fail=1
34286
34287cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34288  for (key in D) D_is_set[key] = 1
34289  FS = ""
34290}
34291/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34292  line = \$ 0
34293  split(line, arg, " ")
34294  if (arg[1] == "#") {
34295    defundef = arg[2]
34296    mac1 = arg[3]
34297  } else {
34298    defundef = substr(arg[1], 2)
34299    mac1 = arg[2]
34300  }
34301  split(mac1, mac2, "(") #)
34302  macro = mac2[1]
34303  prefix = substr(line, 1, index(line, defundef) - 1)
34304  if (D_is_set[macro]) {
34305    # Preserve the white space surrounding the "#".
34306    print prefix "define", macro P[macro] D[macro]
34307    next
34308  } else {
34309    # Replace #undef with comments.  This is necessary, for example,
34310    # in the case of _POSIX_SOURCE, which is predefined and required
34311    # on some systems where configure will not decide to define it.
34312    if (defundef == "undef") {
34313      print "/*", prefix defundef, macro, "*/"
34314      next
34315    }
34316  }
34317}
34318{ print }
34319_ACAWK
34320_ACEOF
34321cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34322  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34323fi # test -n "$CONFIG_HEADERS"
34324
34325
34326eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34327shift
34328for ac_tag
34329do
34330  case $ac_tag in
34331  :[FHLC]) ac_mode=$ac_tag; continue;;
34332  esac
34333  case $ac_mode$ac_tag in
34334  :[FHL]*:*);;
34335  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
34336  :[FH]-) ac_tag=-:-;;
34337  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34338  esac
34339  ac_save_IFS=$IFS
34340  IFS=:
34341  set x $ac_tag
34342  IFS=$ac_save_IFS
34343  shift
34344  ac_file=$1
34345  shift
34346
34347  case $ac_mode in
34348  :L) ac_source=$1;;
34349  :[FH])
34350    ac_file_inputs=
34351    for ac_f
34352    do
34353      case $ac_f in
34354      -) ac_f="$tmp/stdin";;
34355      *) # Look for the file first in the build tree, then in the source tree
34356	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34357	 # because $ac_f cannot contain `:'.
34358	 test -f "$ac_f" ||
34359	   case $ac_f in
34360	   [\\/$]*) false;;
34361	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34362	   esac ||
34363	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
34364      esac
34365      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34366      as_fn_append ac_file_inputs " '$ac_f'"
34367    done
34368
34369    # Let's still pretend it is `configure' which instantiates (i.e., don't
34370    # use $as_me), people would be surprised to read:
34371    #    /* config.h.  Generated by config.status.  */
34372    configure_input='Generated from '`
34373	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34374	`' by configure.'
34375    if test x"$ac_file" != x-; then
34376      configure_input="$ac_file.  $configure_input"
34377      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34378$as_echo "$as_me: creating $ac_file" >&6;}
34379    fi
34380    # Neutralize special characters interpreted by sed in replacement strings.
34381    case $configure_input in #(
34382    *\&* | *\|* | *\\* )
34383       ac_sed_conf_input=`$as_echo "$configure_input" |
34384       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34385    *) ac_sed_conf_input=$configure_input;;
34386    esac
34387
34388    case $ac_tag in
34389    *:-:* | *:-) cat >"$tmp/stdin" \
34390      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
34391    esac
34392    ;;
34393  esac
34394
34395  ac_dir=`$as_dirname -- "$ac_file" ||
34396$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34397	 X"$ac_file" : 'X\(//\)[^/]' \| \
34398	 X"$ac_file" : 'X\(//\)$' \| \
34399	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34400$as_echo X"$ac_file" |
34401    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34402	    s//\1/
34403	    q
34404	  }
34405	  /^X\(\/\/\)[^/].*/{
34406	    s//\1/
34407	    q
34408	  }
34409	  /^X\(\/\/\)$/{
34410	    s//\1/
34411	    q
34412	  }
34413	  /^X\(\/\).*/{
34414	    s//\1/
34415	    q
34416	  }
34417	  s/.*/./; q'`
34418  as_dir="$ac_dir"; as_fn_mkdir_p
34419  ac_builddir=.
34420
34421case "$ac_dir" in
34422.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34423*)
34424  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34425  # A ".." for each directory in $ac_dir_suffix.
34426  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34427  case $ac_top_builddir_sub in
34428  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34429  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34430  esac ;;
34431esac
34432ac_abs_top_builddir=$ac_pwd
34433ac_abs_builddir=$ac_pwd$ac_dir_suffix
34434# for backward compatibility:
34435ac_top_builddir=$ac_top_build_prefix
34436
34437case $srcdir in
34438  .)  # We are building in place.
34439    ac_srcdir=.
34440    ac_top_srcdir=$ac_top_builddir_sub
34441    ac_abs_top_srcdir=$ac_pwd ;;
34442  [\\/]* | ?:[\\/]* )  # Absolute name.
34443    ac_srcdir=$srcdir$ac_dir_suffix;
34444    ac_top_srcdir=$srcdir
34445    ac_abs_top_srcdir=$srcdir ;;
34446  *) # Relative name.
34447    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34448    ac_top_srcdir=$ac_top_build_prefix$srcdir
34449    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34450esac
34451ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34452
34453
34454  case $ac_mode in
34455  :F)
34456  #
34457  # CONFIG_FILE
34458  #
34459
34460_ACEOF
34461
34462cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34463# If the template does not know about datarootdir, expand it.
34464# FIXME: This hack should be removed a few years after 2.60.
34465ac_datarootdir_hack=; ac_datarootdir_seen=
34466ac_sed_dataroot='
34467/datarootdir/ {
34468  p
34469  q
34470}
34471/@datadir@/p
34472/@docdir@/p
34473/@infodir@/p
34474/@localedir@/p
34475/@mandir@/p'
34476case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34477*datarootdir*) ac_datarootdir_seen=yes;;
34478*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34479  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34480$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34481_ACEOF
34482cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34483  ac_datarootdir_hack='
34484  s&@datadir@&$datadir&g
34485  s&@docdir@&$docdir&g
34486  s&@infodir@&$infodir&g
34487  s&@localedir@&$localedir&g
34488  s&@mandir@&$mandir&g
34489  s&\\\${datarootdir}&$datarootdir&g' ;;
34490esac
34491_ACEOF
34492
34493# Neutralize VPATH when `$srcdir' = `.'.
34494# Shell code in configure.ac might set extrasub.
34495# FIXME: do we really want to maintain this feature?
34496cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34497ac_sed_extra="$ac_vpsub
34498$extrasub
34499_ACEOF
34500cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34501:t
34502/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34503s|@configure_input@|$ac_sed_conf_input|;t t
34504s&@top_builddir@&$ac_top_builddir_sub&;t t
34505s&@top_build_prefix@&$ac_top_build_prefix&;t t
34506s&@srcdir@&$ac_srcdir&;t t
34507s&@abs_srcdir@&$ac_abs_srcdir&;t t
34508s&@top_srcdir@&$ac_top_srcdir&;t t
34509s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34510s&@builddir@&$ac_builddir&;t t
34511s&@abs_builddir@&$ac_abs_builddir&;t t
34512s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34513$ac_datarootdir_hack
34514"
34515eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
34516  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34517
34518test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34519  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
34520  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
34521  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34522which seems to be undefined.  Please make sure it is defined" >&5
34523$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34524which seems to be undefined.  Please make sure it is defined" >&2;}
34525
34526  rm -f "$tmp/stdin"
34527  case $ac_file in
34528  -) cat "$tmp/out" && rm -f "$tmp/out";;
34529  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
34530  esac \
34531  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34532 ;;
34533  :H)
34534  #
34535  # CONFIG_HEADER
34536  #
34537  if test x"$ac_file" != x-; then
34538    {
34539      $as_echo "/* $configure_input  */" \
34540      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
34541    } >"$tmp/config.h" \
34542      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34543    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
34544      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34545$as_echo "$as_me: $ac_file is unchanged" >&6;}
34546    else
34547      rm -f "$ac_file"
34548      mv "$tmp/config.h" "$ac_file" \
34549	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34550    fi
34551  else
34552    $as_echo "/* $configure_input  */" \
34553      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
34554      || as_fn_error $? "could not create -" "$LINENO" 5
34555  fi
34556 ;;
34557
34558
34559  esac
34560
34561done # for ac_tag
34562
34563
34564as_fn_exit 0
34565_ACEOF
34566ac_clean_files=$ac_clean_files_save
34567
34568test $ac_write_fail = 0 ||
34569  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34570
34571
34572# configure is writing to config.log, and then calls config.status.
34573# config.status does its own redirection, appending to config.log.
34574# Unfortunately, on DOS this fails, as config.log is still kept open
34575# by configure, so config.status won't be able to write to it; its
34576# output is simply discarded.  So we exec the FD to /dev/null,
34577# effectively closing config.log, so it can be properly (re)opened and
34578# appended to by config.status.  When coming back to configure, we
34579# need to make the FD available again.
34580if test "$no_create" != yes; then
34581  ac_cs_success=:
34582  ac_config_status_args=
34583  test "$silent" = yes &&
34584    ac_config_status_args="$ac_config_status_args --quiet"
34585  exec 5>/dev/null
34586  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34587  exec 5>>config.log
34588  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34589  # would make configure fail if this is the last instruction.
34590  $ac_cs_success || as_fn_exit 1
34591fi
34592if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34593  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34594$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34595fi
34596
34597
34598# Make the compare script executable
34599$CHMOD +x $OUTPUT_ROOT/compare.sh
34600
34601# Finally output some useful information to the user
34602
34603# Finally output some useful information to the user
34604
34605if test "x$CCACHE_FOUND" != x; then
34606	if  test "x$HAS_GOOD_CCACHE" = x; then
34607		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34608		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34609	else
34610		CCACHE_STATUS="installed and in use"
34611	fi
34612else
34613	if test "x$GCC" = xyes; then
34614		CCACHE_STATUS="not installed (consider installing)"
34615		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34616	else
34617		CCACHE_STATUS="not available for your system"
34618	fi
34619fi
34620
34621printf "\n"
34622printf "====================================================\n"
34623printf "A new configuration has been successfully created in\n"
34624printf "$OUTPUT_ROOT\n"
34625if test "x$CONFIGURE_COMMAND_LINE" != x; then
34626	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34627else
34628	printf "using default settings.\n"
34629fi
34630
34631printf "\n"
34632printf "Configuration summary:\n"
34633printf "* Debug level:    $DEBUG_LEVEL\n"
34634printf "* JDK variant:    $JDK_VARIANT\n"
34635printf "* JVM variants:   $with_jvm_variants\n"
34636printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34637
34638printf "\n"
34639printf "Tools summary:\n"
34640if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34641  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34642fi
34643printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34644printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34645printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34646
34647printf "\n"
34648printf "Build performance summary:\n"
34649printf "* Cores to use:   $JOBS\n"
34650printf "* Memory limit:   $MEMORY_SIZE MB\n"
34651printf "* ccache status:  $CCACHE_STATUS\n"
34652printf "\n"
34653
34654if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34655	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34656	printf "$CCACHE_HELP_MSG\n"
34657
34658    # Print a helpful message on how to acquire the necessary build dependency.
34659    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34660    MISSING_DEPENDENCY=ccache
34661    PKGHANDLER_COMMAND=
34662
34663    case $PKGHANDLER in
34664	apt-get)
34665                apt_help     $MISSING_DEPENDENCY ;;
34666    yum)
34667                yum_help     $MISSING_DEPENDENCY ;;
34668	port)
34669                port_help    $MISSING_DEPENDENCY ;;
34670	pkgutil)
34671                pkgutil_help $MISSING_DEPENDENCY ;;
34672	pkgadd)
34673                pkgadd_help  $MISSING_DEPENDENCY ;;
34674    * )
34675      break ;;
34676    esac
34677
34678    if test "x$PKGHANDLER_COMMAND" != x; then
34679        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34680    fi
34681
34682	printf "$HELP_MSG\n"
34683	printf "\n"
34684fi
34685
34686if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34687	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34688	printf "will result in longer build times.\n"
34689	printf "\n"
34690fi
34691
34692if test "x$FOUND_ALT_VARIABLES" != "x"; then
34693	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34694	printf "These are not respected, and will be ignored. It is recommended\n"
34695	printf "that you clean your environment. The following variables are set:\n"
34696	printf "$FOUND_ALT_VARIABLES\n"
34697	printf "\n"
34698fi
34699
34700if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34701	printf "WARNING: Your build output directory is not on a local disk.\n"
34702	printf "This will severely degrade build performance!\n"
34703	printf "It is recommended that you create an output directory on a local disk,\n"
34704	printf "and run the configure script again from that directory.\n"
34705	printf "\n"
34706fi
34707
34708if test "x$IS_RECONFIGURE" = "xyes"; then
34709	printf "WARNING: The result of this configuration has overridden an older\n"
34710	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34711	printf "proper build. Failure to do so might result in strange build problems.\n"
34712	printf "\n"
34713fi
34714
34715